How I can add new mail configuration in K9 Android app

Hi,

I want to add new mail configuration similar to Gmail/Outlook.

For new Mail configuration, we are not having Oauth support. Can please suggest is it possible to add configuration? if yes, please guild us, how we can add it(“mail2world.net”).

Thanks,
Teja.

Welcome @mgvarma414 :wave:

I’m not sure what you’re asking for. Are you working for an email provider and want to know how you can get K-9 Mail to automatically find server settings when a user adds an account using an email address hosted by your company?

Or are you asking how you can add an additional account to K-9 Mail?

1 Like

Yes. Want to know how we can get K-9 Mail to automatically find server settings when user adds email address hosted by our company… This email follows IMAP and does’t need OAuth2 authentication.

We noticed source code has configurations that require
OAuthConfiguration(
clientId = BuildConfig.OAUTH_YAHOO_CLIENT_ID,
scopes = listOf(“mail-w”),
authorizationEndpoint = “Yahoo”,
tokenEndpoint = “https://api.login.yahoo.com/oauth2/get_token”,
redirectUri = “${BuildConfig.APPLICATION_ID}://oauth2redirect”,
)

But our email provider is using IMAP without OAuth.

Hello,

I am from Mail2World IT. We are an email service provider serving over 3 million users. We would like to use your App for our domains but auto configuring the login. What options do we have. We don’t have oauth2 however we do have Rest API’s. Alternatively we can use direct IMAP connections

K-9 Mail and Thunderbird use a mechanism called Autoconfig to fetch the server settings for a given email address. The documentation is currently sparse, but should give you an idea on how to start. See autoconfig/README.md at master · thunderbird/autoconfig · GitHub

Basically, you create an XML file and make it available under https://autoconfig.{emailDomain}/mail/config-v1.1.xml (where {emailDomain} is a placeholder for your actual email domain).

For an example, see https://autoconfig.posteo.de/mail/config-v1.1.xml

Notes:

  1. You don’t actually have to include all supported domains in <domain> tags. Thunderbird and K-9 Mail only check that at least one <domain> tag is present and contains a valid domain name.
  2. You have to make sure that the web server serves a valid TLS certificate for autoconfig.{emailDomain}. And that’s for all of the email domains you support.
  3. K-9 Mail doesn’t send the emailAddress query parameter. The reason for this can be found here: Autoconfig url emailaddress not supported

If you have further questions that you don’t want to discuss in public, please feel free to reach out to cketti@thunderbird.net.

Dear @cketti I sent you an email!

Dear @cketti

Unfortunatly we continue to have problems. Can we get paid support inorder to get our problem resolved. We have setup a configuration for our domain

https://autoconfig.mail2world.com/mail/config-v1.1.xml

test user: testuser01@mail2world.com
password: 30613F0DDF0E4BF58875

However we continue not being able to login via k9mail client. Thunderbird works fine. Please advise

We currently don’t offer paid support.

The config at https://autoconfig.mail2world.com/mail/config-v1.1.xml looks good to me and mail server settings are found by K-9 Mail in my tests.

The error message I’m getting is “Network error - Unable to parse TLS packet header”. That’s because imap.mail2world.com doesn’t seem to be configured to use TLS on port 993.

1 Like

Just for fun I tried with Outlook 2007 on Windows to access this account and I got the following message:

Log onto incoming mail server (IMAP): A secure connection to the server cannot be established.

and the following advise was given:

Send test e-mail message: The connection to the server was interrupted. If this problem continues, contact your server administrator or Internet service provider (ISP).