thunderbird-android icon indicating copy to clipboard operation
thunderbird-android copied to clipboard

Feature request: different SMTP for each identity

Open lenny87 opened this issue 8 years ago • 16 comments

Is there any possibility to add a feature to have different SMTP server for each identify in account? I'm using this in Thunderbird, will be nice to have it also on tablet with K9

lenny87 avatar Feb 22 '16 19:02 lenny87

It took me a bit of thought to understand what you were asking for, since I recall already using this "feature" in k9mail already.

So here is the question to you; do not each of these SMTP servers have an "account" associated with them? If you add a new email account to k9mail, you can switch between the accounts for sending in the same way as you switch between identities.

I think that rather than adding SMTP servers to identities, it might be a better approach to split the SMTP server configurations away from the "account" altogether. This would be similar to how thunderbird works, since you will notice that thunderbird allows you to define receiving and sending servers independently.

This would require some adjustments to the account setup process;

  1. add a new mail account; Incoming or Sending?
  2. If we run through an incoming account setup, at the end, option to choose an already configured SMTP server, or proceed to add a new SMTP server.

And changes to various relationships between accounts;

  1. Association between IMAP server and a "default" SMTP server.
  2. Which IMAP server will get a copy of the outgoing message?

lbdroid avatar Feb 29 '16 18:02 lbdroid

Thanks for reply. I will try to explain my situation better.

I have two (maybe more) e-mail addresses I'm using, but all incoming mail is going to one IMAP maildir (i.e only one of the actual addresses is used for storing incoming mail).

But as one of the accounts without any storega (i's just forward to my main account) is used for my company e-mail, and I need to reply to that "work" e-mail using different SMTP server than my main "personal" one. So I'm using just one account configure in k9, but there I have added multiple identities (which allow me to reply with proper e-mail address - exactly what sender wrote into his mail)

Thunderbird has an option to choose different outgoing SMTP for each identity - so I can use gmail SMTP for my mail account, and company SMTP for replying to work messages.

Is that now clear?

lenny87 avatar Feb 29 '16 18:02 lenny87

So your workaround for now, is to either duplicate your incoming account, or add completely bogus incoming accounts having the proper SMTP server. The proper solution is as I suggested.

Make sure to set the duplicate or bogus accounts to disable push and never poll.

lbdroid avatar Feb 29 '16 18:02 lbdroid

Yap, this is possible as a workaround. But it's possible to implement proper solution (enable to configure SMTP for every identity) with some future version of K9?

lenny87 avatar Feb 29 '16 18:02 lenny87

Did you actually read my suggested implementation? There SHOULD NOT be SMTP server associated with identities -- that relationship is backwards.

An SMTP server can have multiple identities, but every identity is tied to a specific SMTP server. The limitation with k9mail right now, is that each IMAP server has its very own SMTP server on a 1:1 basis. This just needs to be changed such that IMAP and SMTP servers are defined separately.

I can't answer your question about future versions of k9mail. If somebody decides to work on this enhancement, then it could possibly end up in a future version.

lbdroid avatar Feb 29 '16 18:02 lbdroid

Thanks, I red it again and got it.

lenny87 avatar Feb 29 '16 18:02 lenny87

I had the same problem then lenny87 so I started to work on a solution and I came to almost the same list of adjustment described by lbdroid. But I think that smtp server should be associated with identities.

Here how I see this: We have Accounts and OutgoingSevrers (Smtp) each account have one IncomingServer (IMAP) and one or several Identities each Identity use one outgoingServer

For a given account the default outgoingServer is the default account identity, and outgoing messages are stored in the IncomingServer "Sent" box of the account.

I started to code those modifications and I am not so far to have a working branch. If you are interested in this feature let me know, your help/comments/feedbacks would be appreciated.

Dr-Willy avatar Nov 15 '16 11:11 Dr-Willy

Dr-Willy I am definitely interested by your work. I think this would be a huge improvement of k9 !

Obenj avatar Dec 11 '16 19:12 Obenj

I’d like this feature too! This is a quite common use case in my environment, because people tend to have multiple addresses/identities that redirect mails to one address/IMAP account, but then need to reply with the correct one and for that use the relevant SMTP server because of SPF/DKIM/DMARC.

ArchangeGabriel avatar Jan 03 '17 21:01 ArchangeGabriel

This really is an important but overlooked e-mail client feature, to be able to receive from multiple e-mail accounts and reply as those e-mail accounts through the correct SMTP server for that account.

AumCoin avatar May 16 '17 14:05 AumCoin

+1 to address SPF issues for some domains such as @laposte.net, which requires you to use their authenticated SMTP if you do not want your mail to end up in the spam box ("-all" in the SPF record instead of a friendlier "~all").

protopyte avatar Jul 18 '18 07:07 protopyte

Is anything still happening here? From my point of view this situation is still an issue and the primary reason why I do not send e-mails from my phone at all.

@Dr-Willy have you made any further progress?

goddib avatar Feb 11 '19 15:02 goddib

Described solution should also fix #1547

eugene-bright avatar Jul 01 '19 11:07 eugene-bright

Any progress or update on this? Will it be available?

arhayati avatar Apr 08 '21 15:04 arhayati

Has this been implemented?

Committing avatar Apr 06 '22 14:04 Committing

With https://k9mail.app/2022/06/13/K-9-Mail-and-Thunderbird I hope this feature will come to K9 Mail.

pravi avatar Jul 17 '22 08:07 pravi

Thunderbird has this feature on its desktop application. So from my understanding this seems like a legitimate request. An account can have multiple outgoing servers (SMTP), which then they can be associated to an identity on the account. Not every account can have the incoming server open to connections, for example some non-profits or software foundations have email addresses that are just forwarders, but one can send emails with such address.

jlprat avatar Jan 08 '23 13:01 jlprat

Maildroid has this feature and was one of the key reasons for me to choose it over K9. I'm using a self hosted IMAP server as mail collector for multiple accounts, but still relying on each mail provider's SMTP server for sending mail. Therefore this is an essential functionality for me to use my mails on Android like with Thunderbird on desktop.

CM787 avatar Apr 07 '23 19:04 CM787