[Gllug] OT: Police Web Site

David Damerell damerell at chiark.greenend.org.uk
Fri Feb 4 14:52:46 UTC 2011


On Friday, 4 Feb 2011, Simon Wilcox wrote:
>> What do you suggest, I find this a bit daunting:
>> 	http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html

I suggest using the Perl module conveniently supplied at that very
site and not fretting about the internals of a job that someone else
has done capably for you. :-)

Failing that - not working in Perl, say - I suggest seeing if your
language has an equivalent module.

[Note there is not a step here where I say "write your own RFC 822
parser", unless you're a) bored and b) a guru.]

Failing _that_, you're never going to get all the fancy ways you can
express an RFC822 address right (but in practice people are typing

foo at example.com

into a Web form and not

"Mr Terence Foo" <foo at example.com>

- RFC 822 describes all the things you can put in an email's address
headers, and there are a lot) err on the side of being liberal - don't
gratuitously check input email addresses for things you figure
probably aren't allowed because most email addresses don't have them,
which is precisely what the numpties who wrote most Web forms do, like
this:

>At the very least they could support a '+' symbol. I route mail using 
>simonw+source@ quite often, except the damned javascript will tell me 
>"please use a valid email address". It IS valid you useless piece of 
>sh.....

... which is _exactly_ the problem I am complaining about.
damerell+foobar at chiark.greenend.org.uk would be just the throwaway
address to give to Foobar Company if it weren't for this kind of
gripe.

These days exim here supports some abomination like
0foobark.damerell at chiark.greenend.org.uk which is equivalent but works
in those stupid Web forms.

-- 
David Damerell <damerell at chiark.greenend.org.uk> Kill the tomato!
Today is Aponoia, February.
Tomorrow will be Epithumia, February - a weekend.
--
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list