Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need an option to use mailbox.email as "To" header instead of the alias, when forwarding an email to the mailbox. #1928

Open
ad-on-is opened this issue Oct 23, 2023 · 2 comments

Comments

@ad-on-is
Copy link

I'm evaluating fastmail (FM), and have encountered the following issue with my setup. My DNS has three MX entries, example.com (handled by FM) and foo.example.com, bar.example.com (handled by SL)

Fastmail

Domain: example.com

Addresses: foo@example.com, bar@example.com

SimpleLogin

Mailboxes: foo@example.com), bar@example.com

Domains: foo.example.com (mailbox: foo@example.com, bar.example.com (mailbox: bar@example.com)

Here's my usecase:

When a mail is sent to something@foo.example.com, I want fastmail to use foo@esample.com as the reply-from address.

However, in fastmail, I only have two options, either using one of the default addresses, or the address the mail is sent to.

In my case I want to use the address the mail is sent to, but in this case, when I hit reply in fastmail, it wants to send the mail as something@foo.example.com instead of foo@example.com.

I managed to temporarily fix it, by adding the following to email_handler.py

# def forward_email_to_mailbox(...
    # ...
    add_or_replace_header(msg, "To", mailbox.email)

Is there any caveat to that approach? If not, could we have an option in the UI (per mailbox) to cover this case?

@springcomp
Copy link
Contributor

springcomp commented Nov 1, 2023

Please, can you clarify you use case ?
Did you really want to write esample.com instead of example.com ?

Let me rephrase:

When a mail is sent to alias something@foo.example.com, I want fastmail to use my mailbox address foo@example.com as the reply-from address.

So you want to hit reply and have SL use your real – hidden – email address instead ?

In my case I want to use the address the mail is sent to, but in this case, when I hit reply in fastmail, it wants to send the mail as from the alias something@foo.example.com instead of from my real, hidden address foo@example.com.

It appears you definitely want to disclose you real, hidden, email address when replying ?
This contradicts what SL has been designed for, unfortunately.

Nothing, however, prevents you from replying and replacing the reverse-alias address with the real one from the recipient, thereby bypassing SL entirely and sending your mail from Fastmail instead.

Please, feel free to clarify If I did not understand clearly what is your use case.

@ad-on-is
Copy link
Author

ad-on-is commented Nov 3, 2023

Yeah... esample was a typo. sorry for that.

I ditched SL and let my aliases be handled by fastmail.

Anyways.. as far as my knowledge goes, it wouldn't contradict to SL. In fact it's how SL works.

alice@gmail.com sends an email to bar@foo.example.com

SL handles that incoming email and redirects it to bob@fastmail.com (mailbox). The email headers are now, To: bar@foo.example.com and From: alice-reverse-alias@example.com

When Bob hits reply, Fastmail sets the From header to bar@foo.example.com (previous To header) and attempts to reply to Alice to her reverse-alias. But SL will refuse to handle that mail, since it doesn't allow the From header to be one of the aliases, instead it MUST be the mailbox address.

Therefore Bob has to change the From email manually to bob@fastmail.com, to be able to send the email.

SL and ProtonMail handle this automatically, by using X-SimpleLogin-Envelope-To and X-SimpleLogin-Envelope-From headers respectively. But SL and other mail services don't work together very well.

I hope this makes it more clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants