-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SMTP Email - live server edits vs relay #7787
Comments
To provide a bit more context, there can be all kind of reasons why an SMTP server would not accept the message. In all cases the SMTP server will respond with an error code that consists of three fields, separated by a dot. Temporarily failures return an error code that starts with a 4, e.g.: 4.2.1.: Your message was temporarily deferred by the recipient server. This is usually a result of too many connections in a short timeframe or too many messages. As the text indicates, these are typically issues where we should retry to send the email at a later time. Permanent errors return an error code that starts with a 5. Some samples: 5.1.5 Recipient address reserved by RFC 2606 These errors are permanent, hence the next time we will try to send we should expect it to fail again. If this leads to modifying the SMF mail queue behavior, we probably should evaluate that error message to determine the appropriate action. In case of a 5xx error the message probably should be removed from the queue, or at least not be processed again. When the error is of the 4xx type we may want to try again later, but the question is if that would be immediately or maybe hold the message a few minutes before trying to send it again. Hope this helps. I'm not a developer but I do like to think that I understand email. |
Fixes SimpleMachines#7787 Trying to keep inside the database schema, i'm abusing the priority level to slowly raise it to the max (127 due to signed tinyint). It does this over a period of 3 days (which can be changed) by calculating the difference between the current time and the time the email was sent.
550 can also occur, seems from exim validating the recipient domain and it not existing. @JetzeMellema, |
Incase anyone wants to know, we can add more errors. But the errors we don't log I think should be for remote server issues. Any local mail server issues should be logged, allowing the admin to know to correct that. The admin can't fix a remote mail server. |
What about "user doesn't exist"? Wouldn't that be useful info for the admin? (Or is that a "local" error?) |
Can you explain what you'd consider local or remote server issues? |
Errors received from the recipients mail server are remote. Errors from the sending server are local. |
We are talking about error messages during the SMTP conversation, to stick with your terminology this would be local error messages. If the smarthost server accepts the email and fails to deliver the message to the recipients mail server, it will generate a non-delivery report message and send this email back to the from-address. So in the context of this change, all error messages we receive during the SMTP conversation are local. We have no visibility in any delivery issues that happen on downstream servers. Let me know if this doesn't make sense. |
If your mail server says something like you have exceeded your sending limits or DNS failure. That is more than likely a configuration issue that you can resolve. If the error message received is that the recipient doesn't exist, that is something the admin can't fix and shouldn't log. Some mail systems seem to be verifying before accepting the mail during the transmission. Either way, the email will be deleted over time. Just we don't want to delete messages which may assist the admin in understanding that their sending server (I avoid using local as it could be a remote server not local to the web server) has a configuration issue that needs addressed. |
Description
We have seen a couple of instances where SMTP servers are performing edits when SMF connects to queue up an email for sending. I.e., it is validating the recipient in real time, while adding the entry to the mail queue on the SMTP server.
Some SMTP servers apparently allow this behavior, and do not act as a relay.
The far more common behavior is to queue it up, and later, upon sending, if it fails, it fails.
The problem with this behavior, though, is that the request fails, the entry remains in the mail queue. So, it gets processed again, the next time the SMF mail queue gets processed.
So... If the recipient does not exist, the email can stay in the SMF queue forever...
Additional information/references
From the forum: https://www.simplemachines.org/community/index.php?topic=586346.0
The text was updated successfully, but these errors were encountered: