Reject message only if it's not a spam

Antony Stone Antony.Stone at
Wed Sep 30 10:19:23 UTC 2015

On Wednesday 30 September 2015 at 12:12:04, Mateusz Krawczyk wrote:

> Hello,

Yes, we saw your message the first time.  No need to send a duplicate.

> I'm trying to write a custom perl function for "Reject Message" config
> parameter. I would like to bounce / reject mails only if there are
> definitely not spam.

Okay, so you want to bounce, or reject, only non-spam...

What are you doing with spam?  Hopefully rejecting or discarding.

So, ignoring the bounce option for the time being, why do you need to know 
whether an email is spam or not in order to reject or discard it?  Just do it.

(I'm assuming that by "reject" you mean "discard once your mail server has 
accepted it" and not "reject during SMTP dialogue", since this is all 
MailScanner can do - you would need other tools to reject at the SMTP stage.)

And, returning to the bounce option, why would you ever want to do this?  The 
only reason which occurs to me at present is for no-longer valid email 
addresses - in which case you should be rejecting at the SMTP stage, at which 
point valid senders will be told "your message could not be delivered".



If the human brain were so simple that we could understand it,
we'd be so simple that we couldn't.

                                                   Please reply to the list;
                                                         please *don't* CC me.

More information about the MailScanner mailing list