kolab_smtpdpolicy1p
Kolab smtp policy
Usage
kolab_smtpdpolicy [-v]
Overview
kolabdelegated Postfix SMTPD policy server for Kolab. This server implements various policies for Kolab:
1) Only authenticated users can use sender <username>@$domain
2) Some distribution lists are only available to authenticated users
Logging is sent to syslogd.
How it works: each time a Postfix SMTP server process is started it connects to the policy service socket, and Postfix runs one instance of this PERL script. By default, a Postfix SMTP server process terminates after 100 seconds of idle time, or after serving 100 clients. Thus, the cost of starting this PERL script is smoothed out over time.
To run this from /etc/postfix/master.cf:
policy unix - n n - - spawnuser=kolab-n argv=/usr/bin/perl /usr/libexec/postfix/kolab_smtpdpolicy
To use this from Postfix SMTPD, use in /etc/postfix/main.cf:
smtpd_recipient_restrictions =...reject_unauth_destinationcheck_policy_service unix:private/policy...smtpd_sender_restrictions =...check_policy_service unix:private/policy...
NOTE: specify check_policy_service AFTER reject_unauth_destination or else your system can become an open relay.
To test this script by hand, execute kolab_smtpdpolicy, optionally with the option -v to print debugging output. Example for OpenPKG based installations:
# su - kolab$ /kolab/etc/kolab/kolab_smtpdpolicy -v
Each query is a bunch of attributes. Order does not matter, and the demo script uses only a few of all the attributes shown below:
request=smtpd_access_policyprotocol_state=RCPTprotocol_name=SMTPhelo_name=some.domain.tldqueue_id=8045F2AB23[email protected][email protected]client_address=1.2.3.4client_name=another.domain.tldinstance=123.456.7sasl_method=plainsasl_username=yousasl_sender=size=12345[empty line]
The policy server script will answer in the same style, with an attribute list followed by a empty line:
action=DUNNO[empty line]
Options and arguments
-v
Copyright and authors
See AUTHORS file