You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Mark Nicolas <re...@gmx.net> on 2004/08/26 08:49:45 UTC
spam and nospam mail addresses
Hi,
I want that my users can send spam to mail addresses,
for example spam@domain and nospam@domain.
so far I written a shell script and it will executet every day.
here it is:
<cut>
#!/bin/sh
sa-learn --mbox --spam /var/mail/spam > /dev/null
sa-learn --rebuild --mbox --ham /var/mail/nospam > /dev/null
>/var/mail/spam
>/var/mail/nospam
</cut>
But the problem is my user use outlook and the mails are in this format:
<cut>
From c.schuck@schuck-mode.de Wed Aug 25 10:24:56 2004
Return-Path: <c....@schuck-mode.de>
X-Original-To: spam@schuck-mode.de
Delivered-To: spam@schuck-mode.de
Received: from localhost (firewall [127.0.0.1])
by firewall (Postfix) with ESMTP id D63B42EDE9
for <sp...@schuck-mode.de>; Wed, 25 Aug 2004 10:24:56 +0200
(CEST)
Received: from firewall ([127.0.0.1])
by localhost (firewall [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 16601-01 for <sp...@schuck-mode.de>;
Wed, 25 Aug 2004 10:24:55 +0200 (CEST)
Received: from GLCSCHUCK (unknown [192.168.209.25])
by firewall (Postfix) with SMTP id 2A6602EDE2
for <sp...@schuck-mode.de>; Wed, 25 Aug 2004 10:24:55 +0200
(CEST)
From: "Christian Schuck" <c....@schuck-mode.de>
To: <sp...@schuck-mode.de>
Subject: WG: Cialis - very low price
Date: Wed, 25 Aug 2004 10:24:53 +0200
Message-ID: <EJ...@schuck-mode.de>
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0049_01C48A8D.C2CFDA00"
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Importance: Normal
X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at schuck-mode.de
Status: RO
Content-Length: 4967
Lines: 154
This is a multi-part message in MIME format.
------=_NextPart_000_0049_01C48A8D.C2CFDA00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
-----Ursprüngliche Nachricht-----
Von: Christian Schuck [mailto:c.schuck@schuck-mode.de]
Gesendet: Dienstag, 24. August 2004 17:40
An: spam@schuck-mode.de
Betreff: WG: Cialis - very low price
-----Ursprüngliche Nachricht-----
Von: hum@seznam.cz [mailto:hum@seznam.cz]
Gesendet: Dienstag, 24. August 2004 15:56
An: christian@xsxl.de
Betreff: Cialis - very low price
Fuller & harder erections
Starts working in just 15 min.
Long-lasting effects
No side effects
ClALlS
Select the manufacturer you trust!
EASY TO BUY! PRESS HERE
Delivery and shipping worldwide
To change your mail preferences, go here
------=_NextPart_000_0049_01C48A8D.C2CFDA00
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
</cut>
So far my question is how to learn this spam?
That not my users a readed as SPAM.
P.S. can you allow gpg keys as attachment?
Greets Mark.
--
Mark Nicolas <re...@gmx.net>
Re: spam and nospam mail addresses
Posted by Rakesh <ra...@netcore.co.in>.
Hi Mark
Try using a wrapper script named sa-wrapper.pl.
if you are using postfix as an MTA then it will work like this,
lets say your spam and no spam email addresses are spam@xyz.com and
nospam@xyz.com. The xyz.com should be the mydestination of the server on
which spamassassin is running.
In the aliases file put entry like this
spam: spam@spam.spam
nospam: nospam@ham.ham
Then in transport file specify a transport for these
spam.spam sa-spam:
ham.ham sa-ham:
Then in the master.cf make the following addition (this will feed the
coming mail incoming mail as input to the sa-wrapper.pl )
sa-spam unix - n n - - pipe
user=mail:mail argv=/usr/local/bin/sa-wrapper.pl spam ${sender}
sa-ham unix - n n - - pipe
user=mail:mail argv=/usr/local/bin/sa-wrapper.pl ham ${sender}
If you are using Sendmail as an MTA
Again the domain name should be local to the server. In the aliases file
put an entry like this
spam: "|/usr/local/bin/sa-wrapper.pl spam abc@xyz.com"
nospam: "|/usr/local/bin/sa-wrapper.pl nospam abc@xyz.com"
At the sa-wrapper.pl there is an array named DOMAINS in which you will
have to specify the domains. Sa-wrapper will learn only from those
feedbacks whose domains are listed in this array. Frankly the entry in
the aliases file for sendmail is just a workaround to make the script
work sendmail because i didnt knew any best way to get the sender's
email address in the aliases file. So if you know this just fix this and
also let me know.
for your reference I am attaching a sa-wrapper.pl file.
This works fine for my servers and users are able to send their feedback
to spam and nospam ids, hope this works for you as well.
Rakesh
Mark Nicolas wrote:
>Hi,
>
>I want that my users can send spam to mail addresses,
>for example spam@domain and nospam@domain.
>
>
>so far I written a shell script and it will executet every day.
>
>here it is:
>
><cut>
>
>#!/bin/sh
>sa-learn --mbox --spam /var/mail/spam > /dev/null
>sa-learn --rebuild --mbox --ham /var/mail/nospam > /dev/null
>
>
>>/var/mail/spam
>>/var/mail/nospam
>>
>>
>
></cut>
>
>
----------------------------------------------------------
Netcore seeks Explorers, Inventors, Builders and Marketers
http://www.emergic.org/nc-opps.html
----------------------------------------------------------