Nextcloud AIO vs mailcow Snappymail works, mailapp fails (2)

Hi,

In this topic I got the mail app working for the first time (Nextcloud mail docker dovecot).
3 month ago it stopped working and now I partially got it working again, here’s my problem description:

I am running Nextcloud AIO and Mailcow, mailcow is up to date, Nextcloud is still on 28 (awaiting the normal upgrade to 29).

Both are running in their own docker network, so I had to give Mailcow double network adresses for the services used by Nextcloud mail, Dovecot and Postfix and allow the Nextcloud network to connect to the services. The adresses got lost 2 month ago (I suspect) In a container upgrade since the last time and this is how I got it working again, at least somehow.

I am able to connect Snappymail over IMAP to dovecot and I am also able to connect to postfix, shown in the logging of Postfix.

I am able to connect Nextcloud Mail over IMAP to Dovecot, but Postfix only mentions chunking, Nextcloud log only mentions “Server requires Authentication”.

Using the mail app horde Imap client exceptions are logged as well as allowed memory size exhausted loggings.

When enabling debugging (debug on and loglevel 0 in config.php) no extra logs are created, aside the nextcloud.log, so no trail can be found of why the mail app is failing to authenticate.

In Snappy mail under domains I configured exactly the same settings (servername, port authentication protocol) as I did in the mailapp regarding IMAP and SMTP.

How to troubleshoot this, or how to reset the mailapp fully (remove app and settings and reinstall / reconfigure)?

This is what I see in the logs:

I think all mail-app related database items need to be removed, snappymail is very snappy at the same time.

So how to troubleshoot this, or where can I get help (I tried posting the same question one month ago, no one dared to give a hint how to get this solved.

Also, I just saw that you use the php-mail transport 1. Perhaps you could try to remove this setting temporarily and see if that improves the situation. Is there a specific reason for overwriting the transport setting?

This looks a bit like the credentials for SMTP are not correct. Have a look at your account settings of the mail account inside the Mail app and double check port, encryption and enter the password again.

1 Like

Hi,

I did notice something strange in the configs from the mailapps, thanks for pointing me in that direction!

But…
Snappy mail is using the external server name on the internal ssl/tls port (4065).
Mail only authenticates using the docker hostname using no security.
If I configure it the same as snappymail it fails to my surprise (they are running on the same docker container I assume or am I wrong assuming that???).

I don’t know where you found I am using PHP-mail (php in the screendump?), I can’t find it in /docker/volumes/nextcloud_aio_nextcloud/_data/config/config.php or am I looking at the wrong place?

As I asked it here before, the screendump was a little older. I allready disabled PHP in the email.
These are the failures when trying to send an email now:

Error mail
Horde_Mime_Exception Server requires authentication.
“26 jun 2024 22:50:43”
Error mail
Exception OCA\Mail\Controller\DraftsController::update(): Argument #2 ($accountId) must be of type int, null given, called in /var/www/html/lib/private/AppFramework/Http/Dispatcher.php on line 232 in file ‘/var/www/html/custom_apps/mail/lib/Controller/DraftsController.php’ line 157
“26 jun 2024 22:50:08”
Error mail
Exception OCA\Mail\Controller\DraftsController::update(): Argument #2 ($accountId) must be of type int, null given, called in /var/www/html/lib/private/AppFramework/Http/Dispatcher.php on line 232 in file ‘/var/www/html/custom_apps/mail/lib/Controller/DraftsController.php’ line 157
“26 jun 2024 22:50:08”

Pity how small the userbase must be, looking at only a few tips to sort this out on my questions.

maybe it’s worth a try asking your question again on the mailcow-forum?
I can imagine you would find more users running nextcloud next to mailcow than vice versa.

And if you’d do so it would be nice if you would link your thread from there to here as well so that interested users from here could see how this thing would go along on the other side… :wink:

Hi Jimmy,

Two mail clients exist in Nextcloud. One of them is working, the other is not.
I need to know if they operate in the same container (not to be answered by mailcow) and if they do, why one of them is working (again this is more a Nextcloud issue then mailcow imho).

To me this seems the right place to ask, but I may be wrong, please explain then.

1 Like

for me it still looks like a config error (in your mailcow). that’s why I suggested that.
As it’s only a suggestion there’s nothing more you need to do, of course. :wink:

So again two mail clients behave differently against the same mail platform, how can that be caused by the mail platform? How are these client different in config or placement, that this difference could occur?

Puzzling that no one is able to explain this on the Nextcloud side.
Is there knowledge about both apps, who is able to explain more about this?

easy example: one of which is more lean with the setting while the other one might be more strict. any maybe your settings would fit the lean model while it would be too lean for the stricter one.

again: just guessing. :wink:

I´t is truly nice you answer and I’m sure you have thorough knowledge of the other parts of Nextcloud, but here I’m doubting that.

Just guessing :wink:

So who is willing to tell me how to troubleshoot on the mailclient side. Debugging does not create the described logging and again: two clients on the same platform (are these on the same platform, one almost builtin the other as app installed, running in the same location, or am I missing completely the architecture), different behavior, where is documentation?

Slam me with what I should have read before posting a question?

That’s totally ok. I don’t mind :slight_smile:

As I have read there’s an extra routine (on mailcows side) to install nextcloud next to mailcow. How did you install your setup?
Are you aware of the apparently special settings that seem to be neccessary to setup mc and nc side-by-side?