> I have a procmail file like this:
> 
> LOGFILE=/var/log/procmail.log
> VERBOSE=yes
> 
> :0fw
> * < 256000
> |/usr/bin/spamassassin -D
>       :0e
>       {
>               EXITCODE=$?
>       }
>       :0:
>       * ^X-Spam-Status: Yes
>       /usr/log/SPAM
> 
> 
> OK this makes a log of every spam that enter in my mail 
> server, but it sends the mail aniway, so my question is, how can I
> send the mail back to the sender and put it in the garbage?
> 
> Thanks.
> 
> Cumprimentos



Sending it back to the sender is usually a fruitless effort.  If you really
want to trash it, just trash it.  You will eventually get false-positives so
you will be trashing legitimate messages!

I would think you probably need a Perl script, or other external program, to
send it back to the sender.  You should analyze SpamBounser Procmail scripts
(http://www.spambouncer.org/) to see some good examples.

Any delivering recipe will end Procmail processing.  Therefore if you
deliver the message to your return script, Procmail will cease to process.
However if you need to do one task and then another, you will need to copy
the message.

----------------------------------------------
Example:
# Save a copy
:0 c:
* ^X-Merlin-MailFrom:[EMAIL PROTECTED]
$fromfolder

# Save a copy
:0 c:
* ^X-Merlin-RcptTo:[EMAIL PROTECTED]
$tofolder

# Send the message on it's way.
:0 
! -oi -f "$SENDER" "$@"
----------------------------------------------

If you just want to trash the message, send it to /dev/null.  This is the no
mercy method as you will never get the message back.

Also if you want to make your logs look a little better, you might want to
try TRAP.

----------------------------------------------
Example:

TRAP='echo "=~=~=~=~=~=~=~=~=~="; \
  echo "Date:    $DATE"; \
  formail -XFrom: -XTo: -XSubject: -XX-Anything'

Note:  Formail -X ""   will extract the entire message header
----------------------------------------------


--Larry



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to