Operating System - HP-UX
1833861 Members
2092 Online
110063 Solutions
New Discussion

Re: email-aliases-masquerading

 
Joseph Hoh
Frequent Advisor

email-aliases-masquerading

When I send an email to a local UNIX account (jsmith) the aliases file translates it to jsmith@xyz.com and the mail is deleivered. However, when the email is recieved it appears as if it where sent to jsmith@servername.xyz.com. Is there a way to remove the "servername" part of the "sent to" address?

Thanks.
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: email-aliases-masquerading

This is can be affected in two ways.

You can set up an alias to jsmith@servername.xyz. com jsmith@xyz.com

The normal file for this is /etc/aliases or /etd/mail/aliases

This will work immediately after restarting the sendmail daemon.

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

For more refinement you can make entries in these files.

/etc/mail/virtusertable

externalemailaddress localusername

/etc/mail/genericstable

localusername externaladdress


This will get you complete aliases.

You will need to either rebuilt the databases or run the script gen_cf which I think will generate new databases and integrate these changes into your setup.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jeff Schussele
Honored Contributor

Re: email-aliases-masquerading

Hi Jeff,

The local hostname is defined in the /etc/mail/sendmail.cf file by the Cw parameter & is most frequently defined to be the localhost resolution.
You can try commenting the Cw in the file & restarting sendmail, but this may cause other problems.
Therefore this should probably be handled in the /etc/mail/sendmail.cw file

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Joseph Hoh
Frequent Advisor

Re: email-aliases-masquerading

The sendmail daemon does not have to be running to have email sent out it is only for incoming email - right?
Kevin Wright
Honored Contributor

Re: email-aliases-masquerading

Change the DM macro to DMdomain.com, and set CE to usernames you don't want to masqerade.
CEroot

And no, you don't, and shouldn't have sendmail running as a DEAMON unless your host will receive mail.
Dave La Mar
Honored Contributor

Re: email-aliases-masquerading

Jeff -
As others have noted this can be set in the /etc/mail/sendmail.cf

i.e. In our environment we want mail to look as though it came from our Outlook server and replies to go back through that Outlook server to the interested party. Our entry in sendmail.cf is
# masquarade as, aka site hiding(null for no masquerading)
DM gottschalks.com


Best of luck.

Regards,

dl
"I'm not dumb. I just have a command of thoroughly useless information."
James Randall
Frequent Advisor

Re: email-aliases-masquerading

Sendmail does not need to run if the system is SENDING mail (NOT RECEIVING).

But the only problem with shutting down sendmail completely is that mail doesn't alway RE-SEND in the event of connection failure. It goes into the mail queue....and never retrys.

You can configure sendmail to not accept inbound...but to check and resend the queued mail at a specified interval.
Ex. sendmail -q30m

Would attempt to reprocess failed mail messages every 30 minutes.

James
No news is good news