Postfix virtual alias issues [SOLVED]

I'm in the process of re-setting up a server of mine due to a serious harddrive crash, and I'm currently banging my head against the wall trying to set up Postfix with MySQL virtual users and aliases on Debian (the previous version of this server was on Gentoo).

Thankful for doing backups, I'm re-using the MySQL database for e-mail users and aliases, and I'm following this tutorial to a certain degree (of course, adjusting for my database and directory structure), and have just finished page 2 of that tutorial. I'm stuck doing the tutorial because I didn't have a backup of the entire /etc (only the Apache and Bind configs were backed up there), and the entire harddisk was wiped in the crash.

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: [email protected] ``` 091104 15:05:06 432 Connect [email protected] on root_mail 432 Query SELECTtransportFROMtransportWHEREdomain='*' 432 Query SELECTtransportFROMtransportWHEREdomain='*' 433 Connect [email protected] on root_mail 433 Query SELECTdomainAS virtual FROMdomainWHEREdomain='example.com' ANDactive=1 432 Query SELECTtransportFROMtransportWHEREdomain='[email protected]' 432 Query SELECTtransportFROMtransportWHEREdomain='example.com' 432 Query SELECTtransportFROMtransportWHEREdomain`='.com'

 <quote>> RCPT TO: <email email="[email protected]">[email protected]</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`='[email protected]'
                    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     [email protected] on root_mail
                    434 Query       SELECT `goto` FROM `alias` WHERE `address`='[email protected]' AND `active`=1

> DATA (after sending data)``` 091104 15:06:54 433 Query SELECTdomainAS virtual FROMdomainWHEREdomain='example.org' ANDactive=1 432 Query SELECTtransportFROMtransportWHEREdomain='[email protected]' 432 Query SELECTtransportFROMtransportWHEREdomain='example.org' 432 Query SELECTtransportFROMtransportWHEREdomain='.org' 432 Query SELECTtransportFROMtransportWHEREdomain='*' 435 Connect [email protected] on root_mail 435 Query SELECTmaildirFROMmailboxWHEREusername='[email protected]' ANDactive=1 435 Query SELECTmaildirFROMmailboxWHEREusername='@example.org' ANDactive=1 434 Query SELECTgotoFROMaliasWHEREaddress='[email protected]' ANDactive=1 436 Connect [email protected] on root_mail 436 Query SELECTusernameas email FROMmailboxWHEREusername='[email protected]' ANDactive=1 434 Query SELECTgotoFROMaliasWHEREaddress='@example.com' ANDactive=1 436 Query SELECTusernameas email FROMmailboxWHEREusername='@example.com' ANDactive=1 091104 15:06:55 433 Query SELECTdomainAS virtual FROMdomainWHEREdomain='example.com' ANDactive=1 432 Query SELECTtransportFROMtransportWHEREdomain='[email protected]' 432 Query SELECTtransportFROMtransportWHEREdomain='example.com' 432 Query SELECTtransportFROMtransportWHEREdomain`='.com'

The "<email email="[email protected]">[email protected]</email>" exists on the mail system as an alias, the "<email email="[email protected]">[email protected]</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

Some expanded information, if someone is still interested in helping me solve this issue (I've also posted my request on Usenet in alt.comp.mail.postfix, just in case):

The system is Debian Lenny on AMD64 (yes, I'm using the 64-bit edition).

I've uploaded "censored" versions of my mysql-virtualalias.cf, mysql-virtualdomains.cf, mysql-virtualemail2email.cf, mysql-virtualmailboxes.cf, mysql-virtualmailboxlimitmaps.cf and mysql-virtualtransports.cf, as well as main.cf and master.cf.

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?

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):

<[email protected]>: unknown user: "[email protected]"</[email protected]>

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=<[email protected]>
Nov  4 15:06:54 nansen postfix/qmgr[17704]: 9DDA06C805B: from=<[email protected]>, size=417, nrcpt=1 (queue active)
Nov  4 15:06:54 nansen postfix/virtual[17726]: 9DDA06C805B: to=<[email protected]>, relay=virtual, delay=108, delays=108/0.01/0/0.03, dsn=5.1.1, status=bounced (unknown user: "[email protected]")
Nov  4 15:06:54 nansen postfix/cleanup[17724]: F035C6C8066: message-id=<[email protected]>
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=<[email protected]>, 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]</[email protected]></[email protected]></[email protected]>

That is a very strange thing to be happening – don't recall reading whether you've put postfix into debug mode or not, but it looks from the output that it probably is not. I don't think this is going to be decipherable without debug mode.

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:

http://www.postfix.org/ADDRESSVERIFICATIONREADME.html

Okay, I've now commented out the unknownlocalrecipientrejectcode line, allowing the default value to shine through, and added the two settings to my smtpdrecipientrestrictions.

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 [email protected], recipient is [email protected]):

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 [email protected]
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: <[email protected]>SIZE=1342 BODY=7BIT
Nov  9 19:43:30 nansen postfix/smtpd[8115]: extract_addr: input: <[email protected]>
Nov  9 19:43:30 nansen postfix/smtpd[8115]: smtpd_check_addr: [email protected]
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 = [email protected]
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: [email protected]
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: [email protected] -> [email protected]
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 = [email protected]
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: [email protected]
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: `' -> `[email protected]' -> transp=`smtp' host=`intrahouse.no' rcpt=`[email protected]' flags= class=default
Nov  9 19:43:30 nansen postfix/smtpd[8115]: ctable_locate: install entry key [email protected]
Nov  9 19:43:30 nansen postfix/smtpd[8115]: extract_addr: in: <[email protected]>, result: [email protected]
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: <[email protected]>Nov  9 19:43:30 nansen postfix/smtpd[8115]: extract_addr: input: <[email protected]>
Nov  9 19:43:30 nansen postfix/smtpd[8115]: smtpd_check_addr: [email protected]
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 = [email protected]
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: [email protected]
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: [email protected] -> [email protected]
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 = [email protected]
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: [email protected]
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: `' -> `[email protected]' -> transp=`virtual' host=`drittmaskin.com' rcpt=`[email protected]' flags= class=virtual
Nov  9 19:43:30 nansen postfix/smtpd[8115]: ctable_locate: install entry key [email protected]
Nov  9 19:43:30 nansen postfix/smtpd[8115]: extract_addr: in: <[email protected]>, result: [email protected]
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: [email protected]
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 -> [email protected]
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: [email protected]
Nov  9 19:43:30 nansen postfix/smtpd[8115]: ctable_locate: leave existing entry key [email protected]
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: [email protected]
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 = [email protected]
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=<[email protected]>
Nov  9 19:43:30 nansen postfix/qmgr[8111]: 7622F6C805D: from=<[email protected]>, size=269, nrcpt=1 (queue active)
Nov  9 19:43:31 nansen postfix/smtp[8122]: 7622F6C805D: to=<[email protected]>, orig_to=<[email protected]>, 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 = [email protected]
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: [email protected]
Nov  9 19:43:33 nansen postfix/smtpd[8115]: permit_auth_destination: [email protected]
Nov  9 19:43:33 nansen postfix/smtpd[8115]: ctable_locate: leave existing entry key [email protected]
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 [email protected]
Nov  9 19:43:33 nansen postfix/smtpd[8115]: maps_find: recipient_canonical_maps: [email protected]: 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: [email protected] -> (not found)
Nov  9 19:43:33 nansen postfix/smtpd[8115]: maps_find: canonical_maps: [email protected]: 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: [email protected] -> (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 = [email protected]
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: [email protected]
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 [email protected] -> status=0 [email protected]
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): [email protected] = [email protected]
Nov  9 19:43:33 nansen postfix/smtpd[8115]: mail_addr_find: [email protected] -> [email protected]
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=<[email protected]>
Nov  9 19:43:33 nansen postfix/qmgr[8111]: A03AD6C805D: from=<[email protected]>, 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=<[email protected]>, relay=virtual, delay=3.3, delays=3.2/0.01/0/0.03, dsn=5.1.1, status=bounced (unknown user: "[email protected]")
Nov  9 19:43:33 nansen postfix/cleanup[8121]: AC7866C8069: message-id=<[email protected]>
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=<[email protected]>, 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</[email protected]></[email protected]></[email protected]></lf></cr></lf></cr></[email protected]></[email protected]></[email protected]></[email protected]></[email protected]></[email protected]></[email protected]></[email protected]></[email protected]>

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

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/[email protected]/[email protected]/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 [email protected] for that one address, etc. No telling how much spam those addresses will get if they get harvested.

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 [email protected] address is a virtual alias to an external e-mail account (ie. on another server); [email protected].

On that same domain, I also have an actual virtual mailbox account (mainly for testing purposes) - [email protected] - and e-mail to that account is delivered properly.

Virtual aliases is where it all fails, everything else seems to work.

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.

@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!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct