With postfix on a ubuntu server (12.04), email that should be sent to root ends up being sent to nobody. Why? And how can I make sure it gets directed to an actual account?
My /etc/aliases file looks like this:
# Mail aliases for sendmail
#
# You must run newaliases(1) after making changes to this file.
#
# Required aliases
postmaster: root
MAILER-DAEMON: postmaster
# Common aliases
abuse: postmaster
spam: postmaster
# Other aliases
admin: DrSAR
To me this means that mail to postmaster
(non-existent user) should be directed to root
. That is not where it arrives though. I can see mail arriving in /var/spool/mail/nobody
.
I checked and there is no /root/.forward
file. So the mail is also not manually redirected to nobody (or some other unknown username).
What other settings affect the re-direction of mail?
Some diagnostic info:
root@SERVER:~# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = $myhostname, localhost.localdomain, localhost.localdomain, localhost, $mydomain
mydomain = FQDN.SERVER.COM
myhostname = FQDN.SERVER.COM
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = $mydomain
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
and some log output for a message that was sent to root@localhost
Jul 15 10:16:23 localhost postfix/smtpd[26006]: connect from localhost[127.0.0.1]
Jul 15 10:16:23 localhost postfix/smtpd[26006]: AE3AD3920547: client=localhost[127.0.0.1]
Jul 15 10:16:24 localhost postfix/smtpd[26006]: disconnect from localhost[127.0.0.1]
Jul 15 10:16:24 localhost postfix/pickup[20987]: 367A73900028: uid=1000 from=<DrSAR@localhost.localdomain>
Jul 15 10:16:24 localhost postfix/cleanup[26008]: 367A73900028: message-id=<alpine.DEB.2.02.1307151016060.25996@localhost.localdomain>
Jul 15 10:16:24 localhost postfix/qmgr[20988]: 367A73900028: from=<DrSAR@localhost.localdomain>, size=676, nrcpt=1 (queue active)
Jul 15 10:16:24 localhost postfix/local[26011]: 367A73900028: to=<root@localhost.localdomain>, relay=local, delay=0.97, delays=0.86/0/0/0.11, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")
Jul 15 10:16:24 localhost postfix/qmgr[20988]: 367A73900028: removed
sudo newaliases
after editing thealiases
file? This generates a Postfix-specific aliases.db file to use at runtime.postconf -n
and 2) a full list of events in/var/log/mail.log
about a message delivery that was wrong.sudo newaliases
just in case. However, mail sent to root@localhost still arrives in the nobody mail file. I have also edited my question to include the requested postconf output and logs,procmail
as MDA. Because of that, mail is redirected to nobody by design. grox.net/doc/postfix/html/faq.html#root