Discarding spam on a relay??

This is a discussion on Discarding spam on a relay?? within the alt.comp.mail.qmail forums, part of the Mail Servers and Related category; Hello, I have a relay which I receive email from the Internet, scans for viruses and spam then forwards all ...


Go Back   Usenet Forums > Mail Servers and Related > alt.comp.mail.qmail

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-29-2004
Mike
 
Posts: n/a
Default Discarding spam on a relay??

Hello,

I have a relay which I receive email from the Internet, scans for
viruses and spam then forwards all mail to my internal servers for
delivery. It has no local users, it just forwards...

I'm running Spam Assassin and would like to discard mail with a spam
score greater than a 9.0.

I don't think procmail will work since I don't have any users... I
could be wrong here... What technique should I use to accomplish my
goal?

Thanks in advance,

Mike
Reply With Quote
  #2 (permalink)  
Old 01-29-2004
Dave Sill
 
Posts: n/a
Default Re: Discarding spam on a relay??

n0prob71@yahoo.com (Mike) writes:

> I have a relay which I receive email from the Internet, scans for
> viruses and spam then forwards all mail to my internal servers for
> delivery. It has no local users, it just forwards...
>
> I'm running Spam Assassin and would like to discard mail with a spam
> score greater than a 9.0.
>
> I don't think procmail will work since I don't have any users... I
> could be wrong here... What technique should I use to accomplish my
> goal?


You could use a virtualdomains entry to deliver the mail locally, use
procmail in the domain's .qmail-*-default file to filter out spam, and
use maildir2smtp from the serialmail package to forward the good
messages on to an internal server.

--
Dave Sill Oak Ridge National Lab, Workstation Support
Author, The qmail Handbook <http://web.infoave.net/~dsill>
<http://lifewithqmail.org/>: Almost everything you always wanted to know.
Reply With Quote
  #3 (permalink)  
Old 01-31-2004
Thomas Krug
 
Posts: n/a
Default Re: Discarding spam on a relay??

Mike <n0prob71@yahoo.com> wrote:
> Hello,
>
> I have a relay which I receive email from the Internet, scans for
> viruses and spam then forwards all mail to my internal servers for
> delivery. It has no local users, it just forwards...
>
> I'm running Spam Assassin and would like to discard mail with a spam
> score greater than a 9.0.
>
> I don't think procmail will work since I don't have any users... I
> could be wrong here... What technique should I use to accomplish my
> goal?
>
> Thanks in advance,
>
> Mike





You could put spamassassin in a qmail-queue replacement script like:

-----8<-----8<-----8<------8<------
#!/bin/bash
#
/var/qmail/bin/spamc | /var/qmail/bin/mailanalyze |
/var/qmail/bin/qmail-queue.real
-----8<-----8<-----8<------8<------

"mailanalyze" would search the header for the spamassassin's header line and
the "******" rating.
You could archive those messages as well here.

minimum "mailanalyze":
-----8<-----8<-----8<------8<------
#!/bin/bash
#
datum=`date +%Y%m%d_%H%M%S`
TMPFILE=/tmp/mail-analyzer_$datum.tmp_$$
cat > $TMPFILE
# put analyzing in here
# should be fast as possible in case of restarting the machine etc.
# (current mail would be lost)
cat $TMPFILE
-----8<-----8<-----8<------8<------


qmail-queue.real is the original qmail-queue binary


Or use two spamassassins, one with configuration="tagging", the other one
with "deletion", set to different score thresholds.


Best regards
Thomas.



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:03 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0