Difference between revisions of "HowTos/Mimedefang"
(→MIMEDefang + Sendmail on Fedora) |
(→Tell MIMEDefang to change subject line) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
− | + | ====Install the MIMEDefang milter (it is included in FC7 repositories by default):==== | |
yum install mimedefang (if you want/need to try and install mimedefang without using yum, then visit [http://mimedefang.org MIMEDefang's website] to download and see instructions) | yum install mimedefang (if you want/need to try and install mimedefang without using yum, then visit [http://mimedefang.org MIMEDefang's website] to download and see instructions) | ||
− | + | ====Start the mimedefang service:==== | |
service mimedefang start | service mimedefang start | ||
Line 19: | Line 19: | ||
− | + | ====Edit the sendmail.mc file:==== | |
define(`MILTER', `1')dnl | define(`MILTER', `1')dnl | ||
Line 26: | Line 26: | ||
− | + | ====rebuild the sendmail.cf file:==== | |
make -C /etc/mail | make -C /etc/mail | ||
− | + | ====edit your smtpd.cfg file in /var/opt/scalix/NN/s/sys/ (where NN is first and last character in your hostname):==== | |
place the following line above the RELAY accept 127.0.0.1 line: | place the following line above the RELAY accept 127.0.0.1 line: | ||
Line 37: | Line 37: | ||
− | + | ====Tell MIMEDefang to change subject line==== | |
− | + | In your /etc/mail/mimedefang-filter file find this line: | |
+ | md_graphdefang_log('spam', $hits, $RelayAddr); | ||
− | + | and add right below it: | |
+ | action_change_header("Subject", "[SPAM] $Subject"); | ||
+ | |||
+ | If you'd like to test your rules, then you can issue the following command: | ||
+ | |||
+ | service mimedefang configtest | ||
+ | |||
+ | Once you're happy, tell MIMEDefang to re-read the configuration file: | ||
+ | |||
+ | service mimedefang reread | ||
+ | |||
+ | ====Add a new spam rule==== | ||
+ | |||
+ | log in to the Scalix rules wizard (either through SWA under Tools or by going to http://yourscalixdomain.com/Scalix/rw | ||
+ | |||
+ | add a new rule that specifies a condition that looks for [SPAM] in the subject line and moves the message into the Junk E-Mail folder (use whatever folder you wish to store your spam). | ||
+ | |||
+ | ====Restart services==== | ||
+ | |||
+ | service sendmail restart | ||
omoff -wd 0 smtpd | omoff -wd 0 smtpd | ||
omon smtpd | omon smtpd |
Latest revision as of 15:29, 25 October 2007
Scalix Wiki -> How-Tos -> Mimedefang
Contents
- 1 MIMEDefang + Sendmail on Fedora
- 1.1 Install the MIMEDefang milter (it is included in FC7 repositories by default):
- 1.2 Start the mimedefang service:
- 1.3 Edit the sendmail.mc file:
- 1.4 rebuild the sendmail.cf file:
- 1.5 edit your smtpd.cfg file in /var/opt/scalix/NN/s/sys/ (where NN is first and last character in your hostname):
- 1.6 Tell MIMEDefang to change subject line
- 1.7 Add a new spam rule
- 1.8 Restart services
MIMEDefang + Sendmail on Fedora
This describes how to install the MIMEDefang milter and integrate it with Sendmail and Scalix 11 on Fedora Core 7 (haven't tested on any other platforms yet. Note: this does not describe how to modify or otherwise get MIMEDefang running.
Install the MIMEDefang milter (it is included in FC7 repositories by default):
yum install mimedefang (if you want/need to try and install mimedefang without using yum, then visit MIMEDefang's website to download and see instructions)
Start the mimedefang service:
service mimedefang start
(you might want to make that happen on boot up: chkconfig mimedefang on)
Edit the sendmail.mc file:
define(`MILTER', `1')dnl define(`confMILTER_LOG_LEVEL', `6')dnl INPUT_MAIL_FILTER(`mimedefang', `S=unix:/var/spool/MIMEDefang/mimedefang.sock, F=T, T=S:1m;R:1m;E:5m')dnl
rebuild the sendmail.cf file:
make -C /etc/mail
edit your smtpd.cfg file in /var/opt/scalix/NN/s/sys/ (where NN is first and last character in your hostname):
place the following line above the RELAY accept 127.0.0.1 line:
SMTPFILTER=TRUE
Tell MIMEDefang to change subject line
In your /etc/mail/mimedefang-filter file find this line:
md_graphdefang_log('spam', $hits, $RelayAddr);
and add right below it:
action_change_header("Subject", "[SPAM] $Subject");
If you'd like to test your rules, then you can issue the following command:
service mimedefang configtest
Once you're happy, tell MIMEDefang to re-read the configuration file:
service mimedefang reread
Add a new spam rule
log in to the Scalix rules wizard (either through SWA under Tools or by going to http://yourscalixdomain.com/Scalix/rw
add a new rule that specifies a condition that looks for [SPAM] in the subject line and moves the message into the Junk E-Mail folder (use whatever folder you wish to store your spam).
Restart services
service sendmail restart omoff -wd 0 smtpd omon smtpd