Email hosting provider does not require IMAP or SMTP security and this seems to be a problem

Operating system: Linux 3.10.0-962.3.2.lve1.5.33.el7.x86_64 #1 SMP Fri Mar 13 09:20:40 EDT 2020 x86_64

Webserver: Apache (litespeed)

Database: mysql 10.3.23

PHP version: 7.3.17

Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, litespeed, bcmath, bz2, calendar, ctype, curl, dba, dom, enchant, mbstring, fileinfo, ftp, gd, gettext, iconv, imap, intl, json, ldap, exif, mysqlnd, odbc, PDO, pgsql, Phar, posix, pspell, shmop, SimpleXML, snmp, soap, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, xml, xmlwriter, xsl, zip, mysqli, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, wddx, xmlreader, xmlrpc, imagick, redis, ionCube Loader, Zend OPcache

Nextcloud version: 18.0.3 - 18.0.3.0

Steps to replicate it:

  1. Try to enter my email server details and credentials.

My email hosting provider does not require any IMAP/SMTP security - only username and password. I am able to access and use this particular email account in Thunderbird, Outlook, GMail, and K9 Mail on my phone but I can not get Nextcloud mail to work. I get a very generic “Unexpected Error” when trying to add the email account.

I have both IMAP and SMTP security set to NONE in the manual creation and use the same settings/ports that successfully work with Thunderbird, Outlook, K9, etc)

##server log##
Fatal mail Creating account failed: Could not open secure TLS connection to the server.
2020-05-19T17:39:14-0400
Debug mail Connecting to account eric.meadows@wvlandgroup.com
2020-05-19T17:39:13-0400
Info mail Setting up manually configured account

When I set up the email settings in “Basic Settings” of the Admin section and use the same credentials it successfully sends the test email. I set the SMTP encryption to ‘None’ and Authentication to ‘Login’ and I get the email delivered to my gmail account.

But, alas, I can not get the mail app to work with our hosting provider - we are a small business and have 4-5 employees wanting to use Nextcloud with their email.

This has been happening for 3 months through 2-3 Nextcloud and Mail app updates. Any thoughts would be appreciated.

it could (i’m not saying it IS) really be a coding glitch… since for me it looks as if nc is as per default trying to establish a secure route to email provider (which isn’t needed, at least not for yours, apparently).

so logicallywise they could argue: why do you want security for your data (and thus using nextcloud) if you aren’t interested in any security (by chosing a provider without any security).

having said that i am not sure if you could turn tls-security off yourself at config.php (manual would know if that’s possible)

so i would suggest to file an issue under github and see what they will come up with…

pls don’t forget to link your issue to the forum … best as an answer to this thread.
it would close the thread as solved.

thanks and good luck

1 Like

Are you talking of the Mail app? Then we should move the topic. Or the external user authentication (so you authenticate users against an IMAP server)?

Yes, the NC Mail App not external user.

GitHub issue link I posted into the Mail App group - not into the Nextcloud Server group:

1 Like

I’ve not gotten any response from the Mail App group over on github. This is the final piece of the pie for our business server and can’t get email to work.

I guess one could also wonder why they offer the ability of turning off any security if NC isn’t going to allow me to use it this way.

I’ll also agree (and wonder) why my clients email provider (who is a VERY big provider) doesn’t have some type of security in place. They enforce very strong passwords (annoyingly strong passwords) and maybe they feel that’s all the security they need.

If you’ll excuse me for being ever so slightly snarky, what you need is a new email provider. I wouldn’t even consider using a provider that doesn’t allow a secure connection.

1 Like

Not snarky, but I can’t get my client to switch. The owner made the decision of going with them prior to my involvement.

But the problem still is, if Netxtcloud offers the choices of “None” for both IMAP and SMTP authentication, why does it appear it’s looking for authentication?

–edit: typo

@PappyEric

i would, if you would allow me (though you could do that yourself, too) move your topic over to apps/mail and hope that some dev would find the time to reply there.
but having said that… they might be covered in work these days by bringing nc19 to see the light of the world… so it could take a while.

what do you think?

Go for it - I do have it over on the Mail App’s Github as well, but if you feel moving this to the forum here, feel free. I appreciate any help with this as I touted Nextcloud to my client as the do-all-be-all.

They’re very happy and impressed with how we’re using it but the email was a pretty big usage point for them and their employees.

Just to clarify, you do still have to authenticate for IMAP, whether that process is on a secure connection or not.

Also note that if you are referring to the Administration > Basic settings > Email server, this section has nothing to do with the mail app. This is where you set up Nextcloud to be able to send emails itself (welcome email, password reset, share notifications, etc.), not for users.

Users have to open the mail app and set up their own accounts.

Correct. I referenced the “Administration > Basic settings > Email server” part to say I am able to send the test email through our email provider in that method - I understand it is only sending an email and not receiving.

When setting up a user account (mine in this case) using the Mail App in Nextcloud: I click ‘Manual’ then fill in the IMAP server path, my username and password for our email provider, choose “None” under IMAP security and use the port specific to the hosting provider. I do the same for SMTP but use the SMTP path to the provider, use the same user/password, “None” on SMTP Security, click connect and get an error. (please see server log above in my first post.)

These same settings work 100% when using desktop versions of Thunderbird & Outlook, adding the account to Gmail, and when adding the account to K9 mail app on my phone.

I think I can safely assume it’s a problem with the Nextcloud setup since all my other email clients connect without issue. As @JimmyKater pointed out, it’s almost like I’m choosing “none” on the security settings, but Nextcloud is still looking for something.

@JimmyKater : here is the working solution as provided by a contributor at the Mail App github:

1 Like

perfect.
thanks for relinking this solution to here.

and sorry that i only just now changed the category of your posting… it was impossible for me as on yesterday…

Thanks for all your help here. It looks like it was a known issue, I just wasn’t using the correct search phrase to find it.

1 Like

Yeah, sorry for the poor UX on the setup. We have to improve this: https://github.com/nextcloud/mail/issues/3006

1 Like