My virtual domain is fine. It can both send and receive mail.
My local domain can send mail, but as far as i can tell, is not receiving mail.
note that both are FQDNs
The postfix logs indicate the mail was delivered:
Code: Select all
Jan 7 16:34:32 thedude postfix/local[15333]: 85E053B0D1: to=<root@localdomain.com>, orig_to=<admin@localdomain.com>, relay=local, delay=0.87, delays=0.62/0.03/0/0.22, dsn=2.0.0, status=sent (delivered to maildir)Conversely, if i grep around for a message in /home/vmail/virtdomain.com/foo/.maildir/ i see the messages in Squirrelmail's inbox in ./cur/
So, I cant find the messages, and obviously neither can squirrelmail as its ./cur/ directory is always empty despite postfix's assertion that the mail was delivered to maildir.
my postfix settings are as follows:
Code: Select all
# postfix -n
postfix: invalid option -- n
postfix: fatal: usage: postfix [-c config_dir] [-Dv] command
thedude home # postconf -n
alias_maps = hash:/usr/local/mailman/data/aliases, mysql:/etc/postfix/mysql-aliases.cf
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
default_destination_concurrency_limit = 10
home_mailbox = .maildir/
html_directory = /usr/share/doc/postfix-2.4.5/html
inet_interfaces = all
local_destination_concurrency_limit = 2
local_recipient_maps = mysql:/etc/postfix/mysql-aliases.cf mysql:/etc/postfix/mysql-virtual-maps.cf unix:passwd.byname
local_transport = local
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mydestination = thedude, localhost.localdomain, localdomain.com
mydomain = localdomain.com
myhostname = thedude.localdomain.com
mynetworks = 67.18.17.0/24, 127.0.0.0/8
newaliases_path = /usr/bin/newaliases
owner_request_special = no
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.4.5/readme
recipient_delimiter = +
relocated_maps = mysql:/etc/postfix/mysql-relocated.cf
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_cert_file = /etc/postfix/newcert.pem
smtpd_tls_key_file = /etc/postfix/newkey.pem
smtpd_tls_loglevel = 3
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/usr/local/mailman/data/virtual-mailman, mysql:/etc/postfix/mysql-virtual.cf
virtual_gid_maps = static:1000
virtual_mailbox_base = /
virtual_mailbox_domains = virtdomain.com
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf
virtual_minimum_uid = 1000
virtual_transport = virtual
virtual_uid_maps = static:1000
Code: Select all
# cat /etc/postfix/master.cf
smtp inet n - n - - smtpd -v
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
showq unix n - n - - showq
error unix - - n - - error
retry unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local -v
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
Code: Select all
# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2560
Server version: 5.0.44-log Gentoo Linux mysql-5.0.44
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use mailsql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+-------------------+
| Tables_in_mailsql |
+-------------------+
| alias |
| relocated |
| transport |
| users |
| virtual |
+-------------------+
5 rows in set (0.00 sec)
mysql> select * from alias;
+----+------------+------------------------+
| id | alias | destination |
+----+------------+------------------------+
| 1 | admin | root@localdomain.com |
| 2 | postmaster | postmaster@localdomain.com |
+----+------------+------------------------+
2 rows in set (0.02 sec)
mysql> select * from relocated;
Empty set (0.00 sec)
mysql> select * from transport;
+----+-------------+-------------+
| id | domain | destination |
+----+-------------+-------------+
| 1 | localdomain.com | local: |
| 2 | virtdomain.com | virtual: |
+----+-------------+-------------+
2 rows in set (0.15 sec)
mysql> select * from users;
+----+--------------------+----------+-------------------+------+------+-------------+------------------------------------------+-------+---------+
| id | email | clear | name | uid | gid | homedir | maildir | quota | postfix |
+----+--------------------+----------+-------------------+------+------+-------------+------------------------------------------+-------+---------+
| 1 | admin@localdomain.com | secret | Foo Q. Public | 1001 | 1001 | /home/foo | /home/foo/.maildir/ | | y |
| 2 | damian@virtdomain | secret | Damian Smith | 1000 | 1000 | /home/vmail | /home/vmail/virtdomain.com/damian/.maildir/ | | y |
+----+--------------------+----------+-------------------+------+------+-------------+------------------------------------------+-------+---------+
2 rows in set (0.01 sec)
mysql> select * from virtual;
Empty set (0.00 sec)
mysql> quit
Bye
Code: Select all
# cat /tmp/postfix_troubles.txt
Jan 7 18:02:51 thedude postfix/local[15580]: private/rewrite socket: wanted attribute: flags
Jan 7 18:02:51 thedude postfix/local[15580]: input attribute name: flags
Jan 7 18:02:51 thedude postfix/local[15580]: input attribute value: 0
Jan 7 18:02:51 thedude postfix/local[15580]: private/rewrite socket: wanted attribute: address
Jan 7 18:02:51 thedude postfix/local[15580]: input attribute name: address
Jan 7 18:02:51 thedude postfix/local[15580]: input attribute value: root@localdomain.com
Jan 7 18:02:51 thedude postfix/local[15580]: private/rewrite socket: wanted attribute: (list terminator)
Jan 7 18:02:51 thedude postfix/local[15580]: input attribute name: (end)
Jan 7 18:02:51 thedude postfix/local[15580]: rewrite_clnt: local: root@localdomain.com -> root@localdomain.com
Jan 7 18:02:51 thedude postfix/local[15580]: tok822_rewrite: result: root@localdomain.com
Jan 7 18:02:51 thedude postfix/local[15580]: send attr request = resolve
Jan 7 18:02:51 thedude postfix/local[15580]: send attr sender =
Jan 7 18:02:51 thedude postfix/local[15580]: send attr address = root@localdomain.com
Jan 7 18:02:51 thedude postfix/local[15580]: private/rewrite socket: wanted attribute: flags
Jan 7 18:02:51 thedude postfix/local[15580]: input attribute name: flags
Jan 7 18:02:51 thedude postfix/local[15580]: input attribute value: 0
Jan 7 18:02:51 thedude postfix/local[15580]: private/rewrite socket: wanted attribute: transport
Jan 7 18:02:51 thedude postfix/local[15580]: input attribute name: transport
Jan 7 18:02:51 thedude postfix/local[15580]: input attribute value: local
Jan 7 18:02:51 thedude postfix/local[15580]: private/rewrite socket: wanted attribute: nexthop
Jan 7 18:02:51 thedude postfix/local[15580]: input attribute name: nexthop
Jan 7 18:02:51 thedude postfix/local[15580]: input attribute value: localdomain.com
Jan 7 18:02:51 thedude postfix/local[15580]: private/rewrite socket: wanted attribute: recipient
Jan 7 18:02:51 thedude postfix/local[15580]: input attribute name: recipient
Jan 7 18:02:51 thedude postfix/local[15580]: input attribute value: root@localdomain.com
Jan 7 18:02:51 thedude postfix/local[15580]: private/rewrite socket: wanted attribute: flags
Jan 7 18:02:51 thedude postfix/local[15580]: input attribute name: flags
Jan 7 18:02:51 thedude postfix/local[15580]: input attribute value: 256
Jan 7 18:02:51 thedude postfix/local[15580]: private/rewrite socket: wanted attribute: (list terminator)
Jan 7 18:02:51 thedude postfix/local[15580]: input attribute name: (end)
Jan 7 18:02:51 thedude postfix/local[15580]: resolve_clnt: `' -> `root@localdomain.com' -> transp=`local' host=`localdomain.com' rcpt=`root@localdomain.com' flags= class=local
Jan 7 18:02:51 thedude postfix/local[15580]: tok822_resolve: from= addr=root@localdomain.com -> chan=local, host=localdomain.com, rcpt=root@localdomain.com
Jan 7 18:02:51 thedude postfix/local[15580]: deliver_recipient[5]: local admin recip root@localdomain.com exten deliver admin@localdomain.com exp_from admin
Jan 7 18:02:51 thedude postfix/local[15580]: been_here: recipient 5 root@localdomain.com: 0
Jan 7 18:02:51 thedude postfix/local[15580]: level: 0
Jan 7 18:02:51 thedude postfix/local[15580]: path: active/DC71E3B0D1
Jan 7 18:02:51 thedude postfix/local[15580]: fp: 0x808db10
Jan 7 18:02:51 thedude postfix/local[15580]: queue_name: active
Jan 7 18:02:51 thedude postfix/local[15580]: queue_id: DC71E3B0D1
Jan 7 18:02:51 thedude postfix/local[15580]: offset: 561
Jan 7 18:02:51 thedude postfix/local[15580]: sender: admin@localdomain.com
Jan 7 18:02:51 thedude postfix/local[15580]: recipient: root@localdomain.com
Jan 7 18:02:51 thedude postfix/local[15580]: domain: localdomain.com
Jan 7 18:02:51 thedude postfix/local[15580]: local: root
Jan 7 18:02:51 thedude postfix/local[15580]: user: root
Jan 7 18:02:51 thedude postfix/local[15580]: extension: null
Jan 7 18:02:51 thedude postfix/local[15580]: unmatched: null
Jan 7 18:02:51 thedude postfix/local[15580]: owner: null
Jan 7 18:02:51 thedude postfix/local[15580]: delivered: admin@localdomain.com
Jan 7 18:02:51 thedude postfix/local[15580]: relay: local
Jan 7 18:02:51 thedude postfix/local[15580]: exp_type: 1
Jan 7 18:02:51 thedude postfix/local[15580]: exp_from: admin
Jan 7 18:02:51 thedude postfix/local[15580]: why: buffer
Jan 7 18:02:51 thedude postfix/local[15580]: deliver_switch[6]: local root recip root@localdomain.com exten deliver admin@localdomain.com exp_from admin
Jan 7 18:02:51 thedude postfix/local[15580]: deliver_alias[7]: local root recip root@localdomain.com exten deliver admin@localdomain.com exp_from admin
Jan 7 18:02:51 thedude postfix/local[15580]: deliver_alias: hash:/usr/local/mailman/data/aliases(0,lock|no_regsub|no_proxy|no_unauth|fold_fix): root not found
Jan 7 18:02:51 thedude postfix/local[15580]: dict_mysql_get_active: found active connection to host unix:/var/run/mysqld/mysqld.sock
Jan 7 18:02:51 thedude postfix/local[15580]: dict_mysql: successful query from host unix:/var/run/mysqld/mysqld.sock
Jan 7 18:02:51 thedude postfix/local[15580]: dict_mysql_lookup: retrieved 0 rows
Jan 7 18:02:51 thedude postfix/local[15580]: deliver_alias: mysql:/etc/postfix/mysql-aliases.cf(0,lock|no_regsub|no_proxy|no_unauth|fold_fix): root not found
Jan 7 18:02:51 thedude postfix/local[15580]: deliver_dotforward[7]: local root recip root@localdomain.com exten deliver admin@localdomain.com exp_from admin
Jan 7 18:02:51 thedude postfix/local[15580]: deliver_dotforward[7]: set user_attr: root
Jan 7 18:02:51 thedude postfix/local[15580]: set_eugid: euid 0 egid 0
Jan 7 18:02:51 thedude postfix/local[15580]: set_eugid: euid 207 egid 207
Jan 7 18:02:51 thedude postfix/local[15580]: deliver_dotforward: path /root/.forward expand_status 0 look_status -1
Jan 7 18:02:51 thedude postfix/local[15580]: deliver_mailbox[7]: local root recip root@localdomain.com exten deliver admin@localdomain.com exp_from admin
Jan 7 18:02:51 thedude postfix/local[15580]: been_here: mailbox root: 0
Jan 7 18:02:51 thedude postfix/local[15580]: deliver_mailbox[7]: set user_attr: root
Jan 7 18:02:51 thedude postfix/local[15580]: deliver_maildir[8]: local root recip root@localdomain.com exten deliver admin@localdomain.com exp_from admin
Jan 7 18:02:51 thedude postfix/local[15580]: set_eugid: euid 0 egid 0
Jan 7 18:02:52 thedude postfix/local[15580]: set_eugid: euid 207 egid 207
Jan 7 18:02:52 thedude postfix/local[15580]: DC71E3B0D1: to=<root@localdomain.com>, orig_to=<admin@localdomain.com>, relay=local, delay=0.17, delays=0.06/0.01/0/0.09, dsn=2.0.0, status=sent (delivered to maildir)
Jan 7 18:02:52 thedude postfix/local[15580]: deliver_request_final: send: "" 0
Jan 7 18:02:52 thedude postfix/local[15580]: send attr status =
Jan 7 18:02:52 thedude postfix/local[15580]: send attr diag_type =
Jan 7 18:02:52 thedude postfix/local[15580]: send attr diag_text =
Jan 7 18:02:52 thedude postfix/local[15580]: send attr mta_type =
Jan 7 18:02:52 thedude postfix/local[15580]: send attr mta_mname =
Jan 7 18:02:52 thedude postfix/local[15580]: send attr action =
Jan 7 18:02:52 thedude postfix/local[15580]: send attr reason =
Jan 7 18:02:52 thedude postfix/local[15580]: send attr status = 0
Jan 7 18:02:52 thedude postfix/qmgr[15568]: DC71E3B0D1: removed
Jan 7 18:02:52 thedude postfix/local[15580]: master_notify: status 1
Jan 7 18:02:52 thedude postfix/local[15580]: connection closed
Jan 7 18:02:52 thedude imapd: LOGOUT, user=admin@localdomain.com, ip=[::ffff:67.18.17.245], headers=0, body=0, time=1
Jan 7 18:02:52 thedude imapd: Connection, ip=[::ffff:67.18.17.245]
Jan 7 18:02:52 thedude imapd: LOGIN, user=admin@localdomain.com, ip=[::ffff:67.18.17.245], protocol=IMAP
Jan 7 18:02:52 thedude imapd: LOGOUT, user=admin@localdomain.com, ip=[::ffff:67.18.17.245], headers=0, body=0, time=0
Jan 7 18:02:56 thedude postfix/local[15580]: rewrite stream disconnect
Jan 7 18:02:56 thedude imapd: Connection, ip=[::ffff:67.18.17.245]
Jan 7 18:02:56 thedude imapd: LOGIN, user=admin@localdomain.com, ip=[::ffff:67.18.17.245], protocol=IMAP
Jan 7 18:02:56 thedude imapd: LOGOUT, user=admin@localdomain.com, ip=[::ffff:67.18.17.245], headers=0, body=0, time=0
Jan 7 18:02:56 thedude imapd: Connection, ip=[::ffff:67.18.17.245]
Jan 7 18:02:56 thedude imapd: LOGIN, user=admin@localdomain.com, ip=[::ffff:67.18.17.245], protocol=IMAP
Jan 7 18:02:56 thedude imapd: LOGOUT, user=admin@localdomain.com, ip=[::ffff:67.18.17.245], headers=0, body=0, time=0
Jan 7 18:02:56 thedude imapd: Connection, ip=[::ffff:67.18.17.245]
Jan 7 18:02:56 thedude imapd: LOGIN, user=admin@localdomain.com, ip=[::ffff:67.18.17.245], protocol=IMAP
Jan 7 18:02:56 thedude imapd: LOGOUT, user=admin@localdomain.com, ip=[::ffff:67.18.17.245], headers=0, body=0, time=0
Jan 7 18:02:56 thedude postfix/smtpd[15569]: auto_clnt_close: disconnect private/tlsmgr stream
Jan 7 18:02:56 thedude postfix/smtpd[15569]: rewrite stream disconnect
Code: Select all
local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.bynameCode: Select all
local_recipient_maps = mysql:/$alias_maps mysql:/$virtual_mailbox_maps unix:passwd.bynameAlso, the troubleshooting section makes references to /var/log/mail.
At least as of 2007.0 they are no longer there.

