=======================
     QUICK INSTALL
=======================

=======================
1. Compile
=======================

Linux:
# make

FreeBSD:
# make freebsd

======================
2. Install
======================

# cp mxfilter /usr/local/sbin

Add patch postfix-2.2-20040422-sender-rewrite.patch and compile and
upgrade postfix. This patch add simple sender-rewrite and recipient-rewrite
actions.

======================
3. Setup
======================

3.1 Add to /etc/postfix/master.cf:
----------------------------------

[...]
reject_unsigned_bounce  unix  -       n       n       -       -       spawn
    user=postfix argv=/usr/local/sbin/mxfilter -reject_unsigned_bounce
sign_auth_relay  	unix  -       n       n       -       -       spawn
    user=postfix argv=/usr/local/sbin/mxfilter -sign_auth_relay
[...]

3.2 Add to /etc/postfix/main.cf:
--------------------------------

[...]
smtpd_recipient_restrictions =
    [...]
# rewrite envelope-sender for sasl enabled session
# only point mua->mta !!!
    check_policy_service unix:private/sign_auth_relay,
    permit_sasl_authenticated,
    [...]
# reject_unsigned_bounce run before reject_unauth_destination
# envelope-recipient must be rewrited
    check_policy_service unix:private/reject_unsigned_bounce,
    reject_unauth_destination,
    [...]
[...]

3.3 Create domainsign (enable sign for domain):
-----------------------------------------------

/etc/postfix/domainsign/domain.tld
bhgufnbhugfnbhugnfbhugnbhugnnubnhgufb

/etc/postfix/domainsign/domain2.tld
vnhgunvgyunvgyudgnvyfdngvyudgyvfngyduv

# chown postfix /etc/postfix/domainsign
# chmod 700 /etc/postfix/domainsign

3.4 Add to main.cf:
-------------------

recipient_delimiter = +

======================
4 Restart postfix
======================

# postfix reload
or
# postfix stop
# postfix start

