the-djmaze / snappymail

Simple, modern & fast web-based email client
https://snappymail.eu
GNU Affero General Public License v3.0
1.01k stars 122 forks source link

Can not send email using Mox mailserver #1813

Open chiel1980 opened 7 hours ago

chiel1980 commented 7 hours ago

Describe the bug I can not seem to send email using Mox as mailserver. I tried SSMTP and SMTP with StartTLS but get an error in the debug logfile that there is an error with the SMTPclient

To Reproduce Steps to reproduce the behavior:

  1. Use starttls port 587 with MOX (certificate validation enabled or disabled does not matter)
  2. Send a standard simple email
  3. Error message being shown
  4. See error

Expected behavior An email to be send without an error :)

Screenshots If applicable, add screenshots to help explain your problem.

Please complete the following information:

Debug/logging information

[2024-10-16 09:45:20.447][690f8a94] SMTP[INFO]: > STARTTLS\r\n [2024-10-16 09:45:20.447][690f8a94] SMTP[INFO]: < 220 2.0.0 go! (3BevY5D9RNPXCuJHIGQZSA)\r\n [2024-10-16 09:45:20.470][690f8a94] SMTP[INFO]: > EHLO mail.pragmasec.nl\r\n [2024-10-16 09:45:20.512][690f8a94] SMTP[INFO]: < 250-new.pragmasec.nl\r\n [2024-10-16 09:45:20.512][690f8a94] SMTP[INFO]: < 250-PIPELINING\r\n [2024-10-16 09:45:20.512][690f8a94] SMTP[INFO]: < 250-SIZE 104857600\r\n [2024-10-16 09:45:20.512][690f8a94] SMTP[INFO]: < 250-REQUIRETLS\r\n [2024-10-16 09:45:20.512][690f8a94] SMTP[INFO]: < 250-AUTH SCRAM-SHA-256-PLUS SCRAM-SHA-256 SCRAM-SHA-1-PLUS SCRAM-SHA-1 CRAM-MD5 PLAIN LOGIN\r\n [2024-10-16 09:45:20.512][690f8a94] SMTP[INFO]: < 250-FUTURERELEASE 5184000 2024-12-15T07:45:20Z\r\n [2024-10-16 09:45:20.512][690f8a94] SMTP[INFO]: < 250-ENHANCEDSTATUSCODES\r\n [2024-10-16 09:45:20.512][690f8a94] SMTP[INFO]: < 250-8BITMIME\r\n [2024-10-16 09:45:20.512][690f8a94] SMTP[INFO]: < 250-LIMITS RCPTMAX=1000\r\n [2024-10-16 09:45:20.512][690f8a94] SMTP[INFO]: < 250 SMTPUTF8\r\n [2024-10-16 09:45:20.513][690f8a94] SMTP[INFO]: > AUTH SCRAM-SHA-256\r\n [2024-10-16 09:45:20.513][690f8a94] SMTP[INFO]: < 334 \r\n [2024-10-16 09:45:20.513][690f8a94] SMTP[INFO]: > \r\n [2024-10-16 09:45:20.513][690f8a94] SMTP[INFO]: < 334 cj1kNDQ2ZjNlM2RiYTAzYjJlMzkyOWExNDQwOTk5NjcyYnhJOVpSQ1c0em50WTgzWU8scz1KNHpXK2tuRWFPdFVKUG4rLGk9NDA5Ng==\r\n [2024-10-16 09:45:20.518][690f8a94] SMTP[INFO]: > \r\n [2024-10-16 09:45:20.518][690f8a94] SMTP[INFO]: < 334 dj1Oam4xSDVuQkhsb2g5VWgyaHp4bnhsM2VIdmJSeTBrcjlSWW56N0RHSnJJPQ==\r\n [2024-10-16 09:45:20.518][690f8a94] SMTP[ERROR]: InvalidArgumentException in /usr/share/snappymail/snappymail/v/2.38.2/app/libraries/MailSo/Smtp/SmtpClient.php:502 Stack trace:

0 /usr/share/snappymail/snappymail/v/2.38.2/app/libraries/MailSo/Smtp/SmtpClient.php(206): MailSo\Smtp\SmtpClient->sendRequestWithCheck()

1 /usr/share/snappymail/snappymail/v/2.38.2/app/libraries/RainLoop/Model/Account.php(276): MailSo\Smtp\SmtpClient->Login()

2 /usr/share/snappymail/snappymail/v/2.38.2/app/libraries/RainLoop/Model/Account.php(242): RainLoop\Model\Account->netClientLogin()

3 /usr/share/snappymail/snappymail/v/2.38.2/app/libraries/RainLoop/Actions/Messages.php(797): RainLoop\Model\Account->SmtpConnectAndLogin()

4 /usr/share/snappymail/snappymail/v/2.38.2/app/libraries/RainLoop/Actions/Messages.php(192): RainLoop\Actions->smtpSendMessage()

5 /usr/share/snappymail/snappymail/v/2.38.2/app/libraries/RainLoop/ServiceActions.php(143): RainLoop\Actions->DoSendMessage()

6 /usr/share/snappymail/snappymail/v/2.38.2/app/libraries/RainLoop/Service.php(132): RainLoop\ServiceActions->ServiceJson()

7 /usr/share/snappymail/snappymail/v/2.38.2/app/libraries/RainLoop/Service.php(14): RainLoop\Service::RunResult()

8 /usr/share/snappymail/snappymail/v/2.38.2/include.php(137): RainLoop\Service::Handle()

9 /usr/share/snappymail/index.php(11): include('...')

10 {main}

[2024-10-16 09:45:20.518][690f8a94] SMTP[INFO]: > QUIT\r\n [2024-10-16 09:45:20.519][690f8a94] SMTP[INFO]: < 235 2.7.0 nice\r\n [2024-10-16 09:45:20.519][690f8a94] SMTP[ERROR]: MailSo\Smtp\Exceptions\NegativeResponseException: 235 2.7.0 nice in /usr/share/snappymail/snappymail/v/2.38.2/app/libraries/MailSo/Smtp/SmtpClient.php:598 Stack trace:

0 /usr/share/snappymail/snappymail/v/2.38.2/app/libraries/MailSo/Smtp/SmtpClient.php(506): MailSo\Smtp\SmtpClient->validateResponse()

1 /usr/share/snappymail/snappymail/v/2.38.2/app/libraries/MailSo/Smtp/SmtpClient.php(487): MailSo\Smtp\SmtpClient->sendRequestWithCheck()

2 /usr/share/snappymail/snappymail/v/2.38.2/app/libraries/MailSo/Net/NetClient.php(182): MailSo\Smtp\SmtpClient->Logout()

3 /usr/share/snappymail/snappymail/v/2.38.2/app/libraries/MailSo/Net/NetClient.php(45): MailSo\Net\NetClient->Disconnect()

4 /usr/share/snappymail/snappymail/v/2.38.2/app/libraries/RainLoop/Actions/Messages.php(192): MailSo\Net\NetClient->__destruct()

5 /usr/share/snappymail/snappymail/v/2.38.2/app/libraries/RainLoop/ServiceActions.php(143): RainLoop\Actions->DoSendMessage()

6 /usr/share/snappymail/snappymail/v/2.38.2/app/libraries/RainLoop/Service.php(132): RainLoop\ServiceActions->ServiceJson()

7 /usr/share/snappymail/snappymail/v/2.38.2/app/libraries/RainLoop/Service.php(14): RainLoop\Service::RunResult()

8 /usr/share/snappymail/snappymail/v/2.38.2/include.php(137): RainLoop\Service::Handle()

9 /usr/share/snappymail/index.php(11): include('...')

10 {main}

/usr/share/snappymail/snappymail/v/2.38.2/app/libraries/RainLoop/Actions/Messages.php#324

0 /usr/share/snappymail/snappymail/v/2.38.2/app/libraries/RainLoop/ServiceActions.php(143): RainLoop\Actions->DoSendMessage()

1 /usr/share/snappymail/snappymail/v/2.38.2/app/libraries/RainLoop/Service.php(132): RainLoop\ServiceActions->ServiceJson()

2 /usr/share/snappymail/snappymail/v/2.38.2/app/libraries/RainLoop/Service.php(14): RainLoop\Service::RunResult()

3 /usr/share/snappymail/snappymail/v/2.38.2/include.php(137): RainLoop\Service::Handle()

4 /usr/share/snappymail/index.php(11): include('...')

5 {main}

Additional context I also enabled debugging on Mox and only get the following error:

2024-10-16T10:02:17.430862+02:00 new mox[3396961]: l=debug m="smtp command result" pkg=smtpserver kind=submission cmd=auth code=235 ecode=2.7.0 duration=5.573371ms cid=19282bf0e9e delta=5.42524ms username=mve@pragmasec.nl 2024-10-16T10:02:17.431263+02:00 new mox[3396961]: l=info m="connection closed" err="read: EOF (io error)" pkg=smtpserver cid=19282bf0e9e delta="409.339µs" username=mve@pragmasec.nl

chiel1980 commented 5 hours ago
Screenshot 2024-10-16 at 12 18 43

The error in Snappymail