[GH-ISSUE #147] Remotes Auth Account Replace My From Account #36

Closed
opened 2026-02-26 18:33:01 +03:00 by kerem · 3 comments
Owner

Originally created by @nonbutAworker on GitHub (Jan 25, 2024).
Original GitHub issue: https://github.com/decke/smtprelay/issues/147

Hi, thank for you repo !

If I send email From A@test.com To B@test.com, but I configure C@test.com as auth account in smtprelay.ini file like this:

; GMail
remotes = starttls://C@test.com:xxx@smtp.gmail.com:587

Then I login in B@test.com account and find out the sender is C@test.com instead of REAL sender A@test.com as expected
How Can I fix this as expected, any help would be appreciated !

Originally created by @nonbutAworker on GitHub (Jan 25, 2024). Original GitHub issue: https://github.com/decke/smtprelay/issues/147 Hi, thank for you repo ! If I send email From **`A@test.com`** To **`B@test.com`**, but I configure `C@test.com` as auth account in `smtprelay.ini` file like this: ``` ini ; GMail remotes = starttls://C@test.com:xxx@smtp.gmail.com:587 ``` Then I login in `B@test.com` account and find out the sender is `C@test.com` instead of REAL sender `A@test.com` as expected How Can I fix this as expected, any help would be appreciated !
kerem closed this issue 2026-02-26 18:33:01 +03:00
Author
Owner

@decke commented on GitHub (Jan 25, 2024):

This is expected behavior and what most mail services do. If you look at the headers of the email you will see that the mail was send from A@test.com but since you authenticated with C@test.com GMail automatically rewrites the mail headers accordingly. It is the price we have to pay for fighting spam.

<!-- gh-comment-id:1909488400 --> @decke commented on GitHub (Jan 25, 2024): This is expected behavior and what most mail services do. If you look at the headers of the email you will see that the mail was send from A@test.com but since you authenticated with C@test.com GMail automatically rewrites the mail headers accordingly. It is the price we have to pay for fighting spam.
Author
Owner

@nonbutAworker commented on GitHub (Jan 25, 2024):

Thanks very much !
what you mean is who changed the from address is GMail instead of this repo? which means If I found another smtp server as my next deliver that didn't change the from address, I can get what I want?

<!-- gh-comment-id:1909526466 --> @nonbutAworker commented on GitHub (Jan 25, 2024): Thanks very much ! what you mean is who changed the `from address` is GMail instead of this repo? which means If I found another smtp server as my next deliver that didn't change the `from address`, I can get what I want?
Author
Owner

@decke commented on GitHub (Jan 25, 2024):

I do not use GMail myself anymore so I cannot easily test it but I used it in the past and the behavior was easy to understand when looking at the full mail headers.
Google SMTP servers preserve some headers so you will still see A@test.com somewhere but it also rewrites some parts of it to match with the email address you use for authentication.

If you can post a full mail including headers that would help a lot to explain it.

<!-- gh-comment-id:1909734585 --> @decke commented on GitHub (Jan 25, 2024): I do not use GMail myself anymore so I cannot easily test it but I used it in the past and the behavior was easy to understand when looking at the full mail headers. Google SMTP servers preserve some headers so you will still see A@test.com somewhere but it also rewrites some parts of it to match with the email address you use for authentication. If you can post a full mail including headers that would help a lot to explain it.
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/smtprelay#36
No description provided.