Operating System - HP-UX
1752586 Members
3729 Online
108788 Solutions
New Discussion юеВ

change sendmail's from address

 
SOLVED
Go to solution
Jenni Wolgast
Regular Advisor

change sendmail's from address

Hello,

I am trying to figure out how to change how the from address comes through when we send email using sendmail/mailx on our HP-UX servers... Right now when we use sendmail/mailx the from address comes though as @ and I want to replace with our normal email address suffix. I have been searching around and trying differnt things so this is what I have tried so far...

I first tried modifying /etc/rc.config.d/mailservs so that SENDMAIL_SERVER_NAME had our normal email suffix (it was blank) then restarted sendmail. That didn't work so I found instructions on creating a /etc/mail/userdb.db file and configuring /etc/mail/sendmail.cf. That didn't work either and I am not at all familiar with configuring sendmail so any suggestions will be greatly appreciated and rewarded with points. :)
5 REPLIES 5
David Child_1
Honored Contributor
Solution

Re: change sendmail's from address

Jenni,

If I understand correctly you want to have your mail delivered from jenni@yourcompany.com instead of jenni@servername (or jenni@servername.yourcompany.com)?

Try making the following change to /etc/mail/sendmail.cf (then restart sendmail);

From;
DM

to

DMyourcompany.com

David
Jenni Wolgast
Regular Advisor

Re: change sendmail's from address

Wow, that was really easy! I have been fighting with this off and on for year now because sometimes the messages were being caught by spam filters and we had trouble adding the system name to the safe list since it didn't end in one of the common suffixes like .com or .org... Thanks so much for your quick response!!
Tim Nelson
Honored Contributor

Re: change sendmail's from address

As mentioned the masquerade setting will take care of this.

It will change the aliased "from:" address but not the real address.

If spam filters are an issue then I suggest setting the smart relay. "DS" macro. And relay all your system emails though your real mail server ( need to tell your mail admin to allow this ).

I had to do this to get the pager and cell phone text messages to fly as all vendors do a domain lookup on the real address and typically cannot find myuxserver.mycompany.com in DNS land even though you have a spoofed address of mycompany.com.

Aashique
Honored Contributor

Re: change sendmail's from address

Hi,
ya only write your domain name in the DM option.

vi sendmail.cf
DMdomain.com

then restart the sendmail daemon.


Thanks & Regards

Aashique
Sam McKnight
Frequent Advisor

Re: change sendmail's from address

As a next step, in email you might want the external world to see your user names as something other than their login names. For instance, jenni@yourcompanyname.com might be seen as jwolqast@yourcompanyname.com. You have to do is enable the userdb which you already have investigated. See hp docid UMAILKBRC00007291

The entries are of the form:

jenni:mailname jwolqast@yourcompanyname.com
jwolqast:maildrop jenni

In order for the first "From" line to have the alias jsmcknight appear instead of the username jsm, the local delivery agent must have access to the user database. For Mlocal in sendmail.cf, the F=@ flag allows all addresses for the local delivery agent to be written by the User Database. The F=i flag suppresses the rewrite for the sender envelope if absent or allows the rewrite for the sender envelope if present. On the Mlocal line, P=...@qm9... should be P=...@qm9i...