Mail sent from root is sent as postmaster

Posted May 3, 2015 8.2k views

A couple of days ago a weird thing happened: every mail sent by root (from console, from cron, etc) is sent with “postmaster” in the “From” field, and not from root.

Moreover, every mail sent gives an error, but then the mail is correctly delivered.

I’ve tried everything, but now I don’t know what to do.

Here is the content of the /var/log/maillog file until two days ago (the correct one)


Apr 27 04:02:03 vps-fra-01 sendmail[13558]: t3R822mG013558: from=root, size=27844, class=0, nrcpts=1, msgid=201504270802.t3R822mG013558@vps-fra-01.xxxxx.yyyyy, relay=root@localhost
Apr 27 04:02:03 vps-fra-01 sendmail[13812]: t3R8237o013812: from=root@vps-fra-01.xxxxx.yyyyy, size=28152, class=0, nrcpts=1, msgid=201504270802.t3R822mG013558@vps-fra-01.xxxxx.yyyyy, proto=ESMTP, daemon=MTA, relay=localhost.localdomain []
Apr 27 04:02:03 vps-fra-01 sendmail[13558]: t3R822mG013558: to=root, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=57844, relay=[] [], dsn=2.0.0, stat=Sent (t3R8237o013812 Message accepted for delivery)
Apr 27 04:02:05 vps-fra-01 sendmail[13813]: t3R8237o013812:, ctladdr=root@vps-fra-01.xxxxx.yyyyy (0/0), delay=00:00:02, xdelay=00:00:02, mailer=esmtp, pri=58407, [], dsn=2.0.0, stat=Sent (OK <15042708-7992-0000-0000-0000017C1150>)

But today, if I try to send an email to root from the console:

[root@vps-fra-01 log]# mail root
Subject: Test Mail
This is the mail body
Who are you?: Permission denied
[root@vps-fra-01 log]#

As you can see this is the error I get: “Who are you?: Permission denied”. Moreover, in the log file there is another error: “makeconnection: service ‘smtp’ unknown”.

/var/log/maillog (mail sent to postmaster ?!?)

May 3 09:48:54 vps-fra-01 sendmail[7417]: t437msGK007417: SYSERR(UID0): Who are you?: Permission denied
May 3 09:48:54 vps-fra-01 sendmail[7417]: t437msGK007417: from=postmaster, size=51, class=0, nrcpts=1, msgid=201505030748.t437msGK007417@vps-fra-01.xxxxx.yyyyy, relay=root@localhost
May 3 09:48:54 vps-fra-01 sendmail[7417]: makeconnection: service “smtp” unknown
May 3 09:48:54 vps-fra-01 sendmail[7419]: t437msZM007419: from=postmaster@vps-fra-01.xxxxx.yyyyy, size=382, class=0, nrcpts=1, msgid=201505030748.t437msGK007417@vps-fra-01.xxxxx.yyyyy, proto=ESMTP, daemon=MTA, relay=localhost.localdomain []
May 3 09:48:54 vps-fra-01 sendmail[7417]: t437msGK007417: to=root, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30051, relay=[] [], dsn=2.0.0, stat=Sent (t437msZM007419 Message accepted for delivery)
May 3 09:48:55 vps-fra-01 sendmail[7420]: t437msZM007419:, delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30623, [], dsn=2.0.0, stat=Sent (OK <15050307-7992-0000-0000-0000017D0B8F>)

Here is my /etc/aliases file


mailer-daemon: postmaster
postmaster: root

bin: root
daemon: root
adm: root
lp: root
sync: root
shutdown: root
halt: root
mail: root
news: root
uucp: root
operator: root
games: root
gopher: root
ftp: root
nobody: root
radiusd: root
nut: root
dbus: root
vcsa: root
canna: root
wnn: root
rpm: root
nscd: root
pcap: root
apache: root
webalizer: root
dovecot: root
fax: root
quagga: root
radvd: root
pvm: root
amanda: root
privoxy: root
ident: root
named: root
xfs: root
gdm: root
mailnull: root
postgres: root
sshd: root
smmsp: root
postfix: root
netdump: root
ldap: root
squid: root
ntp: root
mysql: root
desktop: root
rpcuser: root
rpc: root
nfsnobody: root

ingres: root
system: root
toor: root
manager: root
dumper: root
abuse: root

newsadm: news
newsadmin: news
usenet: news
ftpadm: ftp
ftpadmin: ftp
ftp-adm: ftp
ftp-admin: ftp
www: webmaster
webmaster: root
noc: root
security: root
hostmaster: root
info: postmaster
marketing: postmaster
sales: postmaster
support: postmaster

decode: root


I’ve tried everything, and now I’m out of ideas.
Can someone help me?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
4 answers

@fmondini - Have you tried updating aliases.db by running:


from the CLI? This command rebuilds the database that sendmail uses. If something happened to the db file, this will make sure that whatever you have in /etc/aliases/ is used instead.

Yes, and more than once :-)

I’ve also installed postfix and removed sendmail but with the same effect, therefore I’ve erased postfix and reinstalled sendmail. Result: same error.

I’m using the default config file, except for the line:
define(‘SMART_HOST’, '’)
Obviously, after edit, I’ve run the “make -C /etc/mail” command.

Regards the “service smtp unknown” message: the /etc/services file is ok, I have the two correct lines:
smtp 25/tcp mail
smtp 25/udp mail

The funny things is that I receive the mail, so the aliases “postmaster: root” and “root:” works ok!

Maybe I have some supernatural creature in the VPS?
What about asking to an exorcist? :-)

Hi all… No one with some other ideas on what’s happening here?