When rejecting emails that are classified as spam by whatever means, there's always the chance of false positives. On the other hand, when accepting emails that may be spam and dumping them into a spam folder the owner of the mailbox might not check that folder and miss an important email while the sender assumes it has been delivered.

I think the perfect solution for this would be to reject the email as far as the sender is concerned but still deliver it to a spam folder.

So my questions are:

  • Is it possible/allowed for an SMTP server (as far as the SMTP protocol and related RFCs are concerned) to reject an email after receiving everything (i.e. all header and the full message body) without errors?
  • Is it possible to achieve this behavior with Postfix, ideally without having to modify its code.
  • Might be stupid but have you considered automating that process with an external script that checks every x time if there's new mails in the spam folder and if so, sends one to the sender saying "Hey, your message was rejected"? – sysfiend Nov 25 '16 at 15:31
  • 2
    @Alex: That's causing backscatter spam and generally a really bad idea :) Also, in case of false positive it would look really unprofessional or annoying. Imagine an email from a mailing list where you have posting permissions being classified as spam... – ThiefMaster Nov 25 '16 at 15:32
  • Stupid idea then :D – sysfiend Nov 25 '16 at 15:33

As you seen in the comments, bad idea. Microsoft has attempted to use this as a way to prevent email harvesting, they reject the emails at the DATA entry instead of at the FROM/TO, causing a lot of headaches for those of us that put exchange behind a spam filter. (Enter Backscatter)

SMTP Reject is the only way to properly reject emails, if you do not reject at the SMTP level you must accept and store/drop the message, ALSO, if you reject at this level it would be based on Domain/IP Reputation, not content. The server reputation is not your problem.

  • I do want to reject at the SMTP level as far as the sender is concerned. Just without actually discarding the email. Can't the server reject instead of OK-ing after having received all the DATA? Surely this must be possible to to content-based analysis, right? – ThiefMaster Nov 25 '16 at 16:18
  • no, at that point it's a new email back, read this page. postfix.org/FILTER_README.html – Jacob Evans Nov 25 '16 at 16:46

Technically possible. Would be less convenient.

Your design is in error here: "[after seeing SMTP OK] the sender assumes it has been delivered". Not true on two levels. First of all, the goal is always to be actually read by a human recipient, not only getting onto their disk. Secondly, there is no SMTP OK today, really. Your design doesn't change that. When the servers say "OK" they don't mean that; they mean: "I can't say if a human will read this mail or not; see ya".

Now at least SMTP reject means true reject. The main effect of your change is changing SMTP reject to mean "I can't say if a human will read this mail or not; chances are bad; see ya". And that's about the same as SMTP OK, just with a slightly negative tone.

To sum up the changes as perceived by humans:

  • When sending and seeing SMTP OK, nothing changes as sender is still unsure if the email really got read by the recipient, and still unsure if the email got saved to the mailbox or to the spam folder
    • ...that's because Recipients are allowed to ignore any emails at will.
    • ...and servers can have nasty implementation errors
  • When sending and seeing SMTP reject, more uncertainty: Have a human read my email or not? Should I re-send? How many times? Oh my, why is human replying when I've only got SMTP reject so far?

What changes for a recipient:

  • In addition to normal spam folder contents, they now often see multiple retries, both automatic and human, caused by SMTP rejections. So, more emails to read, that's bad.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.