> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> Brandon Mercer
> Sent: Tuesday, November 18, 2003 7:12 AM
> To: Muhammad Ali
> Cc: 'qmail-scanner-general'
> Subject: Re: [Qmail-scanner-general]Selective Bypass on user basis
>
>
> Muhammad Ali wrote:
>
> > Hi,
> >
> > I want my some users to be NOT scanned through
> Qmail-Scanner… I am in
> > search of solution for a long time. So far no luck! Can
> anyone guide me?
> >

I have done things like this on my RH system. You can use QS without using
the QMAILQUEUE, /etc/tcp.smtp settings. You can use a default LWQ-type
install and utilize the power of .qmail files. It COULD become quite a
burden if you have many users, but for smaller numbers it's nice. It's
possible to write simple shell scripts that modify incoming emails per user.
Remember that qmail-scanner is just a Perl script that takes a message on
STDIN and returns it after scanning on STDOUT. You can put a line in a
.qmail file that executes a shell script which sends STDIN (a message) to QS
and does something with the output, like write it (the message) to a folder
for delivery.

Here is a little something I played with:

 #!/bin/bash
 #
 # Test for SPAM msg and move to .SPAM folder
 #

 message="`date +%s$RANDOM`.msg"
 cat > $message
 subject=`grep '^X-Spam-Flag: YES*' $message`
 SPAM=$?

 echo "$subject"

 #exit 0
 #sender=`grep '^From:' $message | grep -o
'[EMAIL PROTECTED]'`
 #echo "Sender: $sender"

 if [ $SPAM = 0 ]; then
 mv $message ./Maildir/.SPAM/new/$message
 exit 0
 fi

 mv $message ./Maildir/new/$message
 exit 0

It takes a message that has already been scanned by spamassassin and checks
for the spam=yes header. If found, the message is moved to a spam folder.
You could change this script to read more like:

 cat | qmail-scanner.pl

which would send STDIN to the QS perl script instead of writing the message
to disk. Of course you need to do something with the output of the perl
script... Maybe

 cat | /var/qmail/bin/qmail-scanner.pl > $message

would do the trick. I dunno.

Ken





-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Qmail-scanner-general mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general

Reply via email to