Luca Olivetti wrote:

En/na Luca Berra ha escrit:

Luca could you also add those steps to README.RPM?


hopefully I'll remember. I'd be also glad if somebody could detail a working configuration for single message store with current postfix (at work I'm using 8.2 and had to do many contortions to achieve single message store, at home I don't really need it).


Based on 9.1 (including spam filtering).

Still don't have postfix talking to openldap21 yet, but cyrus works fine. (One of the reasons I inquired about the auto create mailbox patch.)

This is really rough, but should get you there. (If this is what you are looking for). Based on mdk 9.1, and using cooker imap rpms.


Configure Postfix: ------------------

Add postfix user to group mail
# gpasswd -a postfix mail
# cp /etc/services /var/spool/postfix/etc/services
# cp /etc/hosts /var/spool/postfix/etc/hosts


Modify the lmtp line in /etc/postfix/master.cf to read: ------------------------------------------------------- lmtp unix - - n - - lmtp


Edit /etc/postfix/main.cf and add to the end of the file: --------------------------------------------------------- # readme_directory: The location of the Postfix README files. # readme_directory = /usr/share/doc/postfix-2.0.6/README_FILES alias_database = hash:/etc/postfix/aliases

myhostname = your.domain.name
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, $mydomain
masquerade_domains = $mydomain
virtual_maps = hash:/etc/postfix/virtual
mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp


Configure Spamassassin: -----------------------

# adduser spamfilter
# passwd -l spamfilter
# mkdir /var/spool/spamfilter
# chown spamfilter:spamfilter /var/spool/spamfilter

- Modify the /etc/postfix/master.cf, by commenting out the two current smtp lines, and adding the following:
# SpamAssassin-start
spamfilter unix - n n - - pipe
user=spamfilter argv=/etc/mail/spamfilter.sh -f ${sender} -- ${recipient}
smtp inet n - y - - smtpd
-o content_filter=spamfilter:
smtp unix - - y - - smtp
-o content_filter=spamfilter:
# SpamAssassin-end


- Modify /etc/mail/spamassassin/local.cf by uncommenting ‘defang_mime 0’ and adding the following:
skip_rbl_checks 0
required_hits 4.5
- Adjust this to suit your needs (higher value filters less spam).


- Create the file /etc/mail/spamfilter.sh, containing the following:
<--start-spamfilter.sh-->
#!/bin/sh

INSPECT_DIR=/var/spool/spamfilter
SENDMAIL="/usr/sbin/sendmail.postfix -i"
SPAMASSASSIN=/usr/bin/spamc

# Exit codes from <sysexits.h>
EX_TEMPFAIL=75
EX_UNAVAILABLE=69

cd $INSPECT_DIR || { echo $INSPECT_DIR does not exist; exit $EX_TEMPFAIL; }

# Clean up when done or when aborting.
trap "rm -f in.$$; rm -f out.$$" 0 1 2 3 15

cat | $SPAMASSASSIN > out.$$ || { echo Message content rejected; exit $EX_UNAVAILABLE; }

$SENDMAIL "$@" < out.$$

exit $?
<--end-spamfilter.sh-->

- Make the file executable, restart spamd & postfix
# chmod +x /etc/mail/spamfilter.sh
# service spamassassin restart
# service postfix restart


Vipul’s Razor (Distributed Anti-SPAM) configuration
---------------------------------------------------
- Create default config file (razor log & conf files: /home/spamfilter/.razor/)
# su spamfilter
$ cd
$ razor-admin –create
$ exit


- Create the file /etc/logrotate.d/razor, containing the following:
<--start-razor-->
/home/spamfilter/.razor/razor-agent.log {
rotate 10
daily
postrotate
/etc/rc.d/init.d/spamassassin restart
endscript
}
<--end-razor-->

- Restart spamd
# service spamassassin restart



Configure Cyrus:
----------------

Set the password for the cyrus account
# passwd cyrus

Modify /etc/imapd.conf, and add:
unixhierarchysep: yes
altnamespace: yes

-- It should all work.





Reply via email to