2010/1/15 <toneeeda...@googlemail.com>: > Postconf -n output > > mydestination = localhost.$mydomain, localhost > mydomain = domain.tld > myhostname = mail.domain.tld > mynetworks = 127.0.0.0/8 172.16.1.0/16 > virtual_alias_maps = > proxy:mysql:$config_directory/mysql/mysql_virtual_alias_maps.cf > virtual_gid_maps = static:12 > virtual_mailbox_base = /ml/vmail > virtual_mailbox_domains = > proxy:mysql:$config_directory/mysql/mysql_virtual_domains_maps.cf > virtual_mailbox_maps = > proxy:mysql:$config_directory/mysql/mysql_virtual_mailbox_maps.cf > virtual_minimum_uid = 5000 > virtual_transport = dovecot > virtual_uid_maps = static:5000 > > > so i am running a virtual setup using mysql for maps. when i try to send an > email to root it gets sent to r...@mail.domain.tld, this email address > doesnt exist, it is a local root account, so i have setup an alias in > /etc/aliases which is root: external_acco...@domain.tld but this doesnt > seem to be working. the mails just sit in the mail queue not being > delivered to the local account. I hope this is enough information for people > to help me.
I'm not 100% confident in my reading of your config, but this is what I think is happening: 1. Mail is submitted for "root" 2. This isn't a qualified email address, so Postfix appends "@$myorigin" (see http://www.postfix.org/postconf.5.html#append_at_myorigin) 3. $myorigin = $myhostname by default, so the recipient address is now r...@mail.domain.tld 4. /etc/aliases is only good for local deliveries, not virtual aliased addresses or virtual mailbox addresses. "Local" addresses are anything at $mydestination. 5. It should be evident that r...@mail.domain.tld isn't considered a local address now. Postfix now has to figure out what Address Class it belongs in, and handle it accordingly. All about address classes: http://www.postfix.org/ADDRESS_CLASS_README.html Now, I don't know what your mysql says about mail.domain.tld as a domain, so I don't know if it'd be treated as a virtual-alias or virtual-mailbox domain - I'm not really sure why it's stuck in the queue. If you want to pass this mail off to an external address, I think you can: 1. Add $myhostname to $mydestination, I believe this is the default configuration (ie. your changes to main.cf caused this breakage). /etc/aliases will then be effective yoshino:~# postconf mydestination # the effective value mydestination = $myhostname, localhost.$mydomain, localhost yoshino:~# postconf -d mydestination # matches the default value mydestination = $myhostname, localhost.$mydomain, localhost 2. Or I think you could add an entry to virtual_alias_maps for r...@mail.domain.tld -> external_acco...@domain.tld. I'm not sure if you'd have to specify mail.domain.tld as a virtual_alias_domain first.