On Mon, Jun 09, 2003 at 08:25:22AM +0200, Atlas wrote:
> Hi,
> I had this script instead of regular qmail-queue:
> 
>       spamassassin | /var/qmail/bin/qmail-queue-real
> 
> This worked almost perfectly.
> I tried this script qmail-queue:
> 
>       spamassassin > /tmp/mail_file.txt
>       cat /tmp/mail_file.txt | /var/qmail/bin/qmail-queue-real
> 
> Why the first case forks and the second does not? I think, these scripts 
> are the same.
> 
> Someone helped me (thanks to everybody) and I rewrite it as follows:
> 
>       spamassassin > /tmp/mail_file.txt
>       cat /tmp/mail_file.txt | /var/qmail/bin/qmail-inject

Er, am I missing something or will  messages  happily  overwrite  each
other if you have multiple message deliveries happening  at  the  same
time? (which shouldn't be something unusual)

At   least,   change   the   name   of   the   temporary    file    to
/tmp/mail_file_$$.txt  to  add the PID of the process in an attempt to
make it unique.

> 
> I want to make a script, that would DELETE all mail marked as spam - we 
> need it. I think it should work with "spamassassin -e", because it will 
> return the value if the mail is/is not spam. I imagine for example this 
> script:
> 
>       if [ spamassassin -e > /tmp/mail_file.$$]; then
>       RETVAL = $?
>       if [ $RETVAL -eq 0 ]; then
>               cat /tmp/mail_file | /var/qmail/bin/qmail-queue
>               rm /tmp/mail_file.$$
>       fi

This  looks  better,  except that the ".$$" suffix is missing from the
"cat" line.

> 
> I would set the score parameter to 100 for example and the user would have 
> set in the database what is spam and what is not. Can you PLEASE help me to 
> do such a script to work as I mentioned? Is it possible? I think it could 
> help to everybody...

Well, apart from this file name conflict issue, it looks to me that it
should  work  as  intended. But I might well be missing something, I'm
familiar with sendmail and postfix but not qmail.

Greets,
_Alain_


-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to