SMTP server configuration - FAILD SEND MAIL

Hi everybody ! I love community :smiley:
So my problem is in setting up SMTP server for passbolt

I am running Mailcow as my MAIL server i tested smtp user for sendings emails with:
https://www.gmass.co/smtp-test

and everything works i get my email test with no-reply to personal no problem, so i set-up like this in passbolt

SMTP server configuration
Email provider → Other
Authentication method → Username & password
Username → no-reply@raijin.cz
Password → ••••••••••••••• (bla bla bla bla my password bla bla bla )

Advanced settings
SMTP host → mail.raijin.cz
Use TLS → Yes
Port → 587
SMTP client → (empty)

Sender configuration
Sender name → no-reply@raijin.cz
Sender email → no-reply@raijin.cz

but when i send test email i got this error:

[
    {
        "cmd": null,
        "response": [
            {
                "code": "220",
                "message": "mail.raijin.cz ESMTP Postcow"
            }
        ]
    },
    {
        "cmd": "EHLO passbolt.raijin.cz",
        "response": [
            {
                "code": "250",
                "message": "mail.raijin.cz"
            },
            {
                "code": "250",
                "message": "PIPELINING"
            },
            {
                "code": "250",
                "message": "SIZE 104857600"
            },
            {
                "code": "250",
                "message": "ETRN"
            },
            {
                "code": "250",
                "message": "STARTTLS"
            },
            {
                "code": "250",
                "message": "ENHANCEDSTATUSCODES"
            },
            {
                "code": "250",
                "message": "8BITMIME"
            },
            {
                "code": "250",
                "message": "DSN"
            },
            {
                "code": "250",
                "message": "CHUNKING"
            }
        ]
    },
    {
        "cmd": "STARTTLS",
        "response": [
            {
                "code": "220",
                "message": "2.0.0 Ready to start TLS"
            }
        ]
    }
]

What is wrong ? or what should i look for ?

Hi @ArchMatt Welcome to the forum!

The only difference between your setup and mine (other than mail host) is that I would have “No-Reply” in the Sender name, instead of an email address. Not sure if that would make any difference, and I suspect it wouldn’t.

However, the section where you post the error - it’s not clear what the error is? It seems more like it stalled mid-process. Same with the first screenshot.

Please clarify if this sounds way off, but the mail server is not providing any clue regarding how to authenticate the SMTP connection. Like AUTH PLAIN LOGIN…so I would say it’s reporting back like you are sending it mail, rather than logging in via SMTP.

Maybe double check your mailcow install.

Exact same problem and configuration here! Did you find any solution?

Hi @tomnick On your mail server what ports are configured with services? And, did you follow a guide to set it up that we can reference to troubleshoot? Welcome to the forum!

Hi Garrett, it is mailcow and has been running for 2 years without any problem. The smtp port is 587. I set the mail in passbolt up as follows:

Email provider → Other
Authentication method → Username & password
Username → myemail@mydomain
Password → mypassword

Advanced settings
SMTP host → mail.mydomain
Use TLS → Yes
Port → 587
SMTP client → (empty)

Sender configuration
Sender name → no-reply
Sender email → no-reply@mydomain

What other smtp clients have you successfully setup/used with the mail server?

Thunderbird and Outlook working like a charm :wink:

1 Like

SMTP Test Tool works fine too

So it’s not the same scenario then? In the OP the SMTP tool showed an output that to me seemed like what passbolt is showing.

A couple things to check here:

  • Could you post the test email output like the OP did?
  • Do you see anything on your mail server logs?
  • Could you do something that would trigger an email(invite yourself with another email address?) and then check the db? select email, subject, error, created, sent from email_queue;
[
    {
        "cmd": null,
        "response": [
            {
                "code": "220",
                "message": "mail.2606.eu ESMTP Postcow"
            }
        ]
    },
    {
        "cmd": "EHLO passbolt.piffpaff.eu",
        "response": [
            {
                "code": "250",
                "message": "mail.2606.eu"
            },
            {
                "code": "250",
                "message": "PIPELINING"
            },
            {
                "code": "250",
                "message": "SIZE 104857600"
            },
            {
                "code": "250",
                "message": "ETRN"
            },
            {
                "code": "250",
                "message": "STARTTLS"
            },
            {
                "code": "250",
                "message": "ENHANCEDSTATUSCODES"
            },
            {
                "code": "250",
                "message": "8BITMIME"
            },
            {
                "code": "250",
                "message": "DSN"
            },
            {
                "code": "250",
                "message": "CHUNKING"
            }
        ]
    },
    {
        "cmd": "STARTTLS",
        "response": [
            {
                "code": "220",
                "message": "2.0.0 Ready to start TLS"
            }
        ]
    }
]

Does that help?

@clayton Do you think this might have to do with the double-attempt mail setup in the Cake mailer code?

For ref: Error: SMTP Error: 503 Authentication is allowed only once per connection

Specifically, Error: SMTP Error: 503 Authentication is allowed only once per connection - #7 by garrett

EDIT: see below, most likely not related

Yes, and what are the mail server logs showing when this was sent?

1 Like

According to https://docs.mailcow.email/client/client-manual/

Service Encryption Host Port
SMTP STARTTLS mailcow hostname 587

Please use the "plain" password setting as the authentication mechanism. Contrary to what the name implies, the password will not be transferred to the server in plain text as no authentication is allowed to take place without TLS.

Cake would attempt this first with authPlain() so it’s not likely caused by Cake in any way.

@ArchMatt Were you able to resolve the issue?

I just tried the SMTP Test Tool you originally used and the output with wrong credentials is correctly showing.

SMTP Tool Test output:

<< 220 mail.raijin.cz ESMTP Postcow

EHLO [172.31.11.248]

<< 250-mail.raijin.cz

<< 250-PIPELINING

<< 250-SIZE 104857600

<< 250-ETRN

<< 250-STARTTLS

<< 250-ENHANCEDSTATUSCODES

<< 250-8BITMIME

<< 250-DSN

<< 250 CHUNKING

STARTTLS

<< 220 2.0.0 Ready to start TLS

EHLO [172.31.11.248]

<< 250-mail.raijin.cz

<< 250-PIPELINING

<< 250-SIZE 104857600

<< 250-ETRN

<< 250-AUTH PLAIN LOGIN

<< 250-AUTH=PLAIN LOGIN

<< 250-ENHANCEDSTATUSCODES

<< 250-8BITMIME

<< 250-DSN

<< 250 CHUNKING

AUTH PLAIN AG5vLXJlcGx5QHJhaWppbi5jegAxMjM0

<< 535 5.7.8 Error: authentication failed:

AUTH LOGIN

<< 334 VXNlcm5hbWU6

bm8tcmVwbHlAcmFpamluLmN6

<< 334 UGFzc3dvcmQ6

MTIzNA==

<< 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6

ERROR: 535: 5.7.8 Error: authentication failed: UGFzc3dvcmQ6

Anything new with this issue?

It’s the weekend - give it a day before devs are back in. I cannot think of any reason why it shouldn’t work, and I normally do most email troubleshooting. It makes me think it’s not passbolt since two of you have the same issue and the thing in common is your mail server setup, but I could be wrong.

The mailcow instructions for Outlook seem hands off. Does mailcow run postfix? Do you need to whitelist your passbolt server? Mail servers can be complex… passbolt is simple. It’s using the Cake SMTP Transport library. Does your server require an ip address or domain name in the passbolt client field? Mail server errors seem it is not able to verify the ip address and domain on your clients list.

Hi @garrett thanks for your warming message!!

I think the problem was in yaml file configuration, because now i provide more smtp solution for other aplication without issue but i cannot try right now. I made new help post for set-up because i switch from Nginx Proxy Manager to treafik and i have issue with it little bit :smiley: , so we will see what change it :slight_smile:
this is what i think what i should add to yaml config file inside of enviroment for passbolt

  EMAIL_TRANSPORT_DEFAULT_HOST: "mail.raijin.cz"
  EMAIL_TRANSPORT_DEFAULT_PORT" "587"
  EMAIL_TRANSPORT_DEFAULT_USERNAME: "no-reply@raijin.cz"
  EMAIL_TRANSPORT_DEFAULT_PASSWORD: "yourownpassword"
  EMAIL_TRANSPORT_DEFAULT_TLS: "true"
  EMAIL_DEFAULT_FROM: "no-reply@raijin.cz"

@garrett @tomnick
As i mentioned before, i think its only problem inside of config file passbolt.
Because i have a same set-up as before but only difference is proxy provider. But for now i can say i tested on another machine NAS (synology) with same credentials as before and nas doesnt have problem to send a mail. Without a issue so for @tomnick you should try edit your config file for passbolt and add variables for EMAIL Official installation guide, look at variable table for email

1 Like