Mailing List Archive

spamd with mix of real and virtual users
I'm in the process of setting up virtual users on my mail server. It
looks like I may have a mix of both real and virtual users.

The flow when scanning a message is:

sendmail -> spamass-milter -> spamc -> spamd

spamass-milter looks at the To: header and passes just the user part.
I see a -e option which causes the whole address (user@domainname) to
be passed to spamc. cool.

spamc then will pass that verbatim to spamd.

and here's where my problem begins...

If the user exists locally, I want spamd to use that, but if not, I
want it to use the virtual-config-dir.

but to use --virtual-config-dir option requires I specify a -u option
(pin spamd to run as a specific user).

but there's a -U option which causes spamd to fall back to a specific
user. It would seem like I should be able to specify something like
'-U dovecot-virtual', but no, spamd doesn't allow -U and
--virtual-config-dir options. That seems like an oversight.

I'm wondering if the better solution here is to pull the problem back
a level and have spamass-milter try to look up the local user and fall
back to a fallback user (dovecot-virtual in my case).

Has anyone else tackled this issue?

Michael Grant