On 8/5/2012 11:24 PM, Adam NEVERT wrote:
On 8/5/2012 10:13 PM, Adam NEVERT wrote:
The client would be on my local network only /192.168.0.*/ and for
any email sending I configure postfix so that it tries to use TLS if
the client support it.
So to sum up I want the user /maintenance/ to be able to send any
email only from /192.168.0.*/ and only to my domain /sample.com /(to
avoid spaming if an indelicate user understands this user doesn't
need authenticating).
Thank you for providing a better description of the requirements.
Now a simple solution can be found.
# main.cf
smtpd_sender_restrictions =
reject_non_fqdn_sender
check_sender_access hash:/etc/postfix/local_only
# local_only
maintena...@example.com reject_unauth_destination
Of course, replace example.com above with your local domain name.
If you already have a smtpd_sender_restrictions defined in main.cf,
the example above will need to be inserted before any other
restrictions, ie. before permit_mynetworks.
-- Noel Jones
Nice, it works now the /maintenance/ user can only send emails to
the /sample.com/ domain.
Finally I note it is still a too large range of destinations, how to
restrict the destination to the user /administra...@sample.com/ ?
Per sender controls are described here:
http://www.postfix.org/RESTRICTION_CLASS_README.html
use the examples to build what you want.
alternately, you could use an external policy service such as
postfwd. http://postfwd.org/
-- Noel Jones
Ok nice exactly what I needed it took me few minutes to configure it !
And my last question *which is not linked to my previous questions*, is
it possible to force postfix to create a /from/ line in an email before
sending it if the client didn't create it ?