afterlogic / webmail-lite-8

Open-source webmail script for existing IMAP server
https://afterlogic.org/webmail-lite-8
GNU Affero General Public License v3.0
336 stars 72 forks source link

sent real ip to imap server #40

Closed cmbilisim closed 5 years ago

cmbilisim commented 5 years ago

Remote IP address is not showing up correctly in mail logs

Here is mail log when I am connecting from web mail imap-login: Info: Login: user=<**********>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=23945, secured

Is it a way to record correctly the rip address instead of 127.0.0.1 into mail logs?

afterlogic-support commented 5 years ago

It's the real IP of the webmail client. If webmail client and mail server are installed on the same machine, then the mail server will see the webmail client's IP as 127.0.0.1. If you want to have another IP address displayed there, you need to install webmail on another host. Then your mail server will see that another IP address (the IP of the server where the webmail is now installed).

cmbilisim commented 5 years ago

I want to send IP address of the user (web server REMOTE_ADDR) to IMAP server.

Roundcube has a plugin for this. https://plugins.roundcube.net/packages/cor/dovecot-ident

Is there a plugin or a method in Afterlogic that I can use?

afterlogic-support commented 5 years ago

The closest option we have available is adding X-Originating-IP header with sender's IP address there. It's enabled by setting XOriginatingIP to true in data/settings/Mail.config.json file.

cmbilisim commented 5 years ago

XOriginatingIP only adds X-Originating-IP header information to sent mails. It does not send any information for IMAP connection.

afterlogic-support commented 5 years ago

That is correct.

Please note that WebMail Lite is a free open-source product, so please feel free to add the functionality you require. If you may be interested in custom development, please contact us at: https://s.afterlogic.com/helpdesk/