Tony Holmes: > My google-fu has failed me. > > I have a FreeBSD 7 system for hosting php for various users on it. > I wish to allow the php mail() function to work but to aslo prevent > spam and enforce an outgoing quota. I have replaced the default sendmail > command and am including my own wrapper to ensure the from address is > being set correctly so that the policy server (postfix-policyd-sf). > > The wrapper I wrote uses the sendmail compatibility with -t so that it > pulls the from/to from the email body itself. > > The pertinent line in my main.cf is: > > smtpd_sender_restrictions = > check_sender_access hash:/usr/local/etc/postfix/cwahi_net-allowed > check_policy_service inet:216.18.117.19:10031 > reject > > /usr/local/etc/postfix/cwahi_net-allowed: > root PERMIT
As documented in the access(5) manual page, this permits mail from the NETWORK that claims to have a sender of root in your domain (regardless of whether or not it was sent by your super-user). To restrict mail via the sendmail command line, use the authorized_submit_users configuration parameter. It takes a list of UNIX system account names. Wietse