NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: filtering on From with postfix / postgrey



On Thu, Sep 04, 2008 at 07:07:39PM +0100, Philip wrote:
> I have three small children who would like an email account to email
> their friends.
> I have my own domain which points to a netbsd 3.1 mail server running
> postfix, postgrey and dovecot.
> What I would like to do is set up email accounts on the server for the
> children which will only receive email from a white list of From:
> addresses, but which will not affect other users normal accounts.
> I guess I don't need a whitelist per child if that makes any difference.
> I can't figure out how to do this, does anyone here know how to?

I think you could use header_checks(5):

# Usage (main.cf):
# header_checks = regexp:/etc/postfix/header_checks
#
if /^(To|Cc): .*mychild%mydomain.com.@localhost*/
/^From: friend1%domain1.com@localhost/  OK
/^From: friend2%domain2.com@localhost/  OK
/^From: friend3%domain3.com@localhost/  OK
/^From: friend4%domain4.com@localhost/  OK
/^From: .*/                     REJECT
endif


But I would prefer sieve if it's available.


Home | Main Index | Thread Index | Old Index