About "received" header when using Dovecot proxy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

About "received" header when using Dovecot proxy

Dovecot mailing list
Hello.
My name is Riku.

Currently, I use Dovecot as a proxy for another SMTP server.
However, this seems to cause the IP address of the "received" header to be that of the proxy server.
Is it possible to change this so that the IP address of the sender is entered?
The version of Dovecot is "2.3.8 (9df20d2db)".
Sorry for the incomprehensible explanation.

Thank you.

 Best regards.

Reply | Threaded
Open this post in threaded view
|

Re: About "received" header when using Dovecot proxy

Dovecot mailing list

On 2019-12-02 13:42, Riku via dovecot wrote:

> Hello.
> My name is Riku.
>
> Currently, I use Dovecot as a proxy for another SMTP server.
> However, this seems to cause the IP address of the "received" header
> to be that of the proxy server.
> Is it possible to change this so that the IP address of the sender is
> entered?
> The version of Dovecot is "2.3.8 (9df20d2db)".
> Sorry for the incomprehensible explanation.

This has been discussed a few times on the list already, and I believe
there is a fix coming at some point:
https://github.com/dovecot/core/pull/74

Currently there is none

--
Tom
Reply | Threaded
Open this post in threaded view
|

Re: About "received" header when using Dovecot proxy

Dovecot mailing list


> On 2 Dec 2019, at 19.23, Tom Sommer via dovecot <[hidden email]> wrote:
>
>
> On 2019-12-02 13:42, Riku via dovecot wrote:
>> Hello.
>> My name is Riku.
>> Currently, I use Dovecot as a proxy for another SMTP server.
>> However, this seems to cause the IP address of the "received" header
>> to be that of the proxy server.
>> Is it possible to change this so that the IP address of the sender is entered?
>> The version of Dovecot is "2.3.8 (9df20d2db)".
>> Sorry for the incomprehensible explanation.
>
> This has been discussed a few times on the list already, and I believe there is a fix coming at some point: https://github.com/dovecot/core/pull/74
>
> Currently there is none


This change does not allow you to edit the received header, it's only about not adding it at all.

and the change seems to be on the list for 2.3.9

Sami

Reply | Threaded
Open this post in threaded view
|

Re: About "received" header when using Dovecot proxy

Dovecot mailing list
Hello.

Thank you for teaching.
I'd like to try it out if 2.3.9 comes out.
I look forward to the release of 2.3.9.
Thank you very much.

Best regards.

Reply | Threaded
Open this post in threaded view
|

Re: About "received" header when using Dovecot proxy

Dovecot mailing list
Hello.

Sorry.
Since 2.3.9 was released, I installed it immediately and tried to set "lmtp_add_received_header" to "no".
But it seems different from what I wanted to do.
The following is my configuration file.
Please let me know if there are any other configuration files that need to be listed.
Is there any way to avoid adding it to the “received” header?

----- 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
  }
}
--------------------

Best regards.
Reply | Threaded
Open this post in threaded view
|

Re: About "received" header when using Dovecot proxy

Dovecot mailing list

On 4.12.2019 15.33, Riku via dovecot wrote:

> Hello.
>
> Sorry.
> Since 2.3.9 was released, I installed it immediately and tried to set "lmtp_add_received_header" to "no".
> But it seems different from what I wanted to do.
> The following is my configuration file.
> Please let me know if there are any other configuration files that need to be listed.
> Is there any way to avoid adding it to the “received” header?
>
> ----- 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
>   }
> }
> --------------------
>
> Best regards.


So... what did it do and what did you expect it to do?

Aki

Reply | Threaded
Open this post in threaded view
|

Re: About "received" header when using Dovecot proxy

Dovecot mailing list
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.