procmail
[Top] [All Lists]

Re: Address ONLY Match/Variable Recipe?

1996-12-02 13:32:17
At 11:37 AM 12/2/96 +0002, syoung(_at_)actcom(_dot_)co(_dot_)il wrote:
On  1 Dec 96 at 8:31, procmail(_at_)Informatik(_dot_)RWTH-Aach wrote:

I am looking for a recipe (for procmail) to grab any RFC-822
compliant address (*) and parse ONLY the address, not the user's
attached name, IF ANY, into either MATCH or another variable.


This is a bit off-topic, but I am curious about the RFC mentioned 
above.

I looked at RFC-822 and saw that an email address must look like 
this:

(word)*("." (word))@(subdomain)*("."(subdomain))

Where can I find out which _characters_ are allowed in (word) and 
(subdomain)? I didn't see any reference to this question in RFC-822.

"subdomain" does not appear in the RFC (though "sub-domain" does).
"word" is defined in 3.3, and both "word" and "sub-domain" in
Appendix D.

For example:
     word        =  atom / quoted-string
And then, look around, and you'll find "atom" and "quoted-string"
defined, etc., and eventually it maps back to characters.

I don't see your email address template listed though (nothing matches
the regexp "word.*word.*sub.*sub").  I presume you derived that
from other things?

ps - your system's "time zone" of +0002 is strange (broken?).
You may want to have your admin fix that unless you are actually
two minutes east of GMT.

Cheers,
Stan Ryckman (stanr(_at_)tiac(_dot_)net)
(posting from a different address for current convenience)

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