Postfix virtual alias issues [SOLVED]
Thankful for doing backups, I'm re-using the MySQL database for e-mail users and aliases, and I'm following this tutorial
However, I'm stuck when testing the sending and receiving of mail. POP3 works perfectly, so does sending e-mail to a mailbox user, as well as authenticated e-mail. Sending e-mail from an outside server to an alias user on the system doesn't work, and it just bounces back after the e-mail itself has been accepted. This is exactly where I'm stuck.
I've temporarily enabled logging on MySQL so I can see what queries are being made, and for some reason, Postfix seems to switch the sender and the recipient when looking up the alias table when the queue is run – that is, after the message has been queued.
Here are the query reactions to each SMTP command (EHLO and QUIT are omitted, since they didn't produce any reactions in MySQL):
> MAIL FROM:
```
091104 15:05:06 432 Connect postfix@localhost on root_mail
432 Query SELECT
transportFROM
transportWHERE
domain='*'
432 Query SELECT
transportFROM
transportWHERE
domain='*'
433 Connect postfix@localhost on root_mail
433 Query SELECT
domainAS virtual FROM
domainWHERE
domain='example.com' AND
active=1
432 Query SELECT
transportFROM
transportWHERE
domain='sender@example.com'
432 Query SELECT
transportFROM
transportWHERE
domain='example.com'
432 Query SELECT
transportFROM
transportWHERE
domain`='.com'
<quote>> RCPT TO: <email email="recipient@example.org">recipient@example.org</email></quote> ````
091104 15:05:59 433 Query SELECT `domain` AS virtual FROM `domain` WHERE `domain`='example.org' AND `active`=1
432 Query SELECT `transport` FROM `transport` WHERE `domain`='recipient@example.org'
432 Query SELECT `transport` FROM `transport` WHERE `domain`='example.org'
432 Query SELECT `transport` FROM `transport` WHERE `domain`='.org'
432 Query SELECT `transport` FROM `transport` WHERE `domain`='*'
434 Connect postfix@localhost on root_mail
434 Query SELECT `goto` FROM `alias` WHERE `address`='recipient@example.org' AND `active`=1
> DATA
(after sending data)```
091104 15:06:54 433 Query SELECT
domainAS virtual FROM
domainWHERE
domain='example.org' AND
active=1
432 Query SELECT
transportFROM
transportWHERE
domain='recipient@example.org'
432 Query SELECT
transportFROM
transportWHERE
domain='example.org'
432 Query SELECT
transportFROM
transportWHERE
domain='.org'
432 Query SELECT
transportFROM
transportWHERE
domain='*'
435 Connect postfix@localhost on root_mail
435 Query SELECT
maildirFROM
mailboxWHERE
username='recipient@example.org' AND
active=1
435 Query SELECT
maildirFROM
mailboxWHERE
username='@example.org' AND
active=1
434 Query SELECT
gotoFROM
aliasWHERE
address='sender@example.com' AND
active=1
436 Connect postfix@localhost on root_mail
436 Query SELECT
usernameas email FROM
mailboxWHERE
username='sender@example.com' AND
active=1
434 Query SELECT
gotoFROM
aliasWHERE
address='@example.com' AND
active=1
436 Query SELECT
usernameas email FROM
mailboxWHERE
username='@example.com' AND
active=1
091104 15:06:55 433 Query SELECT
domainAS virtual FROM
domainWHERE
domain='example.com' AND
active=1
432 Query SELECT
transportFROM
transportWHERE
domain='sender@example.com'
432 Query SELECT
transportFROM
transportWHERE
domain='example.com'
432 Query SELECT
transportFROM
transportWHERE
domain`='.com'
The "<email email="recipient@example.org">recipient@example.org</email>" exists on the mail system as an alias, the "<email email="sender@example.com">sender@example.com</email>" does not, and the "transport" table is emtpy.
Here is my 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 = mx3.betadome.net Betadome Digital Media support@betadome.com
biff = no
appending .domain is the MUA's job.
appenddotmydomain = no
Uncomment the next line to generate "delayed mail" warnings
delaywarningtime = 4h
readme_directory = /usr/share/doc/postfix
TLS parameters
smtpdtlscertfile = /etc/postfix/smtpd.cert
smtpdtlskeyfile = /etc/postfix/smtpd.key
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.
myhostname = mx3.betadome.net
aliasmaps = hash:/etc/aliases
aliasdatabase = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mx3.betadome.net, nansen.betadome.net, localhost
relayhost =
mynetworks = 127.0.0.0/8
mailboxcommand = procmail -a "$EXTENSION"
mailboxsizelimit = 52428800
recipientdelimiter = +
inetinterfaces = all
htmldirectory = /usr/share/doc/postfix/html
smtpdhelorequired = yes
strictrfc821envelopes = no
unknownlocalrecipientrejectcode = 450
messagesizelimit = 50000000
virtualaliasmaps = proxy:mysql:/etc/postfix/mysql-virtualalias.cf, proxy:mysql:/etc/postfix/mysql-virtualemail2email.cf
virtualmailboxdomains = proxy:mysql:/etc/postfix/mysql-virtualdomains.cf
virtualmailboxmaps = proxy:mysql:/etc/postfix/mysql-virtualmailboxes.cf
virtualmailboxbase = /space/vmail
virtualuidmaps = static:5000
virtualgidmaps = static:5000
smtpdsaslauthenable = yes
brokensaslauthclients = yes
smtpdsaslauthenticated_header = yes
smtpdrecipientrestrictions = permitmynetworks, permitsaslauthenticated, rejectinvalidhostname, rejectrblclient bl.spamcop.net, rejectrblclient zen.spamhaus.org rejectunauth_destination
virtualcreatemaildirsize = yes
virtualmaildirextended = yes
virtualmailboxlimitmaps = proxy:mysql:/etc/postfix/mysql-virtualmailboxlimitmaps.cf
virtualmailboxlimitoverride = yes
virtualmaildirlimitmessage = "The user you are trying to reach is over quota."
virtualoverquotabounce = yes
receiveoverrideoptions = noaddressmappings
checkrecipientmxaccess = pcre:/etc/postfix/sendermxaccess
checkrecipientaccess = pcre:/etc/postfix/senderdomains
smtpddiscardehlokeywords = silent-discard, dsn
virtualaliasdomains =
proxyreadmaps = $localrecipientmaps $mydestination $virtualaliasmaps $virtualaliasdomains $virtualmailboxmaps $virtualmailboxdomains $relayrecipientmaps $relaydomains $canonicalmaps $sendercanonicalmaps $recipientcanonicalmaps $relocatedmaps $transportmaps $mynetworks $virtualmailboxlimitmaps
transportmaps = proxy:mysql:/etc/postfix/mysql-virtualtransports.cf
````
Do let me know if you need to see any of the other config files.
I know this server technically isn't a Linode server, it is supposed to work together with my two Linodes in Dallas when it's back up. Hopefully, some guru here knows what could be wrong.
Thanks in advance for any help.
9 Replies
The system is Debian Lenny on AMD64 (yes, I'm using the 64-bit edition).
I've uploaded "censored" versions of my mysql-virtualalias.cfmysql-virtualdomains.cfmysql-virtualemail2email.cfmysql-virtualmailboxes.cfmysql-virtualmailboxlimitmaps.cfmysql-virtualtransports.cfmain.cfmaster.cf
What does the NDR bounce message indicate is the reason for refused delivery?
What errors are the actual postfix logs showing regarding the rejection?
@skavoovie:
With all the information regarding the sql queries during the smtp transacation that you provided, you neglected to provide the most pertinent information:
What does the NDR bounce message indicate is the reason for refused delivery?
This is what I get sent to the sender e-mail address (even though I sent the message via a telnet session):
<recipient@example.org>: unknown user: "recipient@example.org"</recipient@example.org>
The strange thing is, the recipient address (along with the table lookup) is accepted during the RCPT command. The NDR is sent to the sender e-mail address only after the message has been queued.
@skavoovie:
What errors are the actual postfix logs showing regarding the rejection?
Here are the log entries from the above telnet/SMTP session (sender and recipient addresses have been munged using the same addresses as I provided in the sample session):
Nov 4 15:04:58 nansen postfix/smtpd[17719]: connect from home.neonnero.net[213.184.207.93]
Nov 4 15:05:59 nansen postfix/smtpd[17719]: 9DDA06C805B: client=home.neonnero.net[213.184.207.93]
Nov 4 15:06:54 nansen postfix/cleanup[17724]: 9DDA06C805B: message-id=<20091104140559.9DDA06C805B@mx3.betadome.net>
Nov 4 15:06:54 nansen postfix/qmgr[17704]: 9DDA06C805B: from=<sender@example.com>, size=417, nrcpt=1 (queue active)
Nov 4 15:06:54 nansen postfix/virtual[17726]: 9DDA06C805B: to=<recipient@example.org>, relay=virtual, delay=108, delays=108/0.01/0/0.03, dsn=5.1.1, status=bounced (unknown user: "recipient@example.org")
Nov 4 15:06:54 nansen postfix/cleanup[17724]: F035C6C8066: message-id=<20091104140654.F035C6C8066@mx3.betadome.net>
Nov 4 15:06:55 nansen postfix/qmgr[17704]: F035C6C8066: from=<>, size=2218, nrcpt=1 (queue active)
Nov 4 15:06:55 nansen postfix/bounce[17727]: 9DDA06C805B: sender non-delivery notification: F035C6C8066
Nov 4 15:06:55 nansen postfix/qmgr[17704]: 9DDA06C805B: removed
Nov 4 15:06:55 nansen postfix/smtp[17728]: F035C6C8066: to=<sender@example.com>, relay=gentoo.intrahouse.no[213.184.199.51]:25, delay=0.13, delays=0.02/0.01/0.01/0.09, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 594F7634001)
Nov 4 15:06:55 nansen postfix/qmgr[17704]: F035C6C8066: removed
Nov 4 15:07:27 nansen postfix/smtpd[17719]: disconnect from home.neonnero.net[213.184.207.93]</sender@example.com></recipient@example.org></sender@example.com>
Also of interest is that you have defined a soft reject for unknownlocalrecipientrejectcode = 450. You definitely want an unknown local recipient to be a hard reject (5xx series response code). Making it a soft reject is not something you would want to do in production (if the user is invalid, don't keep trying later!).
The only thing I can think of without seeing the debug output, is that not rejecting outright a domain/user appears to be occurring. That being said, you might want to put the following two parameters in your smtpdrecipientrestrictions declaration -- it reduces resources on your production MTA and might provide additional insight into this issue:
rejectunknownrecipient_domain,
rejectunverifiedrecipient,
I would stick before your RBL rejects, and after your rejectinvalidhostname for cost and speed best use. This may help isolate where the break occurs, and if not, at least it will improve and harden your MTA.
info on those two parameters:
The reason for those settings, is that I copied them from the configuration of an existing server on the same network that has a similar setup. Everything works properly on that other server, but not on mine. For all I know, there might be some hidden setting elsewhere on the system (ie. not in main.cf) that I don't know about.
While I was already editing main.cf, I added the IP of the server I'm testing from to the debugpeerlist, just to provide a debug output. Here goes (unmunged this time – sender is
Nov 9 19:43:30 nansen postfix/smtpd[8115]: connect from post3.by.com[213.184.199.56]
Nov 9 19:43:30 nansen postfix/smtpd[8115]: match_hostname: post3.by.com ~? 127.0.0.0/8
Nov 9 19:43:30 nansen postfix/smtpd[8115]: match_hostaddr: 213.184.199.56 ~? 127.0.0.0/8
Nov 9 19:43:30 nansen postfix/smtpd[8115]: match_list_match: post3.by.com: no match
Nov 9 19:43:30 nansen postfix/smtpd[8115]: match_list_match: 213.184.199.56: no match
Nov 9 19:43:30 nansen postfix/smtpd[8115]: auto_clnt_open: connected to private/anvil
Nov 9 19:43:30 nansen postfix/smtpd[8115]: send attr request = connect
Nov 9 19:43:30 nansen postfix/smtpd[8115]: send attr ident = smtp:213.184.199.56
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/anvil: wanted attribute: status
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: status
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute value: 0
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/anvil: wanted attribute: count
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: count
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute value: 1
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/anvil: wanted attribute: rate
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: rate
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute value: 1
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/anvil: wanted attribute: (list terminator)
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: (end)
Nov 9 19:43:30 nansen postfix/smtpd[8115]: > post3.by.com[213.184.199.56]: 220 mx3.betadome.net Betadome Digital Media support@betadome.com
Nov 9 19:43:30 nansen postfix/smtpd[8115]: name_mask: silent-discard
Nov 9 19:43:30 nansen postfix/smtpd[8115]: name_mask: dsn
Nov 9 19:43:30 nansen postfix/smtpd[8115]: watchdog_pat: 0x7f7e0f1651f0
Nov 9 19:43:30 nansen postfix/smtpd[8115]: < post3.by.com[213.184.199.56]: EHLO post3.by.com
Nov 9 19:43:30 nansen postfix/smtpd[8115]: > post3.by.com[213.184.199.56]: 250-mx3.betadome.net
Nov 9 19:43:30 nansen postfix/smtpd[8115]: > post3.by.com[213.184.199.56]: 250-PIPELINING
Nov 9 19:43:30 nansen postfix/smtpd[8115]: > post3.by.com[213.184.199.56]: 250-SIZE 50000000
Nov 9 19:43:30 nansen postfix/smtpd[8115]: > post3.by.com[213.184.199.56]: 250-VRFY
Nov 9 19:43:30 nansen postfix/smtpd[8115]: > post3.by.com[213.184.199.56]: 250-ETRN
Nov 9 19:43:30 nansen postfix/smtpd[8115]: > post3.by.com[213.184.199.56]: 250-STARTTLS
Nov 9 19:43:30 nansen postfix/smtpd[8115]: > post3.by.com[213.184.199.56]: 250-AUTH LOGIN PLAIN
Nov 9 19:43:30 nansen postfix/smtpd[8115]: match_list_match: post3.by.com: no match
Nov 9 19:43:30 nansen postfix/smtpd[8115]: match_list_match: 213.184.199.56: no match
Nov 9 19:43:30 nansen postfix/smtpd[8115]: > post3.by.com[213.184.199.56]: 250-AUTH=LOGIN PLAIN
Nov 9 19:43:30 nansen postfix/smtpd[8115]: > post3.by.com[213.184.199.56]: 250-ENHANCEDSTATUSCODES
Nov 9 19:43:30 nansen postfix/smtpd[8115]: > post3.by.com[213.184.199.56]: 250 8BITMIME
Nov 9 19:43:30 nansen postfix/smtpd[8115]: watchdog_pat: 0x7f7e0f1651f0
Nov 9 19:43:30 nansen postfix/smtpd[8115]: < post3.by.com[213.184.199.56]: MAIL FROM: <kimandre@intrahouse.no>SIZE=1342 BODY=7BIT
Nov 9 19:43:30 nansen postfix/smtpd[8115]: extract_addr: input: <kimandre@intrahouse.no>
Nov 9 19:43:30 nansen postfix/smtpd[8115]: smtpd_check_addr: addr=kimandre@intrahouse.no
Nov 9 19:43:30 nansen postfix/smtpd[8115]: connect to subsystem private/rewrite
Nov 9 19:43:30 nansen postfix/smtpd[8115]: send attr request = rewrite
Nov 9 19:43:30 nansen postfix/smtpd[8115]: send attr rule = local
Nov 9 19:43:30 nansen postfix/smtpd[8115]: send attr address = kimandre@intrahouse.no
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/rewrite socket: wanted attribute: flags
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: flags
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute value: 0
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/rewrite socket: wanted attribute: address
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: address
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute value: kimandre@intrahouse.no
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/rewrite socket: wanted attribute: (list terminator)
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: (end)
Nov 9 19:43:30 nansen postfix/smtpd[8115]: rewrite_clnt: local: kimandre@intrahouse.no -> kimandre@intrahouse.no
Nov 9 19:43:30 nansen postfix/smtpd[8115]: send attr request = resolve
Nov 9 19:43:30 nansen postfix/smtpd[8115]: send attr sender =
Nov 9 19:43:30 nansen postfix/smtpd[8115]: send attr address = kimandre@intrahouse.no
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/rewrite socket: wanted attribute: flags
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: flags
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute value: 0
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/rewrite socket: wanted attribute: transport
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: transport
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute value: smtp
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/rewrite socket: wanted attribute: nexthop
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: nexthop
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute value: intrahouse.no
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/rewrite socket: wanted attribute: recipient
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: recipient
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute value: kimandre@intrahouse.no
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/rewrite socket: wanted attribute: flags
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: flags
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute value: 4096
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/rewrite socket: wanted attribute: (list terminator)
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: (end)
Nov 9 19:43:30 nansen postfix/smtpd[8115]: resolve_clnt: `' -> `kimandre@intrahouse.no' -> transp=`smtp' host=`intrahouse.no' rcpt=`kimandre@intrahouse.no' flags= class=default
Nov 9 19:43:30 nansen postfix/smtpd[8115]: ctable_locate: install entry key kimandre@intrahouse.no
Nov 9 19:43:30 nansen postfix/smtpd[8115]: extract_addr: in: <kimandre@intrahouse.no>, result: kimandre@intrahouse.no
Nov 9 19:43:30 nansen postfix/smtpd[8115]: fsspace: .: block size 4096, blocks free 67879587
Nov 9 19:43:30 nansen postfix/smtpd[8115]: smtpd_check_queue: blocks 4096 avail 67879587 min_free 0 msg_size_limit 50000000
Nov 9 19:43:30 nansen postfix/smtpd[8115]: > post3.by.com[213.184.199.56]: 250 2.1.0 Ok
Nov 9 19:43:30 nansen postfix/smtpd[8115]: watchdog_pat: 0x7f7e0f1651f0
Nov 9 19:43:30 nansen postfix/smtpd[8115]: < post3.by.com[213.184.199.56]: RCPT TO: <kimandre@drittmaskin.com>Nov 9 19:43:30 nansen postfix/smtpd[8115]: extract_addr: input: <kimandre@drittmaskin.com>
Nov 9 19:43:30 nansen postfix/smtpd[8115]: smtpd_check_addr: addr=kimandre@drittmaskin.com
Nov 9 19:43:30 nansen postfix/smtpd[8115]: send attr request = rewrite
Nov 9 19:43:30 nansen postfix/smtpd[8115]: send attr rule = local
Nov 9 19:43:30 nansen postfix/smtpd[8115]: send attr address = kimandre@drittmaskin.com
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/rewrite socket: wanted attribute: flags
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: flags
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute value: 0
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/rewrite socket: wanted attribute: address
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: address
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute value: kimandre@drittmaskin.com
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/rewrite socket: wanted attribute: (list terminator)
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: (end)
Nov 9 19:43:30 nansen postfix/smtpd[8115]: rewrite_clnt: local: kimandre@drittmaskin.com -> kimandre@drittmaskin.com
Nov 9 19:43:30 nansen postfix/smtpd[8115]: send attr request = resolve
Nov 9 19:43:30 nansen postfix/smtpd[8115]: send attr sender =
Nov 9 19:43:30 nansen postfix/smtpd[8115]: send attr address = kimandre@drittmaskin.com
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/rewrite socket: wanted attribute: flags
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: flags
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute value: 0
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/rewrite socket: wanted attribute: transport
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: transport
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute value: virtual
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/rewrite socket: wanted attribute: nexthop
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: nexthop
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute value: drittmaskin.com
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/rewrite socket: wanted attribute: recipient
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: recipient
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute value: kimandre@drittmaskin.com
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/rewrite socket: wanted attribute: flags
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: flags
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute value: 1024
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/rewrite socket: wanted attribute: (list terminator)
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: (end)
Nov 9 19:43:30 nansen postfix/smtpd[8115]: resolve_clnt: `' -> `kimandre@drittmaskin.com' -> transp=`virtual' host=`drittmaskin.com' rcpt=`kimandre@drittmaskin.com' flags= class=virtual
Nov 9 19:43:30 nansen postfix/smtpd[8115]: ctable_locate: install entry key kimandre@drittmaskin.com
Nov 9 19:43:30 nansen postfix/smtpd[8115]: extract_addr: in: <kimandre@drittmaskin.com>, result: kimandre@drittmaskin.com
Nov 9 19:43:30 nansen postfix/smtpd[8115]: send attr request = rewrite
Nov 9 19:43:30 nansen postfix/smtpd[8115]: send attr rule = local
Nov 9 19:43:30 nansen postfix/smtpd[8115]: send attr address = double-bounce
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/rewrite socket: wanted attribute: flags
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: flags
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute value: 0
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/rewrite socket: wanted attribute: address
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: address
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute value: double-bounce@mx3.betadome.net
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/rewrite socket: wanted attribute: (list terminator)
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: (end)
Nov 9 19:43:30 nansen postfix/smtpd[8115]: rewrite_clnt: local: double-bounce -> double-bounce@mx3.betadome.net
Nov 9 19:43:30 nansen postfix/smtpd[8115]: >>> START Recipient address RESTRICTIONS <<<
Nov 9 19:43:30 nansen postfix/smtpd[8115]: generic_checks: name=permit_mynetworks
Nov 9 19:43:30 nansen postfix/smtpd[8115]: permit_mynetworks: post3.by.com 213.184.199.56
Nov 9 19:43:30 nansen postfix/smtpd[8115]: match_hostname: post3.by.com ~? 127.0.0.0/8
Nov 9 19:43:30 nansen postfix/smtpd[8115]: match_hostaddr: 213.184.199.56 ~? 127.0.0.0/8
Nov 9 19:43:30 nansen postfix/smtpd[8115]: match_list_match: post3.by.com: no match
Nov 9 19:43:30 nansen postfix/smtpd[8115]: match_list_match: 213.184.199.56: no match
Nov 9 19:43:30 nansen postfix/smtpd[8115]: generic_checks: name=permit_mynetworks status=0
Nov 9 19:43:30 nansen postfix/smtpd[8115]: generic_checks: name=permit_sasl_authenticated
Nov 9 19:43:30 nansen postfix/smtpd[8115]: generic_checks: name=permit_sasl_authenticated status=0
Nov 9 19:43:30 nansen postfix/smtpd[8115]: generic_checks: name=reject_invalid_hostname
Nov 9 19:43:30 nansen postfix/smtpd[8115]: reject_invalid_hostname: post3.by.com
Nov 9 19:43:30 nansen postfix/smtpd[8115]: generic_checks: name=reject_invalid_hostname status=0
Nov 9 19:43:30 nansen postfix/smtpd[8115]: generic_checks: name=reject_unknown_recipient_domain
Nov 9 19:43:30 nansen postfix/smtpd[8115]: reject_unknown_address: kimandre@drittmaskin.com
Nov 9 19:43:30 nansen postfix/smtpd[8115]: ctable_locate: leave existing entry key kimandre@drittmaskin.com
Nov 9 19:43:30 nansen postfix/smtpd[8115]: generic_checks: name=reject_unknown_recipient_domain status=0
Nov 9 19:43:30 nansen postfix/smtpd[8115]: generic_checks: name=reject_unverified_recipient
Nov 9 19:43:30 nansen postfix/smtpd[8115]: reject_unverified_address: kimandre@drittmaskin.com
Nov 9 19:43:30 nansen postfix/smtpd[8115]: connect to subsystem private/verify
Nov 9 19:43:30 nansen postfix/smtpd[8115]: send attr request = query
Nov 9 19:43:30 nansen postfix/smtpd[8115]: send attr address = kimandre@drittmaskin.com
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/verify socket: wanted attribute: status
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: status
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute value: 0
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/verify socket: wanted attribute: recipient_status
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: recipient_status
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute value: 3
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/verify socket: wanted attribute: reason
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: reason
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute value: Address verification in progress
Nov 9 19:43:30 nansen postfix/smtpd[8115]: private/verify socket: wanted attribute: (list terminator)
Nov 9 19:43:30 nansen postfix/smtpd[8115]: input attribute name: (end)
Nov 9 19:43:30 nansen postfix/cleanup[8121]: 7622F6C805D: message-id=<20091109184330.7622F6C805D@mx3.betadome.net>
Nov 9 19:43:30 nansen postfix/qmgr[8111]: 7622F6C805D: from=<double-bounce@mx3.betadome.net>, size=269, nrcpt=1 (queue active)
Nov 9 19:43:31 nansen postfix/smtp[8122]: 7622F6C805D: to=<kimandre@betadome.com>, orig_to=<kimandre@drittmaskin.com>, relay=a.mx.betadome.com[69.12.115.4]:25, delay=1, delays=0.01/0.01/0.85/0.17, dsn=2.0.0, status=deliverable (250 ok)
Nov 9 19:43:31 nansen postfix/qmgr[8111]: 7622F6C805D: removed
Nov 9 19:43:33 nansen postfix/smtpd[8115]: send attr request = query
Nov 9 19:43:33 nansen postfix/smtpd[8115]: send attr address = kimandre@drittmaskin.com
Nov 9 19:43:33 nansen postfix/smtpd[8115]: private/verify socket: wanted attribute: status
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute name: status
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute value: 0
Nov 9 19:43:33 nansen postfix/smtpd[8115]: private/verify socket: wanted attribute: recipient_status
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute name: recipient_status
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute value: 0
Nov 9 19:43:33 nansen postfix/smtpd[8115]: private/verify socket: wanted attribute: reason
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute name: reason
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute value: 250 ok
Nov 9 19:43:33 nansen postfix/smtpd[8115]: private/verify socket: wanted attribute: (list terminator)
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute name: (end)
Nov 9 19:43:33 nansen postfix/smtpd[8115]: generic_checks: name=reject_unverified_recipient status=0
Nov 9 19:43:33 nansen postfix/smtpd[8115]: generic_checks: name=reject_rbl_client
Nov 9 19:43:33 nansen postfix/smtpd[8115]: reject_rbl: Client host 213.184.199.56
Nov 9 19:43:33 nansen postfix/smtpd[8115]: dns_query: 56.199.184.213.bl.spamcop.net (A): Host not found
Nov 9 19:43:33 nansen postfix/smtpd[8115]: ctable_locate: install entry key 56.199.184.213.bl.spamcop.net
Nov 9 19:43:33 nansen postfix/smtpd[8115]: generic_checks: name=reject_rbl_client status=0
Nov 9 19:43:33 nansen postfix/smtpd[8115]: generic_checks: name=reject_rbl_client
Nov 9 19:43:33 nansen postfix/smtpd[8115]: reject_rbl: Client host 213.184.199.56
Nov 9 19:43:33 nansen postfix/smtpd[8115]: dns_query: 56.199.184.213.zen.spamhaus.org (A): Host not found
Nov 9 19:43:33 nansen postfix/smtpd[8115]: ctable_locate: install entry key 56.199.184.213.zen.spamhaus.org
Nov 9 19:43:33 nansen postfix/smtpd[8115]: generic_checks: name=reject_rbl_client status=0
Nov 9 19:43:33 nansen postfix/smtpd[8115]: generic_checks: name=reject_unauth_destination
Nov 9 19:43:33 nansen postfix/smtpd[8115]: reject_unauth_destination: kimandre@drittmaskin.com
Nov 9 19:43:33 nansen postfix/smtpd[8115]: permit_auth_destination: kimandre@drittmaskin.com
Nov 9 19:43:33 nansen postfix/smtpd[8115]: ctable_locate: leave existing entry key kimandre@drittmaskin.com
Nov 9 19:43:33 nansen postfix/smtpd[8115]: generic_checks: name=reject_unauth_destination status=0
Nov 9 19:43:33 nansen postfix/smtpd[8115]: >>> END Recipient address RESTRICTIONS <<<
Nov 9 19:43:33 nansen postfix/smtpd[8115]: >>> CHECKING RECIPIENT MAPS <<<
Nov 9 19:43:33 nansen postfix/smtpd[8115]: ctable_locate: leave existing entry key kimandre@drittmaskin.com
Nov 9 19:43:33 nansen postfix/smtpd[8115]: maps_find: recipient_canonical_maps: kimandre@drittmaskin.com: not found
Nov 9 19:43:33 nansen postfix/smtpd[8115]: match_string: drittmaskin.com ~? mx3.betadome.net
Nov 9 19:43:33 nansen postfix/smtpd[8115]: match_string: drittmaskin.com ~? nansen.betadome.net
Nov 9 19:43:33 nansen postfix/smtpd[8115]: match_string: drittmaskin.com ~? localhost
Nov 9 19:43:33 nansen postfix/smtpd[8115]: match_list_match: drittmaskin.com: no match
Nov 9 19:43:33 nansen postfix/smtpd[8115]: maps_find: recipient_canonical_maps: @drittmaskin.com: not found
Nov 9 19:43:33 nansen postfix/smtpd[8115]: mail_addr_find: kimandre@drittmaskin.com -> (not found)
Nov 9 19:43:33 nansen postfix/smtpd[8115]: maps_find: canonical_maps: kimandre@drittmaskin.com: not found
Nov 9 19:43:33 nansen postfix/smtpd[8115]: match_string: drittmaskin.com ~? mx3.betadome.net
Nov 9 19:43:33 nansen postfix/smtpd[8115]: match_string: drittmaskin.com ~? nansen.betadome.net
Nov 9 19:43:33 nansen postfix/smtpd[8115]: match_string: drittmaskin.com ~? localhost
Nov 9 19:43:33 nansen postfix/smtpd[8115]: match_list_match: drittmaskin.com: no match
Nov 9 19:43:33 nansen postfix/smtpd[8115]: maps_find: canonical_maps: @drittmaskin.com: not found
Nov 9 19:43:33 nansen postfix/smtpd[8115]: mail_addr_find: kimandre@drittmaskin.com -> (not found)
Nov 9 19:43:33 nansen postfix/smtpd[8115]: send attr request = lookup
Nov 9 19:43:33 nansen postfix/smtpd[8115]: send attr table = mysql:/etc/postfix/mysql-virtual_alias.cf
Nov 9 19:43:33 nansen postfix/smtpd[8115]: send attr flags = 16448
Nov 9 19:43:33 nansen postfix/smtpd[8115]: send attr key = kimandre@drittmaskin.com
Nov 9 19:43:33 nansen postfix/smtpd[8115]: private/proxymap socket: wanted attribute: status
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute name: status
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute value: 0
Nov 9 19:43:33 nansen postfix/smtpd[8115]: private/proxymap socket: wanted attribute: value
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute name: value
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute value: kimandre@betadome.com
Nov 9 19:43:33 nansen postfix/smtpd[8115]: private/proxymap socket: wanted attribute: (list terminator)
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute name: (end)
Nov 9 19:43:33 nansen postfix/smtpd[8115]: dict_proxy_lookup: table=mysql:/etc/postfix/mysql-virtual_alias.cf flags=lock|fold_fix key=kimandre@drittmaskin.com -> status=0 result=kimandre@betadome.com
Nov 9 19:43:33 nansen postfix/smtpd[8115]: maps_find: virtual_alias_maps: proxy:mysql:/etc/postfix/mysql-virtual_alias.cf(0,lock|fold_fix): kimandre@drittmaskin.com = kimandre@betadome.com
Nov 9 19:43:33 nansen postfix/smtpd[8115]: mail_addr_find: kimandre@drittmaskin.com -> kimandre@betadome.com
Nov 9 19:43:33 nansen postfix/smtpd[8115]: smtpd_check_rewrite: trying: permit_inet_interfaces
Nov 9 19:43:33 nansen postfix/smtpd[8115]: permit_inet_interfaces: post3.by.com 213.184.199.56
Nov 9 19:43:33 nansen postfix/smtpd[8115]: before input_transp_cleanup: cleanup flags = enable_header_body_filter enable_automatic_bcc enable_address_mapping enable_milters
Nov 9 19:43:33 nansen postfix/smtpd[8115]: after input_transp_cleanup: cleanup flags = enable_header_body_filter
Nov 9 19:43:33 nansen postfix/smtpd[8115]: connect to subsystem public/cleanup
Nov 9 19:43:33 nansen postfix/smtpd[8115]: public/cleanup socket: wanted attribute: queue_id
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute name: queue_id
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute value: A03AD6C805D
Nov 9 19:43:33 nansen postfix/smtpd[8115]: public/cleanup socket: wanted attribute: (list terminator)
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute name: (end)
Nov 9 19:43:33 nansen postfix/smtpd[8115]: send attr flags = 130
Nov 9 19:43:33 nansen postfix/smtpd[8115]: A03AD6C805D: client=post3.by.com[213.184.199.56]
Nov 9 19:43:33 nansen postfix/smtpd[8115]: > post3.by.com[213.184.199.56]: 250 2.1.5 Ok
Nov 9 19:43:33 nansen postfix/smtpd[8115]: watchdog_pat: 0x7f7e0f1651f0
Nov 9 19:43:33 nansen postfix/smtpd[8115]: < post3.by.com[213.184.199.56]: DATA
Nov 9 19:43:33 nansen postfix/smtpd[8115]: > post3.by.com[213.184.199.56]: 354 End data with <cr><lf>. <cr><lf>Nov 9 19:43:33 nansen postfix/cleanup[8121]: A03AD6C805D: message-id=<00e101ca616c$7ff6bf80$7fe43e80$@no>
Nov 9 19:43:33 nansen postfix/qmgr[8111]: A03AD6C805D: from=<kimandre@intrahouse.no>, size=1533, nrcpt=1 (queue active)
Nov 9 19:43:33 nansen postfix/smtpd[8115]: public/cleanup socket: wanted attribute: status
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute name: status
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute value: 0
Nov 9 19:43:33 nansen postfix/smtpd[8115]: public/cleanup socket: wanted attribute: reason
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute name: reason
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute value: (end)
Nov 9 19:43:33 nansen postfix/smtpd[8115]: public/cleanup socket: wanted attribute: (list terminator)
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute name: (end)
Nov 9 19:43:33 nansen postfix/smtpd[8115]: > post3.by.com[213.184.199.56]: 250 2.0.0 Ok: queued as A03AD6C805D
Nov 9 19:43:33 nansen postfix/smtpd[8115]: watchdog_pat: 0x7f7e0f1651f0
Nov 9 19:43:33 nansen postfix/smtpd[8115]: < post3.by.com[213.184.199.56]: QUIT
Nov 9 19:43:33 nansen postfix/smtpd[8115]: > post3.by.com[213.184.199.56]: 221 2.0.0 Bye
Nov 9 19:43:33 nansen postfix/smtpd[8115]: match_hostname: post3.by.com ~? 127.0.0.0/8
Nov 9 19:43:33 nansen postfix/smtpd[8115]: match_hostaddr: 213.184.199.56 ~? 127.0.0.0/8
Nov 9 19:43:33 nansen postfix/smtpd[8115]: match_list_match: post3.by.com: no match
Nov 9 19:43:33 nansen postfix/smtpd[8115]: match_list_match: 213.184.199.56: no match
Nov 9 19:43:33 nansen postfix/smtpd[8115]: send attr request = disconnect
Nov 9 19:43:33 nansen postfix/smtpd[8115]: send attr ident = smtp:213.184.199.56
Nov 9 19:43:33 nansen postfix/smtpd[8115]: private/anvil: wanted attribute: status
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute name: status
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute value: 0
Nov 9 19:43:33 nansen postfix/smtpd[8115]: private/anvil: wanted attribute: (list terminator)
Nov 9 19:43:33 nansen postfix/smtpd[8115]: input attribute name: (end)
Nov 9 19:43:33 nansen postfix/smtpd[8115]: disconnect from post3.by.com[213.184.199.56]
Nov 9 19:43:33 nansen postfix/virtual[8123]: A03AD6C805D: to=<kimandre@drittmaskin.com>, relay=virtual, delay=3.3, delays=3.2/0.01/0/0.03, dsn=5.1.1, status=bounced (unknown user: "kimandre@drittmaskin.com")
Nov 9 19:43:33 nansen postfix/cleanup[8121]: AC7866C8069: message-id=<20091109184333.AC7866C8069@mx3.betadome.net>
Nov 9 19:43:33 nansen postfix/qmgr[8111]: AC7866C8069: from=<>, size=3400, nrcpt=1 (queue active)
Nov 9 19:43:33 nansen postfix/bounce[8124]: A03AD6C805D: sender non-delivery notification: AC7866C8069
Nov 9 19:43:33 nansen postfix/qmgr[8111]: A03AD6C805D: removed
Nov 9 19:43:33 nansen postfix/smtp[8122]: AC7866C8069: to=<kimandre@intrahouse.no>, relay=gentoo.intrahouse.no[213.184.199.51]:25, delay=0.12, delays=0.03/0/0.02/0.07, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as A3AD5634002)
Nov 9 19:43:33 nansen postfix/qmgr[8111]: AC7866C8069: removed</kimandre@intrahouse.no></kimandre@drittmaskin.com></kimandre@intrahouse.no></lf></cr></lf></cr></kimandre@drittmaskin.com></kimandre@betadome.com></double-bounce@mx3.betadome.net></kimandre@drittmaskin.com></kimandre@drittmaskin.com></kimandre@drittmaskin.com></kimandre@intrahouse.no></kimandre@intrahouse.no></kimandre@intrahouse.no>
unknown_local_recipient_reject_code = 550
Haven't had a chance to look at the debug output in detail, but it occurs to me that it might be better to crawl before walking with this install.
Is the destination address a virtual or real user?
Do delivery attempts to local users get delivered successfully?
Also, I think these forums get Googled, so I suggest you go ahead and edit your previous unmunged post, save it to a local file, and issue a number of sed -ie or perl -pie commands (if you use perl be sure to protect the @ symbols) against it before your addresses get harvested by spammers.
sed -ie 's/real@address.com/fake@address.com/g' /tmp/yourpost
for instance, for each real email address in the posting, and then paste that munged data back in. Use something simple like
I'll try to take a closer look this evening if I have a chance. This is an interesting one.
If you haven't already, test some local system accounts, and a local virtual domain that is aliased to a local system account as well. Taking the MySQL environment and virtual host out of it is a good way to narrow the variables.
@skavoovie:
Regarding unknownlocalrecipientrejectcode – don't recall if a default will be used (would have to look it up). To be safe, I would suggest uncommenting it and setting it to 550.
unknown_local_recipient_reject_code = 550
nansen:~# postconf -d | grep unknown_local_recipient_reject_code
unknown_local_recipient_reject_code = 550
nansen:~# postconf | grep unknown_local_recipient_reject_code
unknown_local_recipient_reject_code = 550
@skavoovie:
Haven't had a chance to look at the debug output in detail, but it occurs to me that it might be better to crawl before walking with this install.
Is the destination address a virtual or real user?
Do delivery attempts to local users get delivered successfully?
[…]
If you haven't already, test some local system accounts, and a local virtual domain that is aliased to a local system account as well. Taking the MySQL environment and virtual host out of it is a good way to narrow the variables.
I've already tried the other stuff. All mail sent to the local system accounts listed in /etc/aliases is delivered properly (all aliases are redirected to an e-mail address outside the system), as evident by the daily mailings from Logwatch.
The
On that same domain, I also have an actual virtual mailbox account (mainly for testing purposes) -
Virtual aliases is where it all fails, everything else seems to work.
It seemed the culprit was this configuration option:
receive_override_options = no_address_mappings
Removing it (or commenting it out) from main.cf solved the whole problem.
So if any of you have the same problem, you might try that solution.
@NeonNero:
After I posted my same question this weekend on Experts-Exchange.com (essentially giving up on trying to find the solution for free), I finally worked out the problem.
It seemed the culprit was this configuration option:
receive_override_options = no_address_mappings
Removing it (or commenting it out) from main.cf solved the whole problem.
So if any of you have the same problem, you might try that solution.
This fixed my problem, which was:
When I switched from courier to dovecot, when I mailed to an alias, it created the virtual alias email folder, rather than forwarding the email per the mysql intentions. Thanks!