Michael,

BRAVO!  Worked like a charm!  Thank you very much!

This is clearly one for the mutt archives.  Congratulations to you.

John
On 04/17/02, 04:59:46PM +0200, Michal 'hramrach' Suchanek wrote:
 Yes, the files are identical, you do not need to attach the same thing
> twice ;-)
> The difference is that while the email contained spaces after the From:
> the mailbox contains a tab. There are two lines in the script containing
> regexp which identify the From and Sent headers. The "From: " did not
> match "From:\t" and the from header was not identified. Try changing the
> lines like this in the script(only regexps inside quotes changed):
> 
> { if ($0 ~ "^From:\t") {
> #                 ^ here \t stands for tab
> # space in original script does not match the tabs found in mailbox
> ...
>               if ($0 ~ "^Sent:\t") {
> # you may append \t here as well ^
> 
> 
> well I finally decided to attach the whole hack again
> 
> 
> -- 
>       Michal Suchanek
>       [EMAIL PROTECTED]

> { if ($0 ~ "^From:\t") {
>         # a From: line is eaten
>       from=$0
>       start=1
>  }else{
>         #not From:
>       if (start) {
>               #but after From:
>               start=0
>               if ($0 ~ "^Sent:\t") {
>                  # Sent: after From:
>                  mail=from;
>                  sub("^.*\\[","",mail);
>                  sub("\\].*$","",mail);
>                  wday=substr($2,1,3);
>                  mon=substr($3,1,3);
>                  mday=substr($4,1,2);
>                  year=$5
>                  hour=substr($6,1,2);
>                  min=substr($6,4,4);
>                  if ($7=="PM") hour+=12;
>                  date= "" wday " " mon " " mday " " hour ":" min " " year
>                  print "From " mail " " date
>                  print "Date: " date
>               }
>                  #doesnt look like a header
>                  # just print the eaten line
>               
>               print from
>       }
>          # not even after From:
>          # nothing special
>       print $0
>  }
> }


-- 
John P. Verel
Living Proof That Low Tech Beats High Tech!

Reply via email to