service auth {
...
unix_listener /var/spool/postfix/private/auth {
mode = 0660
# Assuming the default Postfix user and group
user = postfix
group = postfix
}
...
}
#以下設定為了相容outlook系統
auth_mechanisms = plain login
修改postfix的main.cf
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
# On Debian Wheezy path must be relative and queue_directory defined
#queue_directory = /var/spool/postfix
# and the common settings to enable SASL:
smtpd_sasl_auth_enable = yes
tar xzf sendmailanalyzer-x.x.tar.gz
cd sendmailanalyzer-x.x/
perl Makefile.PL LOGFILE=/var/log/maillog
make && make install
cp start_scripts/sendmailanalyzer.service /lib/systemd/system
Alias /sareport /usr/local/sendmailanalyzer/www
<Directory /usr/local/sendmailanalyzer/www>
Options ExecCGI
AddHandler cgi-script .cgi
DirectoryIndex sa_report.cgi
#-- Apache 2.2
#Order deny,allow
#Deny from all
#Allow from 192.168.1.0/24
#-- Apache 2.4
Require all denied
Require ip 192.168.1.0/24
</Directory>
設定cron 定期做快取 cache
# SendmailAnalyzer log reporting daily cache
0 1 * * * /usr/local/sendmailanalyzer/sa_cache > /dev/null 2>&1
# On huge MTA you may want to have five minutes caching
#*/5 * * * * /usr/local/sendmailanalyzer/sa_cache -a > /dev/null 2>&1