News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

cron.php and older topics triggering emails to not-supported domains

Started by JazzyNL, July 04, 2023, 01:17:26 PM

Previous topic - Next topic

JazzyNL

SMF 2.1.4

Issue:
Roughly once every minute we see an entry in the logs indicating that the server was not able to send an email. The Smart Host responded with:
501 5.1.5 Recipient address reserved by RFC 2606 [DBAEUR03FT048.eop-EUR03.prod.protection.outlook.com 2023-07-04T15:50:11.428Z 08DB7BFD418CE3EE]

Happened since:
Recently we had some issues after an admin moved thousands of topics and to resolve them we tried to use the 'Find and repair any errors' task but our server could not handle the load and eventually this time out. Tried again, failed. Temporary disabled load balancing to prioritize the job to have it finish completely, but also failed. Eventually we were able to run 'Recount all forum totals and statistics' which resolved our last issues.

Error means:
This means that the server tried to submit an email with a recipient address with a domain that ends with .test, .invalid, .example or similar. I found one user with an example.com and deleted their account.

Unfortunately the full error does not include the email address that SMF is trying to send to. And since the Smart Host does rejects the email there is no information in the message tracking logs. The url in the error message either is https://www.htforum.nl/yabbse/cron.php or a very old topic, e.g.  https://www.htforum.nl/yabbse/index.php?topic=84820.0

So apparently there is either one message in the mail queue where the forum keeps trying to send it, even though a 5xx SMTP error indicates a permanent failure. Or there are a whole bunch of emails in the queue, each generating this error.

Full error with backtrace:
Error
Type of error
General
Error message
Ran into problems sending mail. Error: 501 5.1.5 Recipient address reserved by RFC 2606 [DBAEUR03FT009.eop-EUR03.prod.protection.outlook.com 2023-07-04T15:15:11.192Z 08DB7BE1BD6A15AD]

URL of page causing the error
https://www.htforum.nl/yabbse/index.phphttps://www.htforum.nl/yabbse/cron.php
Backtrace information
#0: server_parse()
Called from /var/www/htforum.nl/yabbse/Sources/Subs-Post.php on line 1533
#1: smtp_mail()
Called from /var/www/htforum.nl/yabbse/Sources/ScheduledTasks.php on line 795
#2: ReduceMailQueue()
Called from /var/www/htforum.nl/yabbse/cron.php on line 152

JazzyNL

As these things go, immediately after posting this I realized seeing some posts about managing the mail queue. Under Maintenance, Mail I found the option to browse the mail queue. Found the [email protected] email, deleted it and clicked Send Mail Queue Now.

Issue resolved.  :)

JazzyNL

It makes you wonder though, if an email cannot be sent and the SMTP server responds with a 5xx error code, why keep trying? I understand SMF is not a proper email server, but if you're maintaining a queue it should be smart enough to understand when to drop the message. Especially since everything else is backup up and not processed, waiting for that one email to be sent which is never going to happen...

Think there's room for improvement here.

Kindred

Well, in 15 years, that's the first time I've ever heard of that problem....

Not that it couldn't be improved... but seriously,  never even heard of anyone else seeing that
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Illori


JazzyNL

Quote from: Kindred on July 04, 2023, 04:40:33 PMWell, in 15 years, that's the first time I've ever heard of that problem....

Not that it couldn't be improved... but seriously,  never even heard of anyone else seeing that
That's fair. This is relatively rare because in most email delivery issues, the message is accepted by the SMTP server first and only when the SMTP server is not able to relay the message to the receiving server, it will generate a non-delivery report. This applies to the most common issues such as an email address no longer existing or mailbox full.

In this case the message was rejected during the SMTP conversation between SMF and SMTP smart host. There could be other reasons for this to happen but these are less common than the other issues that occur further downstream.


shawnb61

We have seen another case of this, where a new SMTP configuration did not exhibit the expected "relay" behavior, and in fact, validated the recipient's email prior to even accepting the request.  This leaves bad email addresses stuck in your SMF mail queue.

Logged up on GitHub:
https://github.com/SimpleMachines/SMF/issues/7787

In the meantime, you will need to manually remove those entries from the mail queue.
A question worth asking is born in experience & driven by necessity. - Fripp

Advertisement: