Afficher un message
Vieux 18/04/2006, 21h00   #2
Greg Hackney
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Control over senders domain name

Stevie wrote:
> Hi all
>
> Early days for me and linux email so please bare with me....
>
> I've inherited two servers, one running sendmail, one running postfix.
>
> I want to control the domain name that is appended to the senders name
> when sending email via sendmail/postfix from the command line. This
> will allow me more control over how these emails are filtered by a spam
> and email signature engine.
>
> Using the command
> echo "test body" | mail -s "Test email" me@mydomain.com
>
> two different sender email addresses are visible in the received email.
> On the sendmail server the senders name appears in my inbox as
> root@servername.local whereas on the postfix server the senders name
> appears as root@servername.mydomain.com.
>
> I'd like to standardise and have servername.mydomain.com replaced by
> servername.local.
>
> Could anyone point me in the right direction? Is this something
> controlled by the postfix/sendmail config or is it within the network
> config itself?
>
> Also, how does the mail command know to use sendmail or postfix? In the
> medium term I'd like to install postfix on the sendmail box as I've
> heard it's simpler to configure. Is there a way for these two packages
> to co-exist so the transfer to postfix can be as risk free as possible?
>
> Many thanks
> StevieH
>


First of all, no offense but this seems to me like not a good thing to do:
"I'd like to standardise and have servername.mydomain.com replaced by servername.local".

Nonetheless, the domain names within message body headers can be changed by the recipient_canonical
feature:
recipient_canonical_maps = hash:/etc/postfix/recipient_canonical

--< /etc/postfix/recipient_canonical >--
@servername.mydomain.com @local

> Also, how does the mail command know to use sendmail or postfix?


Most mail client software has a configuration file to specify the mail command. Most
all of them point to /usr/sbin/sendmail, which is the correct local interface into Postfix.
Postfix itself is designed to speak the SMTP protocol from server to server, and not from
client to server. So, Postfix is interfaced locally with the sendmail command. (and Postfix has it's
own sendmail command).

> I'd like to install postfix on the sendmail box as I've
> heard it's simpler to configure. Is there a way for these two packages
> to co-exist so the transfer to postfix can be as risk free as possible?


The Postfix and Sendmail packages can co-exist on the same system, but
you want only one of them running at any given time. The gotcha is there are a couple
of command names that conflict between the two packages:

mailq
newaliases
rmail
sendmail

Some Linux systems deal with this by using changeable symbolic links to the binaries, such as:

/usr/sbin/sendmail -> /etc/alternatives/mta

/etc/alternatives/mta -> /usr/sbin/sendmail.postfix
--or--
/etc/alternatives/mta -> /usr/sbin/sendmail.sendmail


--
Greg













  Réponse avec citation
 
Page generated in 0,09250 seconds with 9 queries