More information:
I cleaned out my logs and restarted all services.
Test user is 'support' and I am replacing my true registered domain name with 'mydomain.net' for the moment.
Code:
mysql> use mail
Database changed
mysql> select * from users;
+------------------------+---------------+
| email | password |
+------------------------+---------------+
| support@mydomain.net | PleaseNoHack |
+------------------------+---------------+
Now let's send to emails, back-to-back, from an outside account (gmail) to support, first as
support@mydomain.net and then as
support@hostname.mydomain.net.
Mail sent to
'support@mydomain.net' never shows up in mutt when I am logged in as 'support' -- but mail sent to
'support@hostname.mydomain.net' *does* show up in mutt when I am logged in as 'support'.
So let's go to the logs! The first thing I notice is that /var/log/mail.info and /var/log/mail.log are *identical*. (I checked with diff(1).) Seems redundant?
Code:
Mar 28 15:10:09 hostname postfix/smtpd[3992]: connect from mail-pw0-f52.google.com[209.85.160.52]
Mar 28 15:10:09 hostname postfix/smtpd[3992]: A6A878772: client=mail-pw0-f52.google.com[209.85.160.52]
Mar 28 15:10:09 hostname postfix/cleanup[3997]: A6A878772: message-id=<ff7aef871003281510k4b0649bel6b0114f5ebfc400f@mail.gmail.com>
Mar 28 15:10:09 hostname postfix/qmgr[2428]: A6A878772: from=<kblinode@gmail.com>, size=2021, nrcpt=1 (queue active)
Mar 28 15:10:09 hostname postfix/pipe[3998]: A6A878772: to=<support@mydomain.net>, relay=dovecot, delay=0.11, delays=0.08/0.01/0/0.02, dsn=2.0.0, status=sent (delivered via dovecot service)
Mar 28 15:10:09 hostname postfix/qmgr[2428]: A6A878772: removed
Mar 28 15:10:39 hostname postfix/smtpd[3992]: disconnect from mail-pw0-f52.google.com[209.85.160.52]
Mar 28 15:11:50 hostname postfix/smtpd[3992]: connect from mail-pw0-f49.google.com[209.85.160.49]
Mar 28 15:11:50 hostname postfix/smtpd[3992]: 2813A8772: client=mail-pw0-f49.google.com[209.85.160.49]
Mar 28 15:11:50 hostname postfix/cleanup[4173]: 2813A8772: message-id=<ff7aef871003281511j142d9337v29442c54de966708@mail.gmail.com>
Mar 28 15:11:50 hostname postfix/qmgr[2428]: 2813A8772: from=<kblinode@gmail.com>, size=2076, nrcpt=1 (queue active)
Mar 28 15:11:50 hostname postfix/local[4174]: 2813A8772: to=<support@hostname.mydomain.net>, relay=local, delay=0.12, delays=0.11/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Mar 28 15:11:50 hostname postfix/qmgr[2428]: 2813A8772: removed
Mar 28 15:12:20 hostname postfix/smtpd[3992]: disconnect from mail-pw0-f49.google.com[209.85.160.49]
As you can see, mail sent to
support@mydomain.net is being handled by dovecot, which I would expect based on the MySQL setup. The logs even say it was delivered, but I don't see it in mutt or for that matter in /var/mail/support.
But mail sent to
support@hostname.mydomain.net is being handled by a local relay *independent* of dovecot and *is* appearing in /var/mail/support and therefore also in mutt.
I do notice the following lines in /etc/postfix/main.cf:
Code:
...
myhostname = hostname.mydomain.net
...
mydestination = hostname.mydomain.net, localhost, localhost.localdomain
...
where 'hostname' is the host name in /etc/hostname. Could that be the problem? I based that on
http://library.linode.com/email/postfix/postfix-dovecot-mysql-ubuntu-9.10-karmic#configure_postfix_to_work_with_mysql.
I want all my mail handled by postfix+dovecot. Please help if you can.
Thanks.