<<< Date Index >>>     <<< Thread Index >>>

Re: Email addresses with spaces



On 2008-05-29, Clayton Scott Kern <ckern1@xxxxxxxxxxxxxx> wrote:
> > Michelle Konzack <linux4michelle@xxxxxxxxxxxxxxx> wrote:
> > > Am 2008-05-28 10:43:41, schrieb Clayton Scott Kern:
> > > > I'm not sure if this is the right place to address this.
> > > > 
> > > > I use fetchmail -> sendmail -> procmail -> mutt.
> > > 
> > > First of all:  Why do you use "sendmail" between
> > >                "fetchmail" and "procmail"?
> > > 
> > > > I have problem with emails that have spaces in the user name.
> > > > For example  joe doe@xxxxxxxxxxx
> > > 
> > > Such messages should be rejected by your ISP on SMTP-Level since they
> > > are invalid.
> 
> 
> on 05-28-2008, Charles Cazabon wrote:
> > 
> > They're only invalid if they're not encoded correctly.  RFC822/2822 allows
> > spaces to be included if they're part of a quoted string.
> > 
> > i.e., this is an rfc822-valid header field:
> > 
> >   To: "joe doe"@mymail.com
> > 
> > Mutt handles this case correctly.
> > 
> > Either the message you're retrieving with fetchmail has the header encoded
> > incorrectly by the server it's retrieving from, or one of the programs 
> > you're
> > passing it through (including fetchmail) is munging the message header and
> > leaving it invalid.
> > 
> > You can check whether the message is already invalid on your mail server by
> > capturing the POP/IMAP conversation off the wire when you run fetchmail.  If
> > it's clean there, you need to figure out which of your mail-processing
> > programs is breaking it.
> > 
> > Charles
> > -- 
> > -----------------------------------------------------------------------
> > Charles Cazabon
> > GPL'ed software available at:               http://pyropus.ca/software/
> > -----------------------------------------------------------------------
> 
> Thank you for your comments, they got me thinking.
> 
> I changed to getmail and configured it to pass the message directly to
> procmail.  Also, I configured unixfrom = True.
> 
> According to getmail's log it passed the message as
> email_bounce@xxxxxxxxxx, but it showed up in the mbox folder as
> email bounce@xxxxxxxxxxx  So it looks like procmail uses Return-Path: to
> set the From_ line.  The man page for fetchmail says that it uses
> Return-Path first.
> 
> If changing getmail from unixfrom to arguments = ("-f", "%(sender)"),
> doesn't fix this, then I'll see what happens if I have getmail put the
> messages directly into the mail folder.
> 
> My new question is why mutt doesn't properly display these message in
> the index?  Instead is merges it with the message before it.

The first line of messages that are stored in mbox format begins 
with "From ", followed by the sender's address.  If the sender's 
address is in an invalid format, it probably doesn't match the 
pattern that mutt uses to search for those lines in the mailbox.  
Mutt doesn't recognize the line as the beginning of a new message 
and considers the text part of the preceding message.

Regards,
Gary