On 12/28/2013 1:46 AM, Jeroen Geilman wrote:
On 12/27/2013 01:13 PM, post...@pupat-ghestem.net wrote:
Hello,
I am trying to setup an email address where only mails from
authorized users (defined in a list) would come in and other emails
would be forwarded to another address.
To a single address? Local or remote ?
Are you only testing the sender address in this ?
If so, why are you accepting unauthorized senders at all?
Is the recipient is irrelevant, i.e. you want a wildcard accept policy ?
Just as in moparisthebest's message this is to filter email coming to my
kid's email.
This is a single address. Lets call it b...@mydomain.com. Any mail from
authorized senders (family, friends, ...) goes to bill's mailbox. Any
other mail goes to another mailbox (bob).
I would indeed be testing the sender's email only for emails going to
that particular recipient (b...@mydomain.com)
Note that the last option is a definite no-no as far as I am
concerned; you want to verify the recipient before you check for
authorized senders.
I was thinking of doing this with a combination of postfix and procmail:
having postfix delivering all incoming email, then procmail forward
and delete email not coming form authorized users. Before
implementing it I was wondering if there is a postfix-only solution
to this.
You could use sender_dependent_default_transport_maps: map the
authorized senders to DUNNO (thus using whatever it was going to use
before) and everything else to a custom transport that sends it
wherever you want.
http://www.postfix.org/postconf.5.html#sender_dependent_default_transport_maps
--
J.