On 7 April 2019 17:26 André Rodier via dovecot < [email protected]> wrote:
Dear Dovecot users,
I am running Dovecot 2.2.27 on Debian Stretch, no issue so far.
I wonder if there is a way to pass the remote IP address, in anenvironment variable, in the post login script.
My Post login scripts are working well, except that when the server isaccessed through a webmail (Roundcube or SOGo), the remote IP addressis systematically 127.0.0.1.
The other question I have is, is it possible to pass the user agent ofthe email client used to access the server? I know this can be easilyforged, but I would like to log it.
Thanks for your insight.
--André Rodier
You can use IMAP ID command to pass e.g. x-originating-ip. See https://github.com/dovecot/core/blob/master/src/imap-login/imap-login-cmd-id.c
---
Aki Tuomi
