procmail
[Top] [All Lists]

RE: procmail Efficiency Question

1999-03-24 09:52:53
        I am greatful for your valuable advice.
        Kindly note:

        1. I use date field to uniquely identify the mail, to be send on
batch at 
                later time(Ref- my earlier mail to you). Unless there are
better methods 
                 e.g random no/autoincrement(i++)  attached to the file,
             I will filter the date as you suggsted.

        2. Regarding Japnease text, you are right( ref below). I will try as
you suggested.
            Any other idea also'll be of great help to me.

        - Tapas
                

-----Original Message-----
From: era eriksson [SMTP:era(_at_)iki(_dot_)fi]
Sent: Wednesday, March 24, 1999 10:52 AM
To:   Banerjee, Tapas
Cc:   procmail(_at_)informatik(_dot_)rwth-aachen(_dot_)de
Subject:      RE: procmail Efficiency Question
 >> > Q2. I also wanted to move first line of body to subject field in
 >> > Japanese(Kanchi) text.
<...>
 >> 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?
 > 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. 

Okay, so you mean a message like this:

    From: Japanese person perhaps
    To: you
    Subject: galileo
    Mime-Version: 1.0
    Content-Type: text/plain; charset=iso-2022-jp
    Content-Transfer-Encoding: 8bit

    !%(_at_)f  <<-- mock Japanese Subject

    Rest of message, probably also in Japanese

should be transformed into

    From: Japanese person perhaps
    To: you
    Subject: =?iso-2022-jp?B?ISVAZgo=?=
    Mime-Version: 1.0
    Content-Type: text/plain; charset=iso-2022-jp
    Content-Transfer-Encoding: 8bit

    Rest of message, probably also in Japanese [Banerjee, Tapas]  -YOU RE
RIGHT 

... where ISVAZgo= is the correct encoding of the !%(_at_)f word?


If yes, 
        [Banerjee, Tapas]   EXACTLY
what exactly should trigger this action (the existence of
iso-2022-jp in the Content-Type line, perhaps)?
        [Banerjee, Tapas]  We do not process anything on new subject field.
        We just send all the stored mails using sendmail. The objective is
        that Japnease user sees subject line in Japnease e.g "Weekly Report
of Davinci Fund" (In Japnease)

    :0
    * some additional condition, perhaps?
    * B ?? ^^\/[^a-z]+
    {
        JPSUBJECT=`echo "$MATCH" | mmencode` }

        :0fwh
        | formail -I "Subject: =?iso-2022-jp?B?$JPSUBJECT?="

        :0bwh
        ... trimming of first line of body left as an exercise ...
    }

Again, I'm not sure if RFC2047 requires you to always have
Mime-Version: 1.0 in the headers before you're allowed to use this
crazy encoding, but then if the body already contains Japanese, I'll
guess it would be safe to assume the message is already a MIME
message.

You might want to read the relevant RFCs in order to gain a better
understanding. There are links to them on the Procmail Links page,
<http://www.iki.fi/era/procmail/links.html>

/* era */

-- 
.obBotBait: It shouldn't even matter whether     <http://www.iki.fi/era/>
I am a resident of the state of Washington.
<http://members.xoom.com/procmail/>
 * Sign the European spam petition!
<http://www.politik-digital.de/spam/en/> *

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