procmail
[Top] [All Lists]

Re: Reformating to

1998-04-09 01:09:27

[I CC'd this personal mail to procmail list, because many may 
find it interesting]

|Wed 98-04-08 Kay Hayen <Kay(_at_)kayhayen(_dot_)com> mail.default
| 
| (+list.procmail) wrote:
| 
| BTW: knowing that you are procmail guru from my point of view, 

Thank you; but
I bow to Era, phil and David, who really shine in procmail mailing list.

| I've 
| wondered why you have chosen to go for this realname. There must
| be better mechanisms, right?


We don't have sendmail that would support plus addressing here, so
I cooked up "poor man's" plus addressing by using RFC comment.
See newest pm-tips.txt

Cheers!
jari


    13.2 Using RFC comment trick for additional information

        I invented this idea after reading Eli's exellent faq about email
        addressing. Please read it (especially section 19.) before you
        continue in order to understand what I'm going to present.

        I have an account which does not support plus addressing and I was
        kinda jelous to everyone that could use this neat sendmail
        addressing scheme. The plus addressing helps so much better to deal
        with mailing list messages.

        But as it turns out, we can simulate in some extent plus addressing
        with pure RFC compliant address. We use RFC comment, which is
        delimited by parenthesis include it into address. According to
        Eli's paper, comments should be preserved in emal while they may
        not exist in the extact place where originally put. So, send out
        message with following `From' or `Reply-To' line

            <login(_at_)site(_dot_)com> (Foo Bar+list.procmail)

        Or if your email address's localpart already signify your first and
        surname already, you could use simply:

            <first(_dot_)surname(_at_)site(_dot_)com> (+list.procmail)

        It's very unfortunate that when you subscribe to lists, the comment
        is not preserved when you're added to the list. Only the address
        part is preserved. I even tried to use following syntax which
        forces the comment inside andgles and any program that gets address
        from inside angles would have picked the comment too.

            <first.surname(+list.procmail)@site.com>

        But I had no luck. Eg procmail based mailing lists use formail
        to derive the return address and `procmail' does not preserve
        comments. The above gets truncated to

            first(_dot_)surname(_at_)site(_dot_)com

        Ah well. (groan). In case you find any use for this COMMENT_PLUS
        approach, here is example recipe to trap these plussed addresses
        that are sent to your account. The recipe says: if it is addressed
        to my account and if we find `(+' followed by anything until `)';
        then set PLUS to the contents. The `PLUS' variable would be set to
        `list.procmail'

            TOME = "(login1|login2)"
            PLUS                        # kill variable

            :0
            *$ ^TO().*$TOME
            *   \/[(][+]\/[^)]+
            {
                PLUS = $MATCH

                :0:                     # sink to list.procmail
                $PLUS
            }

        Pretty simple. And you can put anything inside RFC comment and do
        watever you want with these plus addresses. _NOTE_: there are no
        guarrantees that the RFC comment is preserved everytime, but I'd
        say it is 95% of the cases where mail is delivered from one server
        to another.

        And if you discuss in usenet groups, you could use address

            Reply-To: <first.surname(+mail.usenet)@site.com>

        And the PLUS recipe above would sink all personal usenet replies to you
        into folder `mail.usenet', supposing the sender's MUA grabbed the
        `Reply-To' field and not the `From' field. Or you can classify
        the usenet groups:

            Reply-To: <first.surname(+usenet.games)@site.com>
            Reply-To: <first.surname(+usenet.emacs)@site.com>
            Reply-To: <first.surname(+usenet.linux)@site.com>

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