On Fri Feb 05 2016 17:47:50 Wietse Venema       <wie...@porcupine.org> said:
> 
> Not with things that are built into Postfix. Probably with
> a policy daemon (postfwd?) or external content filter.

OK, how about if we look at it this way.

Is it possible to redirect an email to an address based on the sender’s address?

For example, ALL email from remoteu...@example.net would be redirected to 
localuserl...@example.com

Then I could make localuserl...@example.com and alias.

header_check.prce
/^From:.*remoteu...@example.net/ REDIRECT localuserl...@example.com

virtual
localuserl...@example.com     user1, user2, user3

That is only matching one line and REDIRECT is only going to one address.

I tried this in header_checks.pre but I get

postfix/pipe[14747]: 3pyV3b1QfJzJMjC: to=<t...@kreme.com>, 
orig_to=<kr...@kreme.com>, relay=dovecot, delay=0.08, delays=0.06/0/0/0.02, 
dsn=5.1.1, status=bounced (user unknown)

# postmap -q t...@kreme.com hash:/etc/postfix/virtual 
test1+t...@kreme.com,test2+t...@kreme.com

The users test1 and test2 exist


-- 
"You can think and you can fight, but the world's always movin', and if
you wanna stay ahead you gotta dance."

Reply via email to