|
by Katja and Guido Socher <katja/at/linuxfocus.org guido/at/linuxfocus.org> About the authors: Katja is the German editor of LinuxFocus. She likes Tux, film & photography and the sea. Her homepage can be found here. Guido is a long time Linux fan and he likes Linux because it gives you choices and freedom. You can choose and develop solutions according to your needs. |
Fighting against Spam-Mail
Abstract:
Spam between your mail!? Spam E-mail is growing at an alarming
rate and it is a major problem for almost everybody. |
Our server gets about 4075 mails per week. 3273
are spam-mails!
=> 80% of all mail is Spam.
# The condition line ensures that only messages smaller than 50 kB # (50 * 1024 = 56000 bytes) are processed by SpamAssassin. Most spam # isn't bigger than a few k and working with big messages can bring # SpamAssassin to its knees. If you want to run SpamAssassin without # the spamc/spamd programs then replace spamc by spamassassin. :0fW: * < 56000 | /usr/bin/spamc # All mail tagged as spam (e.g. with a score higher than the set threshold) # is moved to the file "spam-mail" (replace with /dev/null to discard all # spam mail). :0: * ^X-Spam-Status: Yes spam-mail
"| exec /usr/bin/procmail"Some people recommend to use
# .procmailrc file. # search on header for friends: :0 H: * ^From.*(joe|paul|dina) /var/spool/mail/guido # search on header for mails which are not coming from # inside mycompany.com and save them to maybespam :0 H: * !^From.*(@[^\@]*mycompany\.com) /home/guido/maybespam # explicit default rule :0: /var/spool/mail/guidoThis makes it much easier to delete spam and you don't find the ugly spam between your normal mail.
# Promail script to
# reject word documents. Reject the mail, but do not reply to
# error messages "From MAILER-DAEMON"
# If you use ":0 Bc" instead of ":0 B" then you will still get the mail
:0 H
* !^From.*DAEMON
{
# The mime messages with word documents look like this in the body
# of the message:
#------=_NextPart_000_000C_01C291BE.83569AE0
#Content-Type: application/msword;
# name="some file.doc"
#Content-Transfer-Encoding: base64
#Content-Disposition: attachment;
# filename="real file.doc"
:0 B
* ^Content-Type:.*msword
| (formail -r ; cat /home/guido/reject-text-msword ) | $SENDMAIL -t
}
# explicit default rule
:0:
/var/spool/mail/guido
The text file /home/guido/reject-text-msword should contain
a text explaining that msword documents can spread viruses
and ask the sender to send the document e.g. in RTF
format.
...
Received: from msn.com (dsl-200-67-219-28.prodigy.net.mx [200.67.219.28])
by mailserver.of.your.isp (8.12.1) with SMTP id gB2BYuYs006793;
Mon, 2 Dec 2002 12:35:06 +0100 (MET)
Received: from unknown (HELO rly-xl05.dohuya.com) (120.210.149.87)
by symail.kustanai.co.kr with QMQP; Mon, 02 Dec 2002 04:34:43
Here an unknown host with IP address 120.210.149.87 who claims
to be rly-xl05.dohuya.com sends the mail to
symail.kustanai.co.kr. symail.kustanai.co.kr sends this message
further on. http://www.euro.cauce.org/en/ |
![]() http://www.cauce.org/ |
|
Webpages maintained by the LinuxFocus Editor team
© Katja and Guido Socher "some rights reserved" see linuxfocus.org/license/ http://www.LinuxFocus.org |
Translation information:
|
2005-01-14, generated by lfparser_pdf version 2.51