[Dovecot] per-user delivery to commands
Hi, we are using dovecot IMAP in a complex virtual setup with almost 4000 accounts; postfix hands over to deliver for local delivery into a home directory as stored in the SQL database. That's /srv/vmail/$DOMAIN/$LOCALPART for most of them, but I'd rather not hardcode this scheme anywhere as it's in SQL.
By a policy change, we need to insert a filter in this chain and the filter must be called in such a way that it knows where to find the "home" directory since the command needs to read a configuration file in ~/.mailfilt.rc.
Thus I am looking for a way to make deliver pass incoming messages via this filter, but I cannot find any way to do that. Ideally I want this to happen before the LDA runs the mail through sieve.
As an alternative, is there a command I can call to make dovecot look up $HOME for me so that I can use the dovecot data in the SQL database without making assumptions about the representation? A command that would proxy and convert my request into an SQL select as per dovecot.conf and feed back the result? Then I could use a Maildir delivery programme or even procmail to do the delivery according to the dovecot configruation.
Thanks for any insights, hints, tips, help, jokes, flames, and useful information.
-- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
spamtraps: madduck.bogus@madduck.net
will kill for oil!
also sprach martin f krafft <madduck@madduck.net> [2007.05.20.1843 +0200]:
Hi, we are using dovecot IMAP in a complex virtual setup with almost 4000 accounts; postfix hands over to deliver for local delivery into a home directory as stored in the SQL database. That's /srv/vmail/$DOMAIN/$LOCALPART for most of them, but I'd rather not hardcode this scheme anywhere as it's in SQL.
/srv/vmail/$DOMAIN/$LOCALPART/Maildir/
since …
By a policy change, we need to insert a filter in this chain and the filter must be called in such a way that it knows where to find the "home" directory since the command needs to read a configuration file in ~/.mailfilt.rc.
/srv/vmail/$DOMAIN/$LOCALPART/ is the home directory allowing for such things as sieve scripts etc for virtual users. I am not sure whether this actually works yet.
-- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
spamtraps: madduck.bogus@madduck.net
"first get your facts; then you can distort them at your leisure." -- mark twain
participants (1)
-
martin f krafft