procmail
[Top] [All Lists]

Re: Rejecting mail to sender

2002-02-08 09:33:47
At 10:30 2002-02-08 -0500, PNEWS.ORG wrote:
#LOGFILE=$MAILDIR/log.`date +%y-%m-%d`

Of course, for LOGABSTRACT and VERBOSE to do you much good, you're going to want a logfile defined.

# log message abstracts
LOGABSTRACT=all
SENDMAIL=/usr/sbin/sendmail

You shouldn't need to explicitly define this. What if, say, you're defining it incorrectly, and all forwards are failing as a result? DO regular forwards work, or is the problem only when you attempt to change things? It also doesn't help that you take the time to define this, but some of your invocations (below) don't make use of the variable.

At your shell, run:

        which sendmail

and verify that it's where you're setting it. Also, make sure the program there is actually sendmail

VERBOSE=yes

Great, you have verbose logging, now to get a logfile and a message, and see what procmail is probably TELLING you is wrong...


       # Here we simply add a few extra headers
        :0fc

... and make a copy - both the filtered and the unfiltered versions will be forwarded. I somehow doubt that this is really what you want to be doing.


BUT SOMETHING LIKE THIS DOES NOT WORK. Any ideas why sendmail does not or
could it be my recipe is incorrect?

# rejecting mail and sending it back
:0
*^(To|From|Received|Reply-To|Sender):(_dot_)*JamesW5900(_at_)prontomail(_dot_)com
|(formail -brt; \
          echo "You have been filtered. This is procmail.";\
          echo "Your mail is being returned automatically";\
          echo "because sending mail here is going to bounce. ;\
          echo "Your mail is being returned to you sucker.;\
          echo "I will never see it.";\
) | sendmail -oi -t

Well, two of those lines are not terminated properly - but that should merely result in a garbled message. Is the sendmail invocation here in the PATH?

AND, THIS ALSO DOES NOT WORK:

AND with all these things that don't work, have you tried examining the VERBOSE log for clues?

    | /usr/lib/sendmail -oi -t

I'd suggest you use $SENDMAIL, not a hardcoded path.

I ALSO TRIED THIS AND IT DID NOT WORK....

[snip] THIS was all commented-out code, if this is EXACTLY how you were using it, that's no wonder.

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>