procmail
[Top] [All Lists]

Re: Conrolling large log files

2004-10-13 17:14:03
Good morning Ruud, :-)

Am 2004-10-13 13:31:37, schrieb Ruud H.G. van Tol:

See http://www.xs4all.nl/~rvtol/procmail/basic/pm
and specifically H_vars.inc and H_From_parse.inc
for a way to get reliable date and time values
from the message itself.

OK, I have downloaded the "H_From_parse.inc" and included it like for
Testing:

  ____ ( '/home/michelle/.procmailrc' ) ________________________________
 /
|  PATH=$HOME/bin:/usr/bin:/bin:
|  MAILDIR=$HOME/Maildir
|  DEFAULT=$MAILDIR/ATT_SPAM/default/
|  LOGFILE=$HOME/log/procmail/`date +%Y-%m-%d`.log
|  VERBOSE=off
|  
|  LINEBUF=65536
|  
|  INCLUDERC=$HOME/.procmail/H_From_parse.inc
|  
|  # Echo some tests
|  LOG="Logfile:     ~/log/procmail/$H_From_YYYY-$H_From_MM-$H_From_DD
|  "
|  LOG="MONTHFOLDER: $H_From_YYYY-$H_From_MM
|  "
|  LOG="YEARFOLDER:  $H_From_YYYY
|  "
|  
|  MONTHFOLDER=`date +%Y-%m`
|  YEARFOLDER=`date +%Y`
 \______________________________________________________________________

in the include I have done this:

  ____ ( '/home/michelle/.procmail/VARS' ) _____________________________
 /
|  # version: 2004-06-29
|  
|  #From succes(_dot_)nu(_at_)wanadoo(_dot_)nl  Tue Oct 26 21:44:31 1999
|  
|  :0  # succes(_dot_)nu(_at_)wannadoo(_dot_)nl
|  * H_From_ ?? ^^\/[^ ]+
|  { H_From_Addr = $MATCH }
|  
|  :0  # wannadoo.nl
|  * H_From_Addr ?? @\/.*
|  { H_From_Domain = $MATCH }

<snip>

|  LOG="\
|  From $H_From_Addr $H_From_DDD $H_From_MMM $H_From_DD \
|  $H_From_HH:$H_From_NN:$H_From_SS \
|  $H_From_YYYY $H_From_MM/$H_From_YY$NL
|  "
 \______________________________________________________________________

but the I get this:

  ____ ( '/home/michelle/log/procmail/2004-10-14.log' ) ________________
 /
|  From     ::  /
|  Logfile:     ~/log/procmail/--
|  MONTHFOLDER: -
|  YEARFOLDER:  
|  From root  Thu Oct 14 01:50:16 2004
|   Subject: Re: Perl Script gesucht
|    Folder: lists.debian.org/debian-user-german/2004-10/new/1097711423.2       
   2444
 \______________________________________________________________________

No variables...
I think, this has to do, because it expect something like 

    From root(_at_)localhost  Thu Oct 14 01:50:16 2004
             ^^^^^^^^^^
which I do not get from fetchmail. (see sniplet of *.inc above)

Can you make a correctur to your script please ?  :-)

Greetings
Michelle

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/ 
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSM LinuxMichi
0033/3/88452356    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature

____________________________________________________________
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>