Re: Network error on destination MXs on MX that starts with "_"
Hi Giovanni, This is indeed an invalid hostname. A hostname must begin with a digit or letter. (https://www.rfc-editor.org/rfc/rfc1123#page-13) Jesper Wallin On 6/11/24 2:57 PM, Giovanni Bechis wrote: Hi, recently I've found this error on my server: Jun 11 10:46:33 mx smtpd[97386]: mta delivery evpid=aa1ddab63539175b from= to= rcpt=<-> source="-" relay="example.com" delay=22h31m25s result="TempFail" stat="Network error on destination MXs" The destination domain MX record is: _dc-mx.140697ab0ac1.example.com which I am not sure is valid but it's present on the wild. Is it correct that OpenSMTPD fails to deliver in this case ? OpenSMTPD version is 7.5.0 running on OpenBSD 7.5. Cheers Giovanni
Change "524 5.2.4 Mailing list expansion problem" to "550 Invalid recipient"?
Hi all, As discussed on IRC with Gilles, when using virtual table expansions or a .forward file and the lookup fail, smtpd will respond with: "524 5.2.4 Mailing list expansion problem", which I find vague and confusing. The reason for this was to make smtpd mimic the behaviour of sendmail and to differentiate between an invalid recipient and a valid recipient that has a configuration error, such as a broken .forward. I can see the reasoning behind it, yet I find it very vague and it also somewhat "leaks" details how your server is configured. I would prefer an error like "550 Invalid recipient", since it's much more accurate for the user sending the mail. Also it gives a much more unified response when the recipient address is incorrect. Regards, Jesper ps, while writing this mail, satanist on IRC suggested the workaround of adding 'rcpt-to ', which might invalidate my suggestion/patch... Still, I find the mailing list expansion error more confusing than helpful. Index: lka_session.c === RCS file: /cvs/src/usr.sbin/smtpd/lka_session.c,v retrieving revision 1.100 diff -u -p -r1.100 lka_session.c --- lka_session.c 2 Feb 2024 23:33:42 - 1.100 +++ lka_session.c 13 May 2024 21:12:22 - @@ -163,9 +163,9 @@ lka_session_forward_reply(struct forward } if (lks->error == LKA_TEMPFAIL && lks->errormsg == NULL) - lks->errormsg = "424 4.2.4 Mailing list expansion problem"; + lks->errormsg = "450 Invalid recipient"; if (lks->error == LKA_PERMFAIL && lks->errormsg == NULL) - lks->errormsg = "524 5.2.4 Mailing list expansion problem"; + lks->errormsg = "550 Invalid recipient"; lka_resume(lks); } @@ -194,7 +194,7 @@ lka_resume(struct lka_session *lks) log_trace(TRACE_EXPAND, "expand: lka_done: expanded to empty " "delivery list"); lks->error = LKA_PERMFAIL; - lks->errormsg = "524 5.2.4 Mailing list expansion problem"; + lks->errormsg = "550 Invalid recipient"; } error: if (lks->error) { @@ -255,7 +255,7 @@ lka_expand(struct lka_session *lks, stru if (xn->depth >= EXPAND_DEPTH) { log_trace(TRACE_EXPAND, "expand: lka_expand: node too deep."); lks->error = LKA_PERMFAIL; - lks->errormsg = "524 5.2.4 Mailing list expansion problem"; + lks->errormsg = "550 Invalid recipient"; return; } @@ -331,9 +331,9 @@ lka_expand(struct lka_session *lks, stru "no aliases for virtual"); } if (lks->error == LKA_TEMPFAIL && lks->errormsg == NULL) - lks->errormsg = "424 4.2.4 Mailing list expansion problem"; + lks->errormsg = "450 Invalid recipient"; if (lks->error == LKA_PERMFAIL && lks->errormsg == NULL) - lks->errormsg = "524 5.2.4 Mailing list expansion problem"; + lks->errormsg = "550 Invalid recipient"; } else { lks->expand.rule = rule;
Re: OpenSMTPD 6.4 - "Invalid recipient" with external mail client (thunderbird)
Hi, You need to specify “from any” to your relay_dkim match rule. If not specified, it defaults to “from local”, which now is different from “auth”. Regards, Jesper Wallin > On 27 Oct 2018, at 01:06, wrote: > > Hello, > > I recently upgraded my server to OpenBSD 6.4. But I have a problem with the > new > configuartion of OpenSMTPD: > > When I send a mail with Thunderbird from an external IP, my server always > returns > the error message "invalid recipient". > > When I connect to the server through SSH and send a mail via the local > client mutt, > everything works. > > This is my configuration: > --- > queue compression > queue encryption ad8004f927bd2b00a672c30704e3de11 > > pki mx1.example.com.pki cert "/etc/ssl/mx1.example.com.crt" > pki mx1.example.com.pki key "/etc/ssl/private/mx1.example.com.key" > > table aliases file:/etc/mail/aliases > table vdomains file:/etc/mail/vdomains > table vusers file:/etc/mail/vusers > > listen on lo0 > listen on lo0 port 10028 tag DKIM > listen on egress tls pki mx1.example.com.pki auth-optional > listen on egress smtps pki mx1.example.com.pki auth > listen on egress port submission tls-require pki mx1.example.com.pki auth > > action "local" mbox alias > action "relay" relay > action "domain" lmtp "/var/dovecot/lmtp" virtual > action relay_dkim relay host smtp://127.0.0.1:10027 > > match from local for local action "local" > match tag DKIM for any action "relay" > match from any for domain action "domain" > match for any action relay_dkim > --- > > Is there something wrong in my current configuration? > > Thanks in advance! > > Cheers > Johannes > > > -- > You received this mail because you are subscribed to misc@opensmtpd.org > To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org > -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org