Hi!
I have OpenSMTPD version 6.8.0.1 running on a FreeBSD 13.0-RELEASE-p6 host with
opensmtpd-extras-table-mysql version 6.7.1.1 and MySQL 5.7.
For web based e-mail account administration, I have installed Postfixadmin
3.3.10.
My opensmtpd.conf:
================================================================================
table domains mysql:/usr/local/etc/mail/mysql.conf
table virtuals mysql:/usr/local/etc/mail/mysql.conf
listen on lo0 port 25
action deliver_to_maildir \
maildir "/usr/vmail/%{dest.domain}/%{dest.user}" \
virtual <virtuals>
match from any \
for domain <domains> \
action deliver_to_maildir
================================================================================
My mysql.conf:
================================================================================
host localhost
username opensmtpd
password ThePassword
database postfixadmin
query_alias SELECT goto FROM alias WHERE address=?;
query_domain SELECT domain FROM domain WHERE domain=?;
================================================================================
Using Postfixadmin, I have created a test domain named mydomain.com, and a test
address named [email protected]. On this level, everything appears to work just
fine. The database tables are as they should, the queries defined in mysql.conf
work as they should, and creating domains and accounts in Postfixadmin works as
it should.
However, when trying to send a test e-mail (either from command line with mail,
or through Postfixadmin's "Send email" function, this happens (taken from smtpd
-vd -T all):
================================================================================
expand: 0x800faa018: expand_insert() called for
address:[email protected][parent=0x0, rule=0x0]
expand: 0x800faa018: inserted node 0x800e38000
expand: lka_expand: address: [email protected] [depth=0]
lookup: match "127.0.0.1" as NETADDR in table static:<anyhost> -> true
lookup: match "mydomain.com" as DOMAIN in table proc:domains -> true
rule #1 matched: match from any for domain domains action deliver_to_maildir
lookup: lookup "[email protected]" as ALIAS in table proc:virtuals ->
"[email protected]"
expand: 0x800e270e0: expand_insert() called for
address:[email protected][parent=0x0, rule=0x0]
expand: 0x800e270e0: inserted node 0x800e38600
expand: 0x800faa018: expand_insert() called for
address:[email protected][parent=0x800e38000, rule=0x800e5e000,
dispatcher=0x800ec58c0]
expand: 0x800faa018: inserted node 0x800e38c00
expand: 0x800e270e0: clearing expand tree
expand: 0x800e270e0: freeing expand tree
debug: aliases_virtual_get: '[email protected]' resolved to 1 nodes
expand: lka_expand: address: [email protected] [depth=1]
lookup: match "local" as NETADDR in table static:<anyhost> -> true
lookup: match "mydomain.com" as DOMAIN in table proc:domains -> true
rule #1 matched: match from any for domain domains action deliver_to_maildir
lookup: lookup "[email protected]" as ALIAS in table proc:virtuals ->
"[email protected]"
expand: 0x800e270e0: expand_insert() called for
address:[email protected][parent=0x0, rule=0x0]
expand: 0x800e270e0: inserted node 0x800e38600
expand: 0x800faa018: expand_insert() called for
address:[email protected][parent=0x800e38c00, rule=0x800e5e000,
dispatcher=0x800ec58c0]
expand: 0x800faa018: inserted node 0x800e39200
expand: 0x800e270e0: clearing expand tree
expand: 0x800e270e0: freeing expand tree
debug: aliases_virtual_get: '[email protected]' resolved to 1 nodes
expand: lka_expand: address: [email protected] [depth=2]
...
expand: lka_expand: address: [email protected] [depth=9]
lookup: match "local" as NETADDR in table static:<anyhost> -> true
lookup: match "mydomain.com" as DOMAIN in table proc:domains -> true
rule #1 matched: match from any for domain domains action deliver_to_maildir
lookup: lookup "[email protected]" as ALIAS in table proc:virtuals ->
"[email protected]"
expand: 0x800e270e0: expand_insert() called for
address:[email protected][parent=0x0, rule=0x0]
expand: 0x800e270e0: inserted node 0x800e38600
expand: 0x800faa018: expand_insert() called for
address:[email protected][parent=0x800e3bc00, rule=0x800e5e000,
dispatcher=0x800ec58c0]
expand: 0x800faa018: inserted node 0x800e3c200
expand: 0x800e270e0: clearing expand tree
expand: 0x800e270e0: freeing expand tree
debug: aliases_virtual_get: '[email protected]' resolved to 1 nodes
expand: lka_expand: node too deep.
mproc: lka -> pony : 54 IMSG_SMTP_EXPAND_RCPT
expand: 0x800faa018: clearing expand tree
imsg: pony <- lka: IMSG_SMTP_EXPAND_RCPT (len=54)
smtp: 0x800f3e000: >>> 524 5.2.4 Mailing list expansion problem:
<[email protected]>
5ecd7b90a05e9ea6 smtp failed-command command="RCPT To:<[email protected]>"
result="524 5.2.4 Mailing list expansion problem: <[email protected]>"
smtp: 0x800f3e000: IO_LOWAT <io:0x800e46100 fd=11 to=300000 fl=W ib=0 ob=0>
smtp: 0x800f3e000: IO_DATAIN <io:0x800e46100 fd=11 to=300000 fl=R ib=6 ob=0>
smtp: 0x800f3e000: <<< DATA
smtp: 0x800f3e000: >>> 503 5.5.4 Invalid command arguments: No recipient
specified
5ecd7b90a05e9ea6 smtp failed-command command="DATA" result="503 5.5.4 Invalid
command arguments: No recipient specified"
smtp: 0x800f3e000: IO_LOWAT <io:0x800e46100 fd=11 to=300000 fl=W ib=0 ob=0>
smtp: 0x800f3e000: IO_DATAIN <io:0x800e46100 fd=11 to=300000 fl=R ib=6 ob=0>
smtp: 0x800f3e000: <<< RSET
smtp: 0x800f3e000: >>> 250 2.0.0 Reset state
================================================================================
I took away the repetitive parts between [depth=2] and [depth=9].
As you can see, the alias lookup appears to work just fine -- but instead of
the message being delivered, the lookup gets repeated ten times after which
OpenSMTPD returns first 5.2.4 and then 5.5.4.
What am I missing here?
Yours,
Jyri