Postfix alias problem

Colin Law clanlaw at gmail.com
Tue Nov 24 09:46:31 UTC 2015


Having said previously that I had postfix all working for sending
email from my server I find I cannot get aliases to work.

In /etc/aliases I have
# See man 5 aliases for format
postmaster:    root
root:          clanlaw at gmail.com
testing:       clanlaw at gmail.com

I have run
sudo newaliases
sudo service postfix restart

But when I run
$ echo "Testing email, should go to gmail" | mail -s "testing" testing

it goes to testing@<mydomain>.org.uk and in the log is
Nov 24 09:38:58 10955 postfix/pickup[10740]: D28815D85708: uid=1000 from=<me>
Nov 24 09:38:58 10955 postfix/cleanup[11249]: D28815D85708:
message-id=<20151124093858.D28815D85708 at mydomain.org.uk>
Nov 24 09:38:58 10955 postfix/qmgr[10741]: D28815D85708:
from=<me at mydomain.org.uk>, size=337, nrcpt=1 (queue active)
Nov 24 09:38:59 10955 postfix/smtp[11251]: D28815D85708:
to=<testing at mydomain.org.uk>, orig_to=<testing>,
relay=mx1.ukservers.net[217.10.138.227]:25, delay=0.69,
delays=0.01/0/0.47/0.21, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued
as 6F6AD4A1C4B)
Nov 24 09:38:59 10955 postfix/qmgr[10741]: D28815D85708: removed

Where I intended that it should go to clanlaw at gmail.com

I see
$ postmap -q testing hash:/etc/aliases
clanlaw at gmail.com

$ postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = localhost
inet_protocols = ipv4
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = localdomain, localhost, localhost.localdomain, localhost
myhostname = <mydomain>.org.uk
mynetworks = 127.0.0.0/8
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated
defer_unauth_destination
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

Googling has not yielded anything helpful.  Any suggestions gratefully received.

Colin




More information about the ubuntu-users mailing list