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