Nextcloud email setup issue

I have been trying to setup the email part but it keeping failing

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 26.0.1
Operating system and version (eg, Ubuntu 20.04): debian 11
Apache or nginx version (eg, Apache 2.4.25): nginx
PHP version (eg, 7.4): php8.1

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N):N

Steps to replicate it:
I have tried to use different settings with ssl and no ssl but every test fails. On the mail server, I can see the following if I use 587 as port

ay 29 18:27:55 mail postfix/submission/smtpd[1974]: connect from unknown[192.16 8.39.36]
May 29 18:27:55 mail postfix/submission/smtpd[1974]: lost connection after UNKNO WN from unknown[192.168.39.36]
May 29 18:27:55 mail postfix/submission/smtpd[1974]: disconnect from unknown[192 .168.39.36]
May 29 18:28:03 mail postfix/submission/smtpd[1974]: connect from unknown[192.16 8.39.36]
May 29 18:28:03 mail postfix/submission/smtpd[1974]: lost connection after UNKNO WN from unknown[192.168.39.36]
May 29 18:28:03 mail postfix/submission/smtpd[1974]: disconnect from unknown[192 .168.39.36]

or the following with port 25

May 29 18:30:13 mail postfix/smtpd[2128]: match_hostname: unknown ~? 192.168.7.2
May 29 18:30:13 mail postfix/smtpd[2128]: match_hostaddr: 192.168.39.36 ~? 192.168.7.2
May 29 18:30:13 mail postfix/smtpd[2128]: match_hostname: unknown ~? 192.168.39.36
May 29 18:30:13 mail postfix/smtpd[2128]: match_hostaddr: 192.168.39.36 ~? 192.168.39.36
May 29 18:30:13 mail postfix/smtpd[2128]: lost connection after UNKNOWN from unknown[192.168.39.36]
May 29 18:30:13 mail postfix/smtpd[2128]: disconnect from unknown[192.168.39.36]
May 29 18:30:13 mail postfix/smtpd[2128]: master_notify: status 1
May 29 18:30:13 mail postfix/smtpd[2128]: connection closed
May 29 18:30:17 mail postfix/smtpd[2128]: proxymap stream disconnect
May 29 18:30:17 mail postfix/smtpd[2128]: auto_clnt_close: disconnect private/tlsmgr stream

Coould someone advise please?

I am using iredmail as mail server

The output of your Nextcloud log in Admin > Logging:

PASTE HERE

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

PASTE HERE

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

PASTE HERE


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE

What error do you get from Nextcloud when you send the test?

A problem occurred while sending the email. Please revise your settings. (Error: Email could not be sent. Check your mail server log)

I have tried different combination with or without ssl login etc still no joy. From the box I can telnet to the mail server and send emails via terminal

Ok I installed sendmail and that works well