I setup an on premises mail server for my domain, to send and receive emails.
I've picked Stalwart mail server for this.
I deployed and configured the system, to the point which I am able to receive emails on my domain email addresses, but I've failed at making the system send emails properly.
It can send emails to my domain email addresses, but if I try to send an email to a gmail or yahoo account, I get errors like:
550 5.1.2 Relay not allowed.
Any idea what could be wrong?
Thanks
My mail server logs generate when this error occurs are:
[2m2023-08-15T14:33:08.731705Z[0m[34mDEBUG[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2msmtp::inbound::ehlo[0m[2m:[0m[3mcontext[0m[2m=[0m"dnsbl"[3mevent[0m[2m=[0m"invalid-reply"[3mquery[0m[2m=[0m"7.e.0.1.5.e.a.8.f.f.f.f.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.zen.spamhaus.org."[3mreply[0m[2m=[0m[127.255.255.254]
[2m2023-08-15T14:33:10.481369Z[0m[35mTRACE[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2msmtp::inbound::session[0m[2m:[0m[3mevent[0m[2m=[0m"write"[3mdata[0m[2m=[0m"220 mail.queeq.com Stalwart SMTP at your service\r\n"[3msize[0m[2m=[0m50
[2m2023-08-15T14:33:10.484529Z[0m[35mTRACE[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2msmtp::inbound::session[0m[2m:[0m[3mevent[0m[2m=[0m"read"[3mdata[0m[2m=[0m"EHLO [192.168.1.95]\r\n"[3msize[0m[2m=[0m21
[2m2023-08-15T14:33:10.484624Z[0m[34mDEBUG[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2msmtp::inbound::ehlo[0m[2m:[0m[3mcontext[0m[2m=[0m"dnsbl"[3mevent[0m[2m=[0m"dnserror"[3mquery[0m[2m=[0m"[192.168.1.95].dbl.spamhaus.org."[3mreson[0m[2m=[0mDNS resolution error: proto error: Label contains invalid characters: Err(Errors { invalid_mapping, disallowed_by_std3_ascii_rules })
[2m2023-08-15T14:33:10.484697Z[0m[34mDEBUG[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2msmtp::inbound::ehlo[0m[2m:[0m[3mcontext[0m[2m=[0m"spf"[3mevent[0m[2m=[0m"lookup"[3midentity[0m[2m=[0m"ehlo"[3mdomain[0m[2m=[0m"[192.168.1.95]"[3mresult[0m[2m=[0mTempError
[2m2023-08-15T14:33:10.484750Z[0m[34mDEBUG[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2msmtp::inbound::ehlo[0m[2m:[0m[3mcontext[0m[2m=[0m"ehlo"[3mevent[0m[2m=[0m"ehlo"[3mdomain[0m[2m=[0m"[192.168.1.95]"
[2m2023-08-15T14:33:10.484844Z[0m[35mTRACE[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2msmtp::inbound::session[0m[2m:[0m[3mevent[0m[2m=[0m"write"[3mdata[0m[2m=[0m"250-mail.queeq.com says hello\r\n250-STARTTLS\r\n250-SMTPUTF8\r\n250-SIZE 104857600\r\n250-REQUIRETLS\r\n250-PIPELINING\r\n250-ENHANCEDSTATUSCODES\r\n250-CHUNKING\r\n250-BINARYMIME\r\n250 8BITMIME\r\n"[3msize[0m[2m=[0m180
[2m2023-08-15T14:33:10.489642Z[0m[35mTRACE[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2msmtp::inbound::session[0m[2m:[0m[3mevent[0m[2m=[0m"read"[3mdata[0m[2m=[0m"STARTTLS\r\n"[3msize[0m[2m=[0m10
[2m2023-08-15T14:33:10.489746Z[0m[35mTRACE[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2msmtp::inbound::session[0m[2m:[0m[3mevent[0m[2m=[0m"write"[3mdata[0m[2m=[0m"220 2.0.0 Ready to start TLS.\r\n"[3msize[0m[2m=[0m31
[2m2023-08-15T14:33:10.498472Z[0m[32m INFO[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2mutils::listener::listen[0m[2m:[0m[3mcontext[0m[2m=[0m"tls"[3mevent[0m[2m=[0m"handshake"[3mversion[0m[2m=[0mTLSv1_3[3mcipher[0m[2m=[0mTLS13_AES_256_GCM_SHA384
[2m2023-08-15T14:33:10.498565Z[0m[35mTRACE[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2msmtp::inbound::session[0m[2m:[0m[3mevent[0m[2m=[0m"read"[3mdata[0m[2m=[0m"EHLO [192.168.1.95]\r\n"[3msize[0m[2m=[0m21
[2m2023-08-15T14:33:10.498634Z[0m[35mTRACE[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2msmtp::inbound::session[0m[2m:[0m[3mevent[0m[2m=[0m"write"[3mdata[0m[2m=[0m"250-mail.queeq.com says hello\r\n250-SMTPUTF8\r\n250-SIZE 104857600\r\n250-REQUIRETLS\r\n250-PIPELINING\r\n250-ENHANCEDSTATUSCODES\r\n250-CHUNKING\r\n250-BINARYMIME\r\n250 8BITMIME\r\n"[3msize[0m[2m=[0m166
[2m2023-08-15T14:33:10.546754Z[0m[35mTRACE[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2msmtp::inbound::session[0m[2m:[0m[3mevent[0m[2m=[0m"read"[3mdata[0m[2m=[0m"MAIL FROM:<[email protected]> BODY=8BITMIME SIZE=410\r\n"[3msize[0m[2m=[0m51
[2m2023-08-15T14:33:10.792869Z[0m[34mDEBUG[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2msmtp::inbound::mail[0m[2m:[0m[3mcontext[0m[2m=[0m"iprev"[3mevent[0m[2m=[0m"lookup"[3mresult[0m[2m=[0mperm error; DNS record not found: Non-Existent Domain[3mptr[0m[2m=[0m""
[2m2023-08-15T14:33:10.836554Z[0m[34mDEBUG[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2msmtp::inbound::ehlo[0m[2m:[0m[3mcontext[0m[2m=[0m"dnsbl"[3mevent[0m[2m=[0m"invalid-reply"[3mquery[0m[2m=[0m"queeq.com.dbl.spamhaus.org."[3mreply[0m[2m=[0m[127.255.255.254]
[2m2023-08-15T14:33:10.886759Z[0m[34mDEBUG[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2msmtp::inbound::mail[0m[2m:[0m[3mcontext[0m[2m=[0m"spf"[3mevent[0m[2m=[0m"lookup"[3midentity[0m[2m=[0m"mail-from"[3mdomain[0m[2m=[0m"[192.168.1.95]"[3msender[0m[2m=[0m"[email protected]"[3mresult[0m[2m=[0mPass
[2m2023-08-15T14:33:10.886800Z[0m[34mDEBUG[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2msmtp::inbound::mail[0m[2m:[0m[3mcontext[0m[2m=[0m"mail-from"[3mevent[0m[2m=[0m"success"[3maddress[0m[2m=[0m"[email protected]"
[2m2023-08-15T14:33:10.886870Z[0m[35mTRACE[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2msmtp::inbound::session[0m[2m:[0m[3mevent[0m[2m=[0m"write"[3mdata[0m[2m=[0m"250 2.1.0 OK\r\n"[3msize[0m[2m=[0m14
[2m2023-08-15T14:33:10.891118Z[0m[35mTRACE[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2msmtp::inbound::session[0m[2m:[0m[3mevent[0m[2m=[0m"read"[3mdata[0m[2m=[0m"RCPT TO:<[email protected]>\r\n"[3msize[0m[2m=[0m28
[2m2023-08-15T14:33:10.891707Z[0m[34mDEBUG[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2msmtp::inbound::rcpt[0m[2m:[0m Relay not allowed.[3mcontext[0m[2m=[0m"rcpt"[3mevent[0m[2m=[0m"error"[3maddress[0m[2m=[0m"[email protected]"
[2m2023-08-15T14:33:15.893716Z[0m[35mTRACE[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2msmtp::inbound::session[0m[2m:[0m[3mevent[0m[2m=[0m"write"[3mdata[0m[2m=[0m"550 5.1.2 Relay not allowed.\r\n"[3msize[0m[2m=[0m30
[2m2023-08-15T14:33:15.908812Z[0m[35mTRACE[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2msmtp::inbound::session[0m[2m:[0m[3mevent[0m[2m=[0m"read"[3mdata[0m[2m=[0m""[3msize[0m[2m=[0m0
[2m2023-08-15T14:33:15.908834Z[0m[34mDEBUG[0m[1msession[0m[1m{[0m[3minstance[0m[2m=[0m"smtp"[3mprotocol[0m[2m=[0mSmtp[3mremote.ip[0m[2m=[0m"::ffff:138.229.16.231"[3mremote.port[0m[2m=[0m40426[1m}[0m[2m:[0m[2msmtp::inbound::spawn[0m[2m:[0m Connection closed by peer.[3mevent[0m[2m=[0m"disconnect"[3mreason[0m[2m=[0m"peer"