Operating System - HP-UX
1820261 Members
2851 Online
109622 Solutions
New Discussion юеВ

Howto prevent "from root@localhost" in outbound email header.

 
SOLVED
Go to solution
Steve Post
Trusted Contributor

Howto prevent "from root@localhost" in outbound email header.

When the system reboots I send out a message to my cell phone. The cell phone now refuses to accept the email because buried in the mail header is this: "Received: (from root@localhost)."

The sendmail.cf file is setup to use a "DS" line to a smart relay host.

I tried sending the mail to a yahoo mail account. It died for apparently the same reason. I appears that this root@localhost is a clue the mail servers that this could be spam. In my case it is NOT spam. But I don't know how to change root@localhost, or if I should change it, or what I should change it to.

IS there another option? I can send out the mail message as a user on the system besides root. But it's root that is running the reboot scripts, not some simple user.

Any ideas?

6 REPLIES 6
RAC_1
Honored Contributor

Re: Howto prevent "from root@localhost" in outbound email header.

Many options to do that.

DM macro in sendmail.cf file

Check -r options to sendmail and mailx commands.

Anil
There is no substitute to HARDWORK
Kent Ostby
Honored Contributor
Solution

Re: Howto prevent "from root@localhost" in outbound email header.

Steve .. I had similar issues a while back.

Here is the thread that developed off of it:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=685447
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Bejoy C Alias
Respected Contributor

Re: Howto prevent "from root@localhost" in outbound email header.

When u send an outgoing mail it will be masqueraded as the domain of ur server if u configured the DM macro . But by default this will not mask the root user . Because the root user is specified in the class E , which contains the list of users which should not be masqueraded . To masquerade the root user , u need to define the DM macro as 'DMyourdomain.com' in ur sendmail.cf file and comment out the line 'CE root' . Now the outgoing mails which root sends will be having the From line as root@yourdomain.com .
Be Always Joy ......
Bejoy C Alias
Respected Contributor

Re: Howto prevent "from root@localhost" in outbound email header.

The class E may be defined as 'C{E}root' in later versions of sendmail , u need to comment out this line if the CEroot line is not there .
Be Always Joy ......
Rick Garland
Honored Contributor

Re: Howto prevent "from root@localhost" in outbound email header.

Use the MASQUERADE feature of sendmail.

outgoing mail will have the sender address as you specify
Steve Post
Trusted Contributor

Re: Howto prevent "from root@localhost" in outbound email header.

Bejoy fully solved the problem.
It was just that "CE" line.