Hello,
I recently had to get Dovecot 1.1.4 to write to a "pop3/imap-before-
smtp" db such that my MTA could permit relay after a successful
authentication with Dovecot.
The 'pop3' and 'imap' processes are executed only after a successful
auth, so replacing them with wrappers which write to the db seemed the
natural choice. Lo and behold, someone thought of something like
this, as the 'mail_executable' directive exists - neat.
Upon inspection of the processes' environment I'm pleased to see that
there's a load of useful information in there. However, one essential
component in my case is the destination network address, which is
missing. I added it with the attached patch, exposed as 'LOCAL_IP'.
Works for me.
Is this something that would be useful to anyone else?
-Mike