About "received" header when using Dovecot proxy
ml at riku22.net
ml at riku22.net
Wed Dec 4 16:29:38 EET 2019
Hello.
Sorry.
Organize and describe what I want to do.
There may be no unity, but please forgive me.
Also, I'm not good at English, so I'm sorry if it's difficult to understand.
1. I had to create a proxy server for an external SMTP server (here, “smtp.example.com” as an example).
So I decided to use Dovecot installed on my server (in this example, “my-server.com”).
2. Therefore, the following settings were created.
----- /etc/dovecot/conf.d/10-auth.conf -----
auth_mechanisms = plain login cram-md5 apop
!include auth-static.conf.ext
--------------------
----- /etc/dovecot/conf.d/auth-static.conf.ext -----
passdb {
driver = static
args = proxy=y nopassword=y
default_fields = destuser=%u nologin=y starttls=any-cert
}
userdb {
driver = static
args = uid=mail gid=mail /home=/dev/null
}
--------------------
----- /etc/dovecot/conf.d/10-ssl.conf -----
ssl = yes
ssl_cert = </etc/letsencrypt/live/my-server.com/fullchain.pem
ssl_key = </etc/letsencrypt/live/my-server.com/privkey.pem
--------------------
----- /etc/dovecot/conf.d/20-submission.conf -----
submission_client_workarounds = whitespace-before-path mailbox-for-path
protocol submission {
passdb {
driver = static
args = proxy=y host=smtp.example.com nopassword=y
}
}
--------------------
3. With the above settings, when my mailer connects to "my-server.com", it can connect to "smtp.example.com" and send / receive via SMTP.
4. However, in this case, the value of the mail header "received" will be as follows.
Received: from my-server.com (my-server.com [<my-server.com IP address>]) ...
I want the IP address of the sender (my computer here) to be displayed properly in the contents of this "received" like this.
Received: from riku22.net (xxxxx.bbtec.net [126.125.xxx.xxx])
Is there any way?
Best regards.
More information about the dovecot
mailing list