Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] using mutt in a bash script: Name with '<'



On Wed, Aug 08, 2007 at 04:52:06PM +0200, Michal Hajek wrote:
> 
> * jep200404 (jep200404@example.com) [070808 15:31]:
> > What if your friend has an '<' in his or her name? 
> 
> hmm, I admit I did not think about it.
> I can only say that this is not the case in _my_situation_.
> 
> Another thought is whether this kind of situation violates rfc or not.
> I have rfc 2822 in front of me. But I am afraid my skill is insufficient.
> By reading through pages 15-17 I cannot tell for sure. My guess would be,
> that this situation theoretically may occur.

yep, from rfc2822 3.2.5:
"Strings of characters that include characters other than those allowed
in atoms may be represented in a quoted string format"

so in the From: field context you can include non-atext characters (see
3.2.4) in the display-name iff the display-name itself is quoted.

This works as expected:
	mail -s 'test' "\".><> ..\" <malattia@example.com>" < /dev/null
this doesn't:
	mail -s 'test' ".><>.. <malattia@example.com>" < /dev/null

the whole point is that in your script you need double-quoting, one to
group the command-line args and one to comply rfc2822.

ciao
-- 
mattia
:wq!


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links