Operating System - HP-UX
1823986 Members
4024 Online
109667 Solutions
New Discussion юеВ

Re: email alias does not send to root

 
SOLVED
Go to solution
Dave Chamberlin
Trusted Contributor

email alias does not send to root

Hello,
I have created an email alias in the /etc/aliases file (and ran newaliases). The line is:
sysadmin : root,me@mydomain.com

Mail to sysadmin IS going to me@mydomain.com but is not going to root. Can someone tell what is wrong? Curiously, it worked fine the first time I tested it....
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: email alias does not send to root

probably syntax error.

my file on HP and Linux looks like this.

me@mydomain.com: root


You can test this as follows

sendmail -bt

type in the root account you should get me@mydomain.com back
/QUIT

to terminate test mode

also
sendmail -v -d8.99 -d38.99 root
type some text

.


might be useful in verifying your configuration.

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
Patrick Wallek
Honored Contributor

Re: email alias does not send to root

Do you have root aliased to something else elsewherer in your /etc/mail/aliases file? If so, then root won't get the mail, rather it will go to wherever root is aliased.
Dave Chamberlin
Trusted Contributor

Re: email alias does not send to root

There is no typo. There is no alias for root though there are many that alias TO root. this is interesting - I edited my alias for sysadmin to be:
sysadmin : operator,me@mydomain.com
(Since operator aliases to root). I then tried several emails to sysadmin. The FIRST one only was delivered to BOTH root and the second account. All subsequent messages were received only by the second account. I changed the aliases file back. This time no mail went to root. I have attached the tail of the mail.log file.

thanks
Patrick Wallek
Honored Contributor

Re: email alias does not send to root

Have a look in the /home/root/.forward file. What is in there? That my be part of your problem.
Dave Chamberlin
Trusted Contributor

Re: email alias does not send to root

Thanks Patrick,

There is no .forward file for root.

Dave
SIG. FARAVELLI
New Member
Solution

Re: email alias does not send to root

try this in /etc/aliases

sysadmin : \root,me@mydomain.com

In my system work .

regards

nicola
RAC_1
Honored Contributor

Re: email alias does not send to root

what does following command return?

expand_alias sysadm

Should return root anf me@mydomain.com

Anil
There is no substitute to HARDWORK
Dave Chamberlin
Trusted Contributor

Re: email alias does not send to root

I changed the line in the alias file to have \root instead of root and this has worked repeatedly now :)

FYI - The expand_alias showed both users before and after the change.

Thanks!