Mail sent from root is sent as postmaster
Posted: 2015/05/17 08:24:38
Some 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)
/var/log/maillog
But now, 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
.
Cc:
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 ?!?)
Here is my /etc/aliases file
/etc/aliases
I've rebuilded the aliases.db file, 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 sendmail.mc config file, except for the line:
define('SMART_HOST', 'ilp-m3.danisoft.net')
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: network@zzzzz.com" works ok!
I've tried everything, but now I'm out of ideas. Can someone help me?
Here is the content of the /var/log/maillog file until two days ago (the correct one)
/var/log/maillog
Code: Select all
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 [127.0.0.1]
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=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (t3R8237o013812 Message accepted for delivery)
Apr 27 04:02:05 vps-fra-01 sendmail[13813]: t3R8237o013812: to=network@zzzzz.com, ctladdr=root@vps-fra-01.xxxxx.yyyyy (0/0), delay=00:00:02, xdelay=00:00:02, mailer=esmtp, pri=58407, relay=ilp-m3.danisoft.net. [194.69.193.213], dsn=2.0.0, stat=Sent (OK <15042708-7992-0000-0000-0000017C1150>)
[root@vps-fra-01 log]# mail root
Subject: Test Mail
This is the mail body
.
Cc:
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 ?!?)
Code: Select all
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 [127.0.0.1]
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=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (t437msZM007419 Message accepted for delivery)
May 3 09:48:55 vps-fra-01 sendmail[7420]: t437msZM007419: to=network@zzzzz.com, delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30623, relay=ilp-m3.danisoft.net. [194.69.193.213], dsn=2.0.0, stat=Sent (OK <15050307-7992-0000-0000-0000017D0B8F>)
/etc/aliases
Code: Select all
mailer-daemon: postmaster
postmaster: root
bin: root
[... some deleted for space reasons ...]
support: postmaster
decode: root
root: network@zzzzz.com
I'm using the default sendmail.mc config file, except for the line:
define('SMART_HOST', 'ilp-m3.danisoft.net')
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: network@zzzzz.com" works ok!
I've tried everything, but now I'm out of ideas. Can someone help me?