Sending remote IP address to Dovecot IMAP
In version 9.7.7, we've added a feature that allows WebMail Pro to send actual user's IP address to Dovecot IMAP server, rather than IP addres of WebMail Pro installation. Technically that means sending the following command to the server:
ID ("x-originating-ip" "y.y.y.y")
To enable this feature, set ImapSendOriginatingIP to true in data/settings/modules/Mail.config.json file.
You'll also need to add WebMail Pro installation's IP to login_trusted_networks configuration option of Dovecot. For example in case of Dovecot 2.3:
# Example; replace with WebMail Pro server IP address
login_trusted_networks = 192.0.2.10
Only specific WebMail Pro server should be trusted, even 127.0.0.1 address should be explicitly added if Dovecot and WebMail Pro are on the same system.
After these changes, debug logs of WebMail Pro should now have ID command, and Dovecot logs would contain user's IP address in rip.