gurucc
By:
gurucc

Postfix driving me mad! - Can someone please help me figure out why mail is being delivered to the wrong mailbox, and others are being dropped?

June 22, 2016 1.1k views
Email Messaging Applications Miscellaneous Configuration Management Ubuntu

Hi all,

Hopefully you can help me out with this problem that's been driving me crazy for days..
I have three domains on a VPS -
benwilding.com, wildthing.productions and chriswaite.com.au
I've installed Ubuntu 14.04, Webmin, Virtualmin, LAMP, configured firewall etc.
The problem I'm having is that mail doesn't seem to work properly - in fact, it delivers to the wrong email address.

If I send an email to ben@wildthing.productions, it disappears, but if I send an email to ben@benwilding.com, it delivers to ben@wildthing.productions.

I've deleted / messed around with the postfix virtual file and just don't seem to be getting anywhere.

*Contents of mail.log: *

Jun 22 16:38:26 wildthing milter-greylist: cannot read dumpfile "/var/lib/milter-greylist/greylist.db"
Jun 22 16:38:26 wildthing milter-greylist: starting with an empty greylist
Jun 22 16:38:26 wildthing opendkim[1663]: OpenDKIM Filter v2.9.1 starting (args: -x /etc/opendkim.conf -u opendkim -P /var/run/opendkim/opendkim.pid -p local:/var/run/opendkim/opendkim.sock)
Jun 22 16:38:26 wildthing postfix/master[1764]: daemon started -- version 2.11.0, configuration /etc/postfix
Jun 22 16:38:34 wildthing spamd[2118]: logger: removing stderr method
Jun 22 16:38:35 wildthing dovecot: master: Dovecot v2.2.9 starting up (core dumps disabled)
Jun 22 16:38:35 wildthing spamd[2120]: zoom: able to use 319/360 'body0' compiled rules (88.611%)
Jun 22 16:38:35 wildthing spamd[2120]: spamd: server started on IO::Socket::INET6 [127.0.0.1]:783, IO::Socket::INET6 [::1]:783 (running version 3.4.0)
Jun 22 16:38:35 wildthing spamd[2120]: spamd: server pid: 2120
Jun 22 16:38:35 wildthing spamd[2120]: spamd: server successfully spawned child process, pid 2125
Jun 22 16:38:35 wildthing spamd[2120]: spamd: server successfully spawned child process, pid 2128
Jun 22 16:38:35 wildthing spamd[2120]: prefork: child states: IS
Jun 22 16:38:35 wildthing spamd[2120]: prefork: child states: II
Jun 22 16:38:47 wildthing dovecot: imap-login: Login: user=<ben.admin.benwilding.com>, method=PLAIN, rip=58.8.236.213, lip=178.62.67.153, mpid=2239, TLS, session=<fq2/u9814wA6COzV>
Jun 22 16:39:07 wildthing dovecot: imap-login: Login: user=<ben>, method=PLAIN, rip=119.81.31.23, lip=178.62.67.153, mpid=2280, TLS, session=<p9j4vN81xwB3UR8X>
Jun 22 16:39:11 wildthing dovecot: imap-login: Login: user=<ben>, method=PLAIN, rip=119.81.31.23, lip=178.62.67.153, mpid=2282, TLS, session=<B4ozvd81yAB3UR8X>
Jun 22 16:39:33 wildthing dovecot: imap-login: Login: user=<ben.admin.benwilding.com>, method=PLAIN, rip=58.8.236.213, lip=178.62.67.153, mpid=2289, TLS, session=<7Gl/vt81+AA6COzV>
Jun 22 16:41:10 wildthing dovecot: imap(ben.admin.benwilding.com): Disconnected: Logged out in=341 out=1436
Jun 22 16:41:10 wildthing dovecot: imap(ben.admin.benwilding.com): Disconnected: Logged out in=683 out=1679
Jun 22 16:41:33 wildthing dovecot: imap-login: Login: user=<ben>, method=PLAIN, rip=119.81.31.23, lip=178.62.67.153, mpid=2489, TLS, session=<fUGlxd812QB3UR8X>
Jun 22 16:41:33 wildthing dovecot: imap(ben): Disconnected: Logged out in=32 out=438
Jun 22 16:45:35 wildthing dovecot: imap-login: Login: user=<ben>, method=PLAIN, rip=119.81.31.23, lip=178.62.67.153, mpid=3220, TLS, session=<6FYM1N81IQB3UR8X>
Jun 22 16:45:36 wildthing dovecot: imap(ben): Disconnected: Logged out in=32 out=438
Jun 22 16:50:58 wildthing dovecot: imap-login: Login: user=<ben>, method=PLAIN, rip=119.81.31.23, lip=178.62.67.153, mpid=3463, TLS, session=<jqxM5981UAB3UR8X>
Jun 22 17:02:59 wildthing dovecot: imap-login: Login: user=<ben.admin.benwilding.com>, method=PLAIN, rip=58.8.236.213, lip=178.62.67.153, mpid=4484, TLS, session=<YPBMEuA1NwA6COzV>
Jun 22 17:03:11 wildthing dovecot: imap-login: Login: user=<ben.admin.benwilding.com>, method=PLAIN, rip=58.8.236.213, lip=178.62.67.153, mpid=4489, TLS, session=<rckIE+A1PAA6COzV>
Jun 22 17:03:15 wildthing dovecot: imap-login: Login: user=<ben.admin.benwilding.com>, method=PLAIN, rip=58.8.236.213, lip=178.62.67.153, mpid=4491, TLS, session=<RNdHE+A1PgA6COzV>
Jun 22 17:03:28 wildthing dovecot: imap(ben.admin.benwilding.com): Disconnected: Logged out in=283 out=1027
Jun 22 17:03:28 wildthing dovecot: imap(ben.admin.benwilding.com): Disconnected: Logged out in=435 out=1390
Jun 22 17:03:28 wildthing dovecot: imap(ben.admin.benwilding.com): Disconnected: Logged out in=325 out=1134
Jun 22 17:10:24 wildthing postfix/smtpd[5755]: connect from mail-pa0-f42.google.com[209.85.220.42]
Jun 22 17:10:25 wildthing milter-greylist: smfi
getsymval failed for {i}
Jun 22 17:10:25 wildthing postfix/trivial-rewrite[5759]: warning: do not list domain benwilding.com in BOTH mydestination and virtualaliasdomains
Jun 22 17:10:25 wildthing milter-greylist: (unknown id): skipping greylist because this is the default action, (from=guru.cc@gmail.com, rcpt=ben@benwilding.com, addr=mail-pa0-f42.google.com$
Jun 22 17:10:25 wildthing postfix/smtpd[5755]: BEF291257A2: client=mail-pa0-f42.google.com[209.85.220.42]
Jun 22 17:10:26 wildthing postfix/cleanup[5760]: BEF291257A2: message-id=7B9EB118-0837-4C99-AE9C-02264C2777A5@gmail.com
Jun 22 17:10:26 wildthing milter-greylist: smfigetsymval failed for {ifaddr}
Jun 22 17:10:26 wildthing postfix/qmgr[1769]: BEF291257A2: from=guru.cc@gmail.com, size=2572, nrcpt=1 (queue active)
Jun 22 17:10:26 wildthing postfix/smtpd[5755]: disconnect from mail-pa0-f42.google.com[209.85.220.42]
Jun 22 17:10:33 wildthing dovecot: imap-login: Login: user=<ben>, method=PLAIN, rip=119.81.31.23, lip=178.62.67.153, mpid=5784, TLS, session=<gA1WLeA1DAB3UR8X>
Jun 22 17:10:34 wildthing dovecot: imap(ben): Disconnected: Logged out in=32 out=438
Jun 22 17:10:43 wildthing spamd[2125]: spamd: connection from ip6-localhost [::1]:35184 to port 783, fd 6
Jun 22 17:10:43 wildthing dovecot: imap-login: Login: user=<ben>, method=PLAIN, rip=119.81.31.23, lip=178.62.67.153, mpid=5790, TLS, session=<lrrvLeA1DwB3UR8X>
Jun 22 17:10:43 wildthing spamd[2125]: spamd: setuid to ben succeeded
Jun 22 17:10:43 wildthing spamd[2125]: spamd: processing message 7B9EB118-0837-4C99-AE9C-02264C2777A5@gmail.com for ben:1012
Jun 22 17:10:43 wildthing dovecot: imap(ben): Disconnected: Logged out in=32 out=438
Jun 22 17:10:44 wildthing spamd[2125]: spamd: clean message (-0.7/5.0) for ben:1012 in 1.7 seconds, 2787 bytes.
Jun 22 17:10:44 wildthing spamd[2125]: spamd: result: . 0 - FREEMAILFROM,RCVDINDNSWLLOW,RCVDINMSPIKEH3,RCVDINMSPIKEWL,SPFPASS,TVDSPACERATIO,TDKIM_INVALID scantime=1.7,size=2787,us$

**Contents of mail.err - empty file

Contents of postfix main.cf**

See /usr/share/postfix/main.cf.dist for a commented, more complete version

Debian specific: Specifying a file name will cause the first

line of that file to be used as the name. The Debian default

is /etc/mailname.

myorigin = /etc/mailname

smtpdbanner = $myhostname ESMTP $mailname (Ubuntu)
biff = no

appending .domain is the MUA's job.

appenddotmydomain = no

Uncomment the next line to generate "delayed mail" warnings

delaywarningtime = 4h

readme_directory = no

TLS parameters

smtpdtlscertfile = /etc/postfix/postfix.cert.pem
smtpd
tlskeyfile = /etc/postfix/postfix.key.pem
smtpdusetls = yes
smtpdtlssessioncachedatabase = btree:${datadirectory}/smtpdscache
smtptlssessioncachedatabase = btree:${datadirectory}/smtpscache

See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for

information on enabling SSL in the smtp client.

smtpdrelayrestrictions = permitmynetworks permitsaslauthenticated deferunauthdestination
myhostname = benwilding.com
alias
maps = hash:/etc/aliases
aliasdatabase = hash:/etc/aliases
mydestination = benwilding.com, localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox
command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailboxsizelimit = 0
recipientdelimiter = +
inet
protocols = all
virtualaliasmaps = hash:/etc/postfix/virtual
senderbccmaps = hash:/etc/postfix/bcc
homemailbox = Maildir/
smtpd
saslauthenable = yes
smtpdsaslsecurityoptions = noanonymous
broken
saslauthclients = yes
smtpdrecipientrestrictions = permitmynetworks permitsaslauthenticated rejectunauthdestination
allow
percenthack = no
milter
defaultaction = accept
milter
protocol = 2
smtpdmilters = local:/var/run/milter-greylist/milter-greylist.sock
non
smtpdmilters = local:/var/run/milter-greylist/milter-greylist.sock
smtpd
tlsCAfile = /etc/postfix/postfix.ca.pem
smtpd
tlsmandatoryprotocols = SSLv3, TLSv1
smtpdtlsmandatoryciphers = high
notify
classes = bounce, 2bounce, delay, policy, protocol, resource, software
mydomain = localdomain

Contents of /etc/postfix/virtual
benwilding.com benwilding.com
chriswaite.com.au chriswaite.com.au
wildthing.productions wildthing.productions

I've also tried following a guide which had me delete the /etc/postfix/virtual file and create a directory instead, with an addresses and domains file (and hash) inside with minor config changes to the main.cf file.

Please help!!

Cheers
Ben

1 Answer

ps. Sorry about the formatting - I guess it picked up something in the .cf file to make it all bold!

Have another answer? Share your knowledge.