procmail
[Top] [All Lists]

Re: A recipe does not work for one list only

2005-04-18 05:14:11
On Mon, Apr 18, 2005 at 12:23:13PM +0430, Hossein Movahhedian wrote:

[. . . .] But still they don't work and while $LOGFILE and
$MSG_FILE are created with other lists, nothing is created with
`farsitex-user' list. I don't know if the header is plain text
version or not, so for your more information I have copied the
whole mail form my Inbox folder.

It looks like plain text to me, but where is your log file?
I mean the one that skips your mailing list.

Do you have a test harness, a.k.a. sandbox?

If you don't, you can always use the point-n-shoot script I wrote
and include with the Virus Snaggers(tm) package.  A few months ago
I augmented it to work with any rcfile, not just vsnag.

The one biggest caution to testing rcfiles is, if the rcfile
delivers somewhere, including most importantly if the rcfile
forwards a message to someone else, well, that will still happen
when you initiate the rcfile manually.  So be careful about
that!  But with that caveat noted, you could take your code
snippet, put it in a testing rcfile, and make sure you don't
explicitly set DEFAULT or the main LOGFILE within that testing
rcfile (point-n-shoot sets it to /dev/null to avoid a delivery to
your mailbox while you're testing), and wail away.  You'll see the
log right on your screen.

Here's your sample list message saved to my system:
  
   1:30pm [~/Mail] 294[0]> ls -l farsitex_msg 
  -rw-------    1 dman     users        4989 Apr 18 13:27 farsitex_msg
  
   1:30pm [~/Mail] 295[0]> frm farsitex_msg
  Nosrat Haghgoo        [ftex-user]Error in  Farsitex 1.0 pre1
  
  
Here's your code, with the log stuff commented out and your path to
LISTS_DIR changed temporarily for testing:
  
   1:32pm [~/Mail] 304[0]> cat hossein.rc
  ### The second one
  LISTS_DIR=/dos/f/Lists
  LISTS_DIR = .      # temp override for testing, by dman
  #LOG_FILE=/ext3/home/tmp/procmail.msg
  #LOGFILE=/ext3/home/tmp/procmail.from
  VERBOSE=on
  LOGABSTRACT=all
  
  :0
  * ^TO_.*farsitex-user@
  {
  #   OLDLOG=$LOGFILE
  #   LOGFILE=$LOG_FILE
  #   LOG="Mail Received from ftext-user$NL"
  #   LOGFILE=$OLDLOG
  
     :0:
     $LISTS_DIR/.NEW_Ftex-user
  }
  
  
Here's the point-n-shoot run:
  
   1:34pm [~/Mail] 306[0]> vsnag.point-n-shoot.sh --rc hossein.rc farsitex_msg
  procmail: [27037] Mon Apr 18 13:35:41 2005
  procmail: Assigning "VS_DIAGS=./vsnag.self-test.rc"
  procmail: Assigning "VS_MYVARS="
  procmail: Assigning "PROCMAIL=procmail"
  procmail: Rcfile: "hossein.rc"
  procmail: Assigning "LISTS_DIR=/dos/f/Lists"
  procmail: Assigning "LISTS_DIR=."
  procmail: Assigning "VERBOSE=on"
  procmail: Assigning "LOGABSTRACT=all"
  procmail: Match on 
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?).*farsitex-user@"
  procmail: Locking "./.NEW_Ftex-user.lock"
  procmail: Assigning "LASTFOLDER=./.NEW_Ftex-user"
  procmail: Opening "./.NEW_Ftex-user"
  procmail: Acquiring kernel-lock
  procmail: Unlocking "./.NEW_Ftex-user.lock"
  From n_haghgoo(_at_)yahoo(_dot_)com Sun Apr 17 16:04:48 2005
   Subject: [ftex-user]Error in  Farsitex 1.0 pre1
    Folder: ./.NEW_Ftex-user                                                 
4990
  

So it works fine.  That's why I said all along that you need to show us your
verbose log with the code failing.  What you're doing is not what you're
showing us, which latter does work.

You can get Virus Snaggers(tm) with the point-n-shoot script at
http://vsnag.spamless.us .

P.S.  Don't forget my comment in the previous post about taking the ".*" out
of your ^TO_ macro's statement.  It's unnecessary.

-- 
dman

____________________________________________________________
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