System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

aliases issue using /etc/aliases

SOLVED
Go to solution
MikeL_4
Super Advisor

aliases issue using /etc/aliases

I am able to send a mail message to myself from a server without any problem...

But after I have updated /etc/aliases and added the line for all of root's mail to be routed to me....

Added:
root: myemail@company.com

and ran newaliases to implement it....

If I send a mail message to root, it does not get routed to my email...

Any suggestions ?
9 REPLIES
Ivan Ferreira
Honored Contributor

Re: aliases issue using /etc/aliases

Please post the output of /var/log/maillog after your test.

Also, if you send a mail to yourself from command line, do you receive it? Is your server also your own mail server?
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
MikeL_4
Super Advisor

Re: aliases issue using /etc/aliases

This is the /var/log/maillog entries from when I ran it command line, and I received the email:
Command: echo "Test mail: michael.lense@convergys.com...." | /bin/mail -s "haplv01" michael.lense@convergys.com

Apr 2 08:42:09 haplv01 sendmail[9876]: n32Cg9oN009876: from=root, size=93, class=0, nrcpts=1, msgid=<200904021242.n32Cg9oN009876@haplv01.convergys.com>, relay=root@localhost
Apr 2 08:42:09 haplv01 sendmail[9876]: STARTTLS=client, relay=cvgmx2.convergys.com., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Apr 2 08:42:09 haplv01 sendmail[9876]: n32Cg9oN009876: to=michael.lense@convergys.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30093, relay=cvgmx2.convergys.com. [155.90.248.189], dsn=2.0.0, stat=Sent (Ok: queued as 829971464324)

Here I changed the /etc/aliases file adding line:
root: michael.lense@convergys.com
Ran the newaliases command:
# newaliases
/etc/aliases: 79 aliases, longest 27 bytes, 833 bytes total
#
and this is the /var/log/maillog entries, and I did not receive the email...
Apr 2 08:43:34 haplv01 sendmail[9888]: alias database /etc/aliases rebuilt by root
Apr 2 08:43:34 haplv01 sendmail[9888]: /etc/aliases: 79 aliases, longest 27 bytes, 833 bytes total
Apr 2 08:44:02 haplv01 sendmail[9891]: n32Ci2ZJ009891: from=root, size=47, class=0, nrcpts=1, msgid=<200904021244.n32Ci2ZJ009891@haplv01.convergys.com>, relay=root@localhost
Apr 2 08:44:03 haplv01 sendmail[9891]: STARTTLS=client, relay=cvgmx2.convergys.com., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Apr 2 08:44:03 haplv01 sendmail[9891]: n32Ci2ZJ009891: to=root, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30047, relay=cvgmx2.convergys.com. [155.90.248.189], dsn=2.0.0, stat=Sent (Ok: queued as 4416A1464347)
.................................
Ivan Ferreira
Honored Contributor
Solution

Re: aliases issue using /etc/aliases

It looks like the messages was delivered to the relay host. You should identify what is happening in cvgmx2.convergys.com.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
MikeL_4
Super Advisor

Re: aliases issue using /etc/aliases

I checked with the Admin in charge of the mail server and he said it is trying to send the mail to root at that servers hostname....

I looked at a server that is working corectly, and the maillog on it shows the mail going to individual mail addresses that are in the /etc/aliases file for root:

Apr 14 12:57:33 mfl-rhel5 sendmail[9712]: n3EGvXY6009712: from=root, size=2393, class=0, nrcpts=1, msgid=<200904141657.n3EGvXY6009712@mfl-rhel5.dcd.convergys.com>, relay=root@localhost
Apr 14 12:57:33 mfl-rhel5 sendmail[9786]: n3EGvX74009786: from=, size=2697, class=0, nrcpts=1, msgid=<200904141657.n3EGvXY6009712@mfl-rhel5.dcd.convergys.com>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Apr 14 12:57:33 mfl-rhel5 sendmail[9712]: n3EGvXY6009712: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32393, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (n3EGvX74009786 Message accepted for delivery)
Apr 14 12:57:34 mfl-rhel5 sendmail[9787]: n3EGvX74009786: to=mlense@cfl.rr.com, ctladdr= (0/0), delay=00:00:01, xdelay=00:00:00, mailer=esmtp, pri=62949, relay=cdptpa-smtpin02.mail.rr.com. [75.180.132.244], dsn=4.0.0, stat=Deferred: Connection refused by cdptpa-smtpin02.mail.rr.com.
Apr 14 12:57:35 mfl-rhel5 sendmail[9787]: STARTTLS=client, relay=cvgmx1in.convergys.com., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Apr 14 12:57:35 mfl-rhel5 sendmail[9787]: n3EGvX74009786: to=michael.lense@convergys.com, ctladdr= (0/0), delay=00:00:02, xdelay=00:00:01, mailer=esmtp, pri=62949, relay=cvgmx1in.convergys.com. [155.90.248.189], dsn=2.0.0, stat=Sent (Ok: queued as 924DD14F876C)

So to me it does not appear as if the /etc/aliases is working on the effected server for some reason.... and after running the newaliases command, the aliases.db file has a new date/time stamp that reflects when it was run....
Ivan Ferreira
Honored Contributor

Re: aliases issue using /etc/aliases

It seems that sendmail is forwarding directly mails for root to the smart host, and they should be delivered as local. Maybe, unqualified address is trying to be directly sent to the smart host.

Can you try sending a mail to root@localhost for example?. What is the content of your local-host-names file?.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
MikeL_4
Super Advisor

Re: aliases issue using /etc/aliases

sent mail message to root@localhost:

Apr 14 16:12:40 atcpivrv01 sendmail[15941]: n3EKCe6Z015941: from=root, size=72, class=0, nrcpts=1, msgid=<200904142012.n3EKCe6Z015941@atcpivrv01.na.convergys.com>, relay=root@localhost
Apr 14 16:12:40 atcpivrv01 sendmail[15941]: STARTTLS=client, relay=cvgmx2.convergys.com., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Apr 14 16:12:40 atcpivrv01 sendmail[15941]: n3EKCe6Z015941: to=root@localhost, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30072, relay=cvgmx2.convergys.com. [155.90.248.189], dsn=2.0.0, stat=Sent (Ok: queued as 7397E14F874D)

# cat /etc/mail/local-host-names
# local-host-names - include all aliases for your machine here.
#
Ivan Ferreira
Honored Contributor

Re: aliases issue using /etc/aliases

You should include your hostnames and local domains to have mails delivered locally. At least include in your local-host-names file:

localhost
localhost.localdomain
localdomain



Otherwise, no mail will be delivered locally and will be passed to the smart host without any processing.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
MikeL_4
Super Advisor

Re: aliases issue using /etc/aliases

I give up on this, nothing seems to work... This is the same on 6 other servers I have, all running Red Hat version 4, our Version 5 servers are working fine and they are all setup the same...
MikeL_4
Super Advisor

Re: aliases issue using /etc/aliases

Thanks