Question

Postfix issue - mail is being delivered to the wrong mailbox, and others are being dropped

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 ‘body_0’ 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 virtual_alias_domains 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: smfi_getsymval failed for {if_addr} 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 - FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS,TVD_SPACE_RATIO,T_DKIM_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

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no

appending .domain is the MUA’s job.

append_dot_mydomain = no

Uncomment the next line to generate “delayed mail” warnings

#delay_warning_time = 4h

readme_directory = no

TLS parameters

smtpd_tls_cert_file = /etc/postfix/postfix.cert.pem smtpd_tls_key_file = /etc/postfix/postfix.key.pem smtpd_use_tls = yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

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

information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination myhostname = benwilding.com alias_maps = hash:/etc/aliases alias_database = 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 mailbox_size_limit = 0 recipient_delimiter = + inet_protocols = all virtual_alias_maps = hash:/etc/postfix/virtual sender_bcc_maps = hash:/etc/postfix/bcc home_mailbox = Maildir/ smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous broken_sasl_auth_clients = yes smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination allow_percent_hack = no milter_default_action = accept milter_protocol = 2 smtpd_milters = local:/var/run/milter-greylist/milter-greylist.sock non_smtpd_milters = local:/var/run/milter-greylist/milter-greylist.sock smtpd_tls_CAfile = /etc/postfix/postfix.ca.pem smtpd_tls_mandatory_protocols = SSLv3, TLSv1 smtpd_tls_mandatory_ciphers = 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


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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