From: a113n on
Is there a way to configure postfix (or possibly procmail) to bounce
emails from specific emails addresses? I'd like to prevent all email
from specific addresses from reaching any of my mailboxes. I've read
through the postfix documentation, but I don't see anyway of forcing a
bounce, and the references to doing this via procmail state that this
is a bad idea because the mail has already been accepted by the time
it reaches procmail.

--
Ryan
From: Ralf Hildebrandt on
On 2007-11-28, a113n <dageyra(a)gmail.com> wrote:
> Is there a way to configure postfix (or possibly procmail) to bounce
> emails from specific emails addresses? I'd like to prevent all email
> from specific addresses from reaching any of my mailboxes.

Reject, not bounce.

> I've read through the postfix documentation, but I don't see anyway of
> forcing a bounce,

check_sender_access

--
Ralf Hildebrandt (i.A. des IT-Zentrums) Ralf.Hildebrandt(a)charite.de
Charite - Universitätsmedizin Berlin Tel. +49 (0)30-450 570-155
Gemeinsame Einrichtung von FU- und HU-Berlin Fax. +49 (0)30-450 570-962
IT-Zentrum Standort CBF send no mail to plonk(a)charite.de
From: ONYX on
On 29 ÎÏÑÂ, 02:39, a113n <dage...(a)gmail.com> wrote:
> Is there a way to configure postfix (or possibly procmail) to bounce
> emails from specific emails addresses? I'd like to prevent all email
> from specific addresses from reaching any of my mailboxes. I've read
> through the postfix documentation, but I don't see anyway of forcing a
> bounce, and the references to doing this via procmail state that this
> is a bad idea because the mail has already been accepted by the time
> it reaches procmail.
>
> --
> Ryan

just check sender before accepting data!
use check_sender_access for NON smtpd_sender_restrictions, like this:

smtpd_recipient_restrictions = ...,
...,
check_sender_access
regexp:/path/to/file_with_restrictions,
...

The file /path/to/file_with_restrictions must contain something like
that:
/^spamer@.*/ REJECT Drink a poison
/.*@spamer-domain.com$/ REJECT Drink a poison
/^good-sender@.*/ OK
/.*@good-domain.com/ OK

If you wish to use smtpd_sender_restrictions - use it without
check_sender_access:

smtpd_sender_restrictions = ...,
...,
regexp:/path/to/
file_with_restrictions,
...