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

Add support for ID command to support 163.com

Open Aspire1Inspire2 opened this issue 4 years ago • 1 comments

Is your feature request related to a problem? Please describe. I got rejected receiving mails using imap. I was trying to log in to 163 email server when this happens.

Describe the solution you'd like I was told that the email client app should return its identity to allow connecting to the email server.

The developer of that email server provides the following code:

Properties props = new Properties(); 
props.setProperty("mail.store.protocol", "imap"); 
props.setProperty("mail.imap.host", "imap.163.com"); 
props.setProperty("mail.imap.port", "143"); 

HashMap IAM = new HashMap();
//IMAP ID: key, value pair. E.g. name,version,vendor,support-email
IAM.put("name","myname");      
IAM.put("version","1.0.0");      
IAM.put("vendor","myclient");      
IAM.put("support-email","[email protected]");  
Session session = Session.getInstance(props); 

IMAPStore store = (IMAPStore) session.getStore("imap");
//user account and password
store.connect("[email protected]", "password"); 

store.id(IAM);

The developer provides the following link to explain context: https://javaee.github.io/javamail/docs/api/index.html?com/sun/mail/imap/IMAPStore.html

Could you evaluate if this situation is a valid case to make it more secure/compatible with imap server?

Aspire1Inspire2 avatar Jan 07 '21 02:01 Aspire1Inspire2

This code can be used to fool 163 before k9 supports the id command,

com.fsck.k9.mail.store.imap.RealImapConnection#open

            if (hasCapability("ID")) {
                executeSimpleCommand("ID (\"name\" \"k-9\" \"version\" \"6.000\")");
            }

image

AoEiuV020 avatar Jun 28 '22 09:06 AoEiuV020

@AoEiuV020 Could you please make a PR for this? I think it's helpful since a large number of people use 163 mails in China.

wh201906 avatar Nov 26 '22 09:11 wh201906

The custom option of FairEmail supports 163.com.Although FairEmail is not listed in the support list, the custom option is available after adding 163.com.Can it be used as a reference?

jbwfu avatar Jan 31 '23 10:01 jbwfu