Ulf Zimmermann wrote:
Hello, everyone.

I thought before I potential reinvent the wheel, I would ask here if
someone hasn't done this before:

I am looking at doing 3 things in postfix on a relay which is set as the
smart relay on a number of machines.

1.) Check the client host name, if in table 1, allow relay
unconditional, stop further checks

mynetworks = cidr:/etc/postfix/mynetworks

== mynetworks
127.0.0.1/32    OK
192.168.1.0/24  OK
...


2.) Check if recipient address is [EMAIL PROTECTED], [EMAIL PROTECTED] but
not [EMAIL PROTECTED], if true, then allow relay and stop further
checks.

put domain1.com and domain2.com in ONE of mydestination, relay_domains, virtual_mailbox_domains, virtual_alias_domains.

do not put ml.domain2.com there. and set
parent_domain_matches_subdomains=
well. read the docs for what you can/should do.


3.) Check the client host name, if in table 2, use field in table to
rewrite the recipient address and insert header with original recipient
address, stop further checks.

What if the message is addressed to many recipients. would you add 100 headers if you have 100 recipients?

and worst, what if some of these recipients were BCC'ed. you don't want to expose the Bcc to the recipients.


4.) And last if all fails, rewrite the recipient address to
[EMAIL PROTECTED], which will allow us to classify the
client host into 1 or 3.


what is the goal here?

Anyone done something similar and cares to share? Any other suggestions?

Reply via email to