procmail
[Top] [All Lists]

Re: Recipe not working

2007-09-29 14:55:53


Dallman Ross yazmış:
Tolga wrote Saturday, September 29, 2007 1:47 PM:


  
Last week I thought I'd give procmail a start, so I put "|IFS='
'&&p=/usr/bin/procmail&&test -f $p&&exec $p -Yf-||exit 75
#MY_USERNAME" in ~/.forward and the following recipes in
~/.procmailrc

DEFAULT=/var/mail/folders/$LOGNAME
    

You normally should not need or want to set DEFAULT
in the .procmailrc.  It ought to have the correct
value compiled in.  If it doesn't, you ought, in normal
situations, to recompile it so that it does.
  
I just emerged the sources of procmail. What file do I need to edit? Out
of curiosity, why can't I specify DEFAULT to be
/var/mail/folders/$LOGNAME and why do I need to edit sources?
There are some unusual circumstances or advanced
situations where setting DEFAULT in the rcfile can be
appropriate, though.  You will have to determine whether
your situation is one such.
  
  
:0 
* ^From:(_dot_)*owner-postfix-users(_at_)postfix(_dot_)org
postfix
:0
* ^Subject:.*Postfix log summary of (today|yesterday)
pflogsumm
:0
* ^From:(_dot_)*mtozses(_at_)hotmail(_dot_)com
! mtozses(_at_)sabanciuniv(_dot_)edu

I also have the following log:

Sep 29 14:40:58 ozses postfix/local[1405]: 4720321370:
to=<tolga(_at_)ozses(_dot_)net>, orig_to=<tolga>, relay=local, delay=1.1,
delays=0.09/0.02/0/1, dsn=2.0.0, status=sent (delivered to command:
IFS=' '&&p=/usr/bin/procmail&&test -f $p&&exec $p -Yf-||exit 
75 #tolga)
    

That's your postfix log; what about your procmail log?
That's what we normally want to see.
  
I don't know where procmail log is. How do I turn it on?
 
  
What I'm trying to execute is the pflogsumm one. However, the 
mail never arrives. How come?
    

You didn't tell procmail to execute anything.  You told
procmail to save the mail to a folder called "pflogsumm".
Look in your mail dirs for such a folder and you will find
your test mail messages.

I don't know what your "pflogsumm" is or whether it needs
the headers only or the body only or the whole message; or 
whether you care to evaluate exit codes from it.  But 
probably you want something like this:

   LOGFILE = /path/to/your/preferred/log_file
  
I set this, but no log file was written
   # VERBOSE = yes   # uncomment at far left for verbose logs

   # first recipe as above goes here

   :0
   * ^Subject:.*Postfix log summary of (to|yester)day
   | pflogsumm
  
man procmailex says not to pipe folder names.
   :0
   * ^From:(_dot_)*mtozses(_at_)hotmail\(_dot_)com
   ! mtozses(_at_)sabanciuniv(_dot_)edu

Also, quote your dots in conditions.  I've done so above.

Have you read "man procmailex"?

  
Regards,

-- 
Some men are so macho they'll get you pregnant just to kill a rabbit.
                -- Maureen Murphy
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
<Prev in Thread] Current Thread [Next in Thread>