Rejecting email with an informative message

Drew Marshall drew at THEMARSHALLS.CO.UK
Mon Nov 28 11:49:36 GMT 2005


    [ The following text is in the "iso-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

On Mon, November 28, 2005 11:18, Peter Bates wrote:
> Hello all...
>
> I'm not sure which bit of MailScanner is best suited to this task,
> so apologies for asking here.
>
> We're getting complaints about a 'persistent offender' sending
> emails to a variety of recipients here, that said recipients want
> blocking.
>
> Normally I'd do this at the MTA, but the Postfix errors are more of
> the
> '550 No thanks' or '550 Please see http://blah/blah' order.
>
> The actual recipients would like to return a nicely formatted
> 'thanks, but no thanks' to this particular sender.
>
> What is the quickest way to do this in MailScanner, to deliver
> some custom message from the reports directory?

It is easier to do this from Postfix and will save you bandwidth as well.

Just set up check_client_access <file_name> under
smtpd_client_restrictions (In main.cf) with something like

not_wanted at nastysender.com reject Thanks but no thanks

Don't forget to postmap this file and reload Postfix. Postfix will now 550
all mail from that e-mail address (Or you can use IP address, hostname,
domain etc).

More details can be found here http://www.postfix.org/postconf.5.html
search for smtpd_client_restrictions

HTH

Drew


-- 
In line with our policy, this message has 
been scanned for viruses and dangerous 
content by MailScanner, and is believed to be clean.
www.themarshalls.co.uk/policy

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!



More information about the MailScanner mailing list