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

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

Linux:
# make

FreeBSD:
# make freebsd

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

# cp mxfilter /usr/local/sbin

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

3.1 Create file /etc/postfix/mxfilter.acl (use sample file from tarbal):
------------------------------------------------------------------------

postmaster@	skip
abuse@		skip
*	check	HMARK

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

[...]
mxfilter  unix  -       n       n       -       -       spawn
    user=nobody argv=/usr/local/sbin/mxfilter
587      inet  n       -       n       -       -       smtpd
    
(if you want setup spf behind relay add (sasl required):
mxfiltersh  unix  -       n       n       -       -       spawn
    user=nobody argv=/usr/local/sbin/mxfilter -sh 192.168.33.1 
# 192.168.33.1 sample outgoing ip address)
[...]

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

[...]
smtpd_recipient_restrictions =
    [...]
# for spf behind relay
#    check_policy_service unix:private/mxfiltersh,
    permit_sasl_authenticated,
    [...]
    reject_unauth_destination,
    [...]
    check_policy_service unix:private/mxfilter,
    [...]
[...]

======================
3.4 Restart postfix
======================

# postfix reload
or
# postfix stop
# postfix start

======================
3.5 Other options
======================

Create /etc/postfix/mxfilter.cf file, and change reasons,
enable/disable tests etc. (sample file included).
