SMTP issue: An unhandled server error has occurred on verification email sending


I’m using self-hosted Bitwarden with self-hosted Postfix mail server. I’m trying to verify my account with email, but getting this:

At the same time, test of sending message via “mail” command of mailutils package is successful

echo "This is the body of the email" | mail -s "This is the subject line" your_email_address

Can you help me figure it out? Thank you in advance. confs:

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname =
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination =,,, localhost.$mydomain, localhost
relayhost =
mynetworks = [::ffff:]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all


globalSettings__sqlServer__connectionString="Data Source=tcp:mssql,1433;Initial Catalog=vault;Persist Security Info=False;User ID=sa;Password=nMFRBfpwh3N4lXTJmU0SOVWK3YFGQaF7;MultipleActiveResultSets=False;Connect Timeout=30;Encrypt=Tru>globalSettings__identityServer__certificatePassword=lBSspN9U4wA0OJ1TIYVE8FP3htySb4vB

Check your postfix logs. What’s the destination email?

My guess is the email server requires authentication. Easy workaround, put the docker’s range into mynetworks.

Destination email is [email protected]

That’s successful logs from mailutils sending:

Apr  7 12:50:30 211652 postfix/pickup[1352912]: 10CBD800D1: uid=0 from=<[email protected]>
Apr  7 12:50:30 211652 postfix/cleanup[1354616]: 10CBD800D1: message-id=<[email protected]>
Apr  7 12:50:30 211652 postfix/qmgr[1352913]: 10CBD800D1: from=<[email protected]>, size=377, nrcpt=1 (queue active)
Apr  7 12:50:30 211652 postfix/smtp[1354618]: 10CBD800D1: to=<[email protected]>,[]:25, delay=0.51, delays=0.01/0.01/0.14/0.35, dsn=2.0.0, status=sent (250 2.0.0 OK  1649325030 r12-20020a5d52cc000000b00205932665e7si12419468wrv.772 - gsmtp)
Apr  7 12:50:30 211652 postfix/qmgr[1352913]: 10CBD800D1: removed

And that’s logs of attempts to send message via telnet:

Apr  7 12:51:14 211652 postfix/smtpd[1354915]: connect from[]
Apr  7 12:51:36 211652 postfix/smtpd[1354915]: NOQUEUE: reject: RCPT from[]: 454 4.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=SMTP
Apr  7 12:51:39 211652 postfix/smtpd[1354915]: disconnect from[] mail=1 rcpt=0/1 quit=1 commands=2/3

Try to verify your email again and show the relevant logs from your mailserver.

The logs earlier are not related to Bitwarden.

Apr  7 15:11:49 211652 postfix/smtpd[1443527]: connect from unknown[]
Apr  7 15:11:49 211652 postfix/smtpd[1443527]: NOQUEUE: reject: RCPT from unknown[]: 454 4.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<[]>
Apr  7 15:11:49 211652 postfix/smtpd[1443527]: lost connection after RSET from unknown[]
Apr  7 15:11:49 211652 postfix/smtpd[1443527]: disconnect from unknown[] ehlo=1 mail=1 rcpt=0/1 rset=1 commands=3/4

Sorry for the delay.

As you can see, the email is rejected because the email server is not configured to relay your email.

The quickest workaround for this issue is to add in mynetworks (Postfix).

It helped, thanks.

Make sure you set the correct replyToEmail! If this address doesn’t exist, many SMTP servers will FAIL to send.

gl[email protected]
1 Like

This was helpful. thank you.