procmail
[Top] [All Lists]

RE: procmail Efficiency Question

1999-03-24 08:35:31

        Thanks a lot for your advice. I am incorporating your
        suggestions in my recepie.

                I'm sorry I may not be clear enough on some of questions.
        Let me try again next to your text. Appreciate for any
solution/advice on this.

                Regards,
                                - Tapas
        
-----Original Message-----
From: era eriksson [SMTP:era(_at_)iki(_dot_)fi]
Sent: Wednesday, March 24, 1999 1:43 AM
To:   Banerjee, Tapas
Cc:   procmail(_at_)informatik(_dot_)rwth-aachen(_dot_)de
Subject:      Re: procmail Efficiency Question

  [Banerjee, Tapas]  ..........  
 > Q 1: Will it be a better idea to trap the Arguments as SUBJECT =
 > `formail -zx Subject` dynamically and pass that in heading field
 > i.e. in place of -i"Subject: DAVINCI REPORTS " use -i"Subject:
 > $SUBJECT_reports " ?
 >        Initially I thought of these, but there will'be several
 > mails - locking a single file did not looked to me a good idea.

I'm not sure I understand really, but this does not sound like it
would buy you anything. If you want to grab the Subject verbatim, it's
cheaper to do a simple grab:

    :0
    * ^Subject:[      ]*\/[^  ].*
    { SUBJECT=$MATCH }

(This is one of the few places where you really do want .* -- match
anything for as long as possible, i.e. to the end of the subject field.)
        [Banerjee, Tapas]  
        
        What I tried to say is, I am putting the same recepie in same rc
file, for n(12) times for different subjects.
        Currently, I write the filtered mail on a file has the format
<$SUBJECT>_mails.<date>.
        Rather than twelve receipie with  hard quoted subject fields, I
thought I can replace them by ONLY ONE
        recepie, alike Subroutine/Proc/MACRO calls,  if we grab the subject
from senders mail, 
        For example

    :0:
         > * ^Subject:*.monalisa
         > | (formail -A"Bcc: internal_list" \
         >            -I"To: ess_mailing_list" \
         >            -I"From: 
ess(_at_)nyamdweb246(_dot_)gsam(_dot_)gs(_dot_)com" \
         >            -i"Subject: monalisa REPORTS " ) >>
monalisa_mails.`date '+%H%M%S'`
        :0:
         > * ^Subject:*.davinci
         > | (formail -A"Bcc: internal_list" \
         >            -I"To: ess_mailing_list" \
         >            -I"From: 
ess(_at_)nyamdweb246(_dot_)gsam(_dot_)gs(_dot_)com" \
         >            -i"Subject: monalisa REPORTS " ) >>
monalisa_mails.`date '+%H%M%S'`
        ...... n list .....
        can be replaced by a single list
        as 
        SUB=`formail -zx Subject` 
   * !$SUB ?? $VALID_SUBJECTS # one of the valid subject
           | (formail -A"Bcc: internal_list" \
         >            -I"To: ess_mailing_list" \
         >            -I"From: 
ess(_at_)nyamdweb246(_dot_)gsam(_dot_)gs(_dot_)com" \
         >            -i"Subject: $SUB REPORTS " ) >> $SUB_mails.`date
'+%H%M%S'`

        Will it offer more efficiency?
        [Banerjee, Tapas]  [Banerjee, Tapas]  [Banerjee, Tapas]  
 > Q2. I also wanted to move first line of body to subject field in
 > Japanese(Kanchi) text.
 >       I could do using English text. But for Japanese character -
outlook in
 > box mail
 >      coming as -
 >    Subject:
 > =?iso-2022-jp?B?GyRCJTQhPCVrJUklXiVzISYlNSVDJS8lOUVqPy4bKEogGyhK?=
 >            =?iso-2022-jp?B?GyRCNHA9YDJBM1sbKEo=?=  
 >    which when I forwarded, showed some junk character.     

Could you show an example of what happened? Forward the message back
from Outlook to something that can show the raw message.

Or do you mean the Subject: was intact as far as you could tell but
Outlook still failed to show it correctly (perhaps because of lack of
other MIME headers, although I don't suppose that should mean
anything)? (What happens if you pass on -XMime- -XContent- as part of
the formail snippet, would that help?)

Or do you mean you would like Procmail to produce the correct
=?iso-2022-jp?B?blahblahblah?= stuff in the Subject from something
encoded in some different way which you grabbed out of the body of the
message?

        [Banerjee, Tapas]  _  Ideally I want, Filter based on JAPNEASE Text
on Subject field.
        However - if we send mail with JAPNEASE text on subject field using
outlook,
        I get   encoded subject, which is inlegible to me, also I don't know
        how I can filter them using procmail rules.
        For example I sent some Japnease Charecter on Subject - it came as

        From: "Schuman, David" 
<David(_dot_)schuman(_at_)ny(_dot_)email(_dot_)gs(_dot_)com>
        To: "'ess(_at_)nyamdweb246(_dot_)gsam(_dot_)gs(_dot_)com'" 
<ess(_at_)nyamdweb246(_dot_)gsam(_dot_)gs(_dot_)com>
        Subject:
=?iso-2022-jp?B?GyRCJTQhPCVrJUklXiVzISYlNSVDJS8lOUVqPy4bKEogGyhK?=
                =?iso-2022-jp?B?GyRCNHA9YDJBM1sbKEo=?=  
        [Banerjee, Tapas]  To tackle the problem we thought - the user will
send the required  "Japnease subject" 
        to be forwarded, on 1st line of  mail body. Subject will be in
english( e.g davinci, galeleo..). I will use procmail, filter
        first line of body and put that line on Subject of outgoing mail.  I
could able to do so in English,
        but if we use Japnease chartecter on body, the Subject field did not
look like Japnease charecter on viewing
        the actual outgoing mail on Japnease MS-Outlook. 
        
        I am urgently looking for solution to this problem. I will try as
you suggested -XMime ... etc.
        If you have any ideas or clarification please let me know.
        Thanks,
                        - Tapas
 

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