[Mailman-Users] How do I get the from address?

2001-01-12 Thread Satya
How do I get the address from which the mail was sent, if I want to reply with a confirmation request? Is it acceptable to parse the From: header for the following Perl regexp: .*(<|\w)\@(>|\w) And the resulting match would be the address to which I can reply? -- Satya. http://satya.virtualave

Re: [Mailman-Users] How do I get the from address?

2001-01-12 Thread Dan Mick
It's almost always more complicated than you think. See formail, for instance, or the rfc822 stuff in Python/Mailman. I think your algorithm would be too simple. > How do I get the address from which the mail was sent, if I want to reply > with a confirmation request? Is it acceptable to parse

Re: [Mailman-Users] How do I get the from address?

2001-01-13 Thread Satya
On Jan 12, 2001 at 21:47, Dan Mick wrote: >It's almost always more complicated than you think. See >formail, for instance, or the rfc822 stuff in Python/Mailman. Com-pli-cated. I'm in no mood to make sense of RFC 822 right now, and Python still eludes me. If anyone wants, it's a single functi

Re: [Mailman-Users] How do I get the from address?

2001-01-13 Thread J C Lawrence
On Sat, 13 Jan 2001 21:33:57 +0530 (IST) Satya <[EMAIL PROTECTED]> wrote: > Com-pli-cated. I'm in no mood to make sense of RFC 822 right now, > and Python still eludes me. > $pa_addr=~s/(.*)(<|\s)(.*?\@.*?)(>|\s)(.*)/$3/; Which is broken, and yes, I'll let you read the RFC to find out why.

Re: [Mailman-Users] How do I get the from address?

2001-01-13 Thread Satya
On Jan 13, 2001 at 09:34, J C Lawrence wrote: [re a regexp I posted, and am to embarassed to quote] >Which is broken, and yes, I'll let you read the RFC to find out >why. If you want to do it right, with low effort, make the call-out >to formail. Yes, I should make the effort to do it right. I

Re: [Mailman-Users] How do I get the from address?

2001-01-13 Thread J C Lawrence
On Sat, 13 Jan 2001 23:11:23 +0530 (IST) Satya <[EMAIL PROTECTED]> wrote: > Gotta learn Python... I recommend the O'Reilly books. -- J C Lawrence [EMAIL PROTECTED] -(*) http://www.kanga.nu/~claw/ --=| A man is as sane as

Re: [Mailman-Users] How do I get the from address?

2001-01-13 Thread Chuq Von Rospach
On 1/13/01 9:34 AM, "J C Lawrence" <[EMAIL PROTECTED]> wrote: > Which is broken, and yes, I'll let you read the RFC to find out > why. Or you can look at Mail::Address in the perl CPAN libraries, which does it properly, and which will give you an idea why this regex is way too simplistic -- a

Re: [Mailman-Users] How do I get the from address?

2001-01-13 Thread John W Baxter
At 10:31 -0800 1/13/01, Chuq Von Rospach wrote: >> Which is broken, and yes, I'll let you read the RFC to find out >> why. > >Or you can look at Mail::Address in the perl CPAN libraries, which does it >properly, and which will give you an idea why this regex is way too >simplistic -- and wrong. O

Re: [Mailman-Users] How do I get the from address?

2001-01-13 Thread Chuq Von Rospach
On 1/13/01 7:03 PM, "John W Baxter" <[EMAIL PROTECTED]> wrote: > Or one can look at Mastering Regular Expressions page 316 which contains, > in highly compressed micro type, a 6,598 byte (he says) regular expression > for matching email addresses. Thanx. I remembered that, went looking for it, a

Re: [Mailman-Users] How do I get the from address?

2001-01-15 Thread Florian Weimer
John W Baxter <[EMAIL PROTECTED]> writes: > Or one can look at Mastering Regular Expressions page 316 which contains, > in highly compressed micro type, a 6,598 byte (he says) regular expression > for matching email addresses. Something has to be wrong. The mail address syntax described in RFC

Re: [Mailman-Users] How do I get the from address?

2001-01-15 Thread Nigel Metheringham
[EMAIL PROTECTED] said: > Or one can look at Mastering Regular Expressions page 316 which > contains, in highly compressed micro type, a 6,598 byte (he says) > regular expression for matching email addresses. (The previous > several pages develop the RE.) Jeffrey E. F. Friedl O'Reilly (of > cour