-1

I'm using Return-path header to get bounced mail back in a specific address. I was asking if there's a way, to detect spam message as well.

1 Answers1

1

Return-Path is not reliable attribute of spam, and none of headers is, until some sophisticated techniques like SPF/DKIM/DMARK is used.

All the headers of the spam can be forged and they are. You shouldn't bounce any spam message if you do not reject submission attempt at the CONN stage. You can drop that message, you can feed it to the bayesian, you can do anything you want except sending it back to the internet. Otherwise you'll be classified as spammer in a very short time.

If you are interested how to determine spam, there are two news.

Bad one is that there is no rock-steady criteria.

Good one is that you can get almost 99.9% reliable decision if

  • message was submitted from the host with a proper "A" record AND
  • message was submitted from the host not listed in the local blacklist AND
  • message body was successfully passed by the well-trained bayesian filter

If any condition above is failed the message is definitely spam. But if all three are passed there is still 0.1% probability that message is forged.

Kondybas
  • 686
  • 6
  • 15