<<When an email is release and delivered out of quarantine, doesn't the receiving SMTP then send the 250 OK code?>>
When a remote server sends an email to the receiving SMTP server (SpamFilter in this case), the transmission will either succeed (the receiver sends a 250 OK code) or fail (the receiver sends an error code). If it fails, the remote server is disconnected, the SMTP session is terminated, and unfortunately there is no way for the receiver server to contact the sender's server back with an "oops, we made a mistake, here's the email".
Please note that an email can stay in the quarantine for days, and there is no way that a remote SMTP server can stay connected to SpamFilter for days waiting for either a final positive or negative response.
One could then say "Well, then if you accept email and quarantine it, the email has actually been received successfully, so you must send a 250 OK code to the sender to let them know". In theory it would be fairly simple to add such an option. It is very dangerous however. Let me explain why. Say that SpamFilter was to accept all emails and quarantine them without reporting any errors. There are many, many automated servers out there that do nothing all day long but to scan for smtp ports, and then test them to check if they can relay email to third parties. Usually they do so by using your server as a relay trying to send an email out. If they succeed, two things can happen. (1) they are spammers, in which case your server will appear on list of open relays spammers will try to use. You'll then be flooded by spam email relay attempts. (2) they are anti-spam organizations, in which case your site will be listed as an open relay and will appear on black-lists!
Please note that it is good that SpamFilter works as it does, as if senders were not notified of non-deliveries, they would never know that their email was rejected.... Only a fraction of the users actually checks their quarantine routinely and force delivery of valid emails. All the others would thus simply "vanish" without senders knowing they were not delivered and recipients not knowing they were sent. These notifications help in avoiding these situations.
Again one may argue "ok then, why don't you then accept all emails, and then only send a NDR when the quarantined email has reached the expiration period and has been deleted from the database?"
Suppose things worked like that, rejection notices sent only after an item has been deleted from the quarantine. Joe sends an email to you. It gets blocked and quarantine. Joe is not notified yet that his email was blocked. Your quarantine is configured to hold mail for 2 weeks. During these two weeks either you do not check your quarantine (which is usually the case for most users), or you miss seeing his email amid the dozens of other emails in there. Joe is wondering why you do not reply to him... After two weeks the email is deleted from the quarantine. Joe is now notified, two weeks later, that his email was rejected. But it was too late since not hearing from you he assumed you were not interested in his email.
Email occurs more or less in real time. Users need to know as soon as possible of any problems that occur with their emails. When an email is quarantined, it must be considered, effectively, as the email was not delivered. The fact that it is instead temporarily stored in a quarantine are must be thought of as a convenience for the receiving user, allowing him/her to check if any emails were blocked by mistake, and if so, recover them.
As for Joe having to resend an email, that's actually much better than Joe not knowing his email was blocked! If he receives an error immediately, he will then email you or your admin or his admin asking what the problem is. This will at least tell him there was a delivery problem *immediately*, and won't have to wait two weeks to find out about it. You may check your quarantine often, but others won't. And even if you check it daily, what if the blocked email was time-sensitive? You and him would only find out later when you check your quarantine.
Hope all this helps in understanding why we designed SpamFilter like this.
Roberto F. LogSat Software
|