I Have been reading:
http://www.postfix.org/ADDRESS_VERIFICATION_README.html
http://www.postfix.org/SMTPD_ACCESS_README.html
http://www.postfix.org/RESTRICTION_CLASS_README.html
And I am still unsure on how to go one step forward..
I want to allow my local SMTP authenticated users to be able to send
only with a From of the local domains of the local service.
For example I have about 10-20 domains that the server is serving and I
want to allow to send from domains:
example.com OK
hotmail.com REJECT
example2.com OK
etc...
but only on auth users and not mynetworks.
As step 1 I will want to block all users to do that and later on allow
some exceptions in the form of domain or a username+domain.
I have the domains in a mysql table so if I can use this table it will
make my life easier.
The first thing I was thinking about was to write a SMTP POLICY DAEMON
that will test for that and will answer with a DUNNO for allowed
domains, mynetworks and special allowed users.
Maybe there is a another way built in postfix that I did not noticed
until now.
Thanks,
Eliezer