Hello,

I have set up OpenSMTPd to match on a SQLite databae of virtual users
and invoke an lmtp action as follows:

----------------------
table virtual-users sqlite:/etc/smtpd-sqlite.conf

action "lmtp_dovecot" lmtp "/run/dovecot/lmtp" rcpt-to userbase
<virtual-users>

match from any for domain <virtual-users> rcpt-to <virtual-users>
action "lmtp_dovecot"
----------------------

Here an extract of the log showing the matches and subsequent
expand_insert when receiving and "RCPT TO:<[email protected]>":

---------------
lookup: match "aribaud.net" as domain in table proc:virtual-users ->
true
lookup: match "[email protected]" as mailaddr in table proc:virtual-
users -> true
rule #1 matched: match from any for domain virtual-users rcpt-to
virtual-users action lmtp_dovecot
expand: 0xaaaadba55578: expand_insert() called for
username:albert[parent=0xaaaadb9f27e0, rule=0xaaaadb9ea490,
dispatcher=0xaaaadb9ea560]
expand: 0xaaaadba55578: inserted node 0xaaaadb9f2d50
expand: lka_expand: username: albert [depth=1, sameuser=0]
lookup: lookup "albert" as userinfo in table proc:virtual-users -> none
--------------

I can see that the virtual-users table properly returns success for the
domain  query on "aribaud.net", and also returning success for the
mailaddr query on "[email protected]".

But then, the userinfo query is done on "albert" alone, which won't
work because the database contains user info for [email protected],
not for albert.

Is there a way to get OpenSMTPd to look up userinfo using the complete
email address as the key?

Regards,
Albert.

Reply via email to