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 -------------- next part -------------- A non-text attachment was scrubbed... Name: dovecot-1.1.4-local.ip.patch Type: application/octet-stream Size: 448 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20081020/4b8baf55/attachment-0002.obj> -------------- next part --------------
On 10/20/2008, Mike Malsman (zep at ni.enate.org) wrote:> Is this something that would be useful to anyone else?PopB4smtp is really insecure, and should be avoided if at all possible... so hopefully , it won't be useful to too many people... ;) You really should set up sasl/smtpauth and just deal with the one time pain of changing over... it will be worth it... -- Best regards, Charles
On Mon, 2008-10-20 at 20:02 -0400, Mike Malsman wrote:> 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?OK, added: http://hg.dovecot.org/dovecot-1.1/rev/a5495e3e90c9 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20081029/1935b4fd/attachment-0002.bin>
On 29.Oct.2008, at 11:41 AM, Timo Sirainen wrote:> On Mon, 2008-10-20 at 20:02 -0400, Mike Malsman wrote: >> 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? > > OK, added: http://hg.dovecot.org/dovecot-1.1/rev/a5495e3e90c9Thanks very much, Timo. I know the patch is trivial but it saves me the effort of remembering to patch at all :] -Mike