This is because qmail-inject expects to be passed unencoded email addresses
and mutt passes rfc 821 encoded email addresses. They do this because
sendmail treats addresses as being rfc 822 encoded, and some unencoded
addresses won't work.

If you want these addresses to work you can modify the sendmail program
(the qmail sendmail emulation program) to parse its arguments using
the mess822 stuff.

Another approach that might work is to change mutt to have it specify
parse the headers rather than explicitly list the rcpt to addresses on
the command line. However you will need to be careful about how mutt
handles bcc addresses. They currently don't trust the injection program
to remove those headers, so they aren't passed to the injection program.

This topic has appeared both here and on the mutt-dev list in the past.

On Mon, Jul 10, 2000 at 03:51:50PM +0200,
  Magnus Bodin <[EMAIL PROTECTED]> wrote:
> 
> I use qmail-inject as my mutt mail queuing agent as this:
> in my .muttrc: 
> set sendmail = '/var/qmail/bin/qmail-inject -f [EMAIL PROTECTED]'
> 
> Mutt then queues mail bu appending all the recipients on the command line. 
> This works most of the times, but not on all RFC 822 messages.
> When sending a mail from mutt to 
>   
> "address with spaces"@x42.com
> 
> (Which is a valid, working and existing address, by the way)
> then qmail-inject does not parse that argument properly as a recipient. 
> 
> Just injecting the mail without the recipient on the command line works
> well, though, and qmail-inject parses the To:-line fine. 
> 
> BUG-CASE:  
> 
> echo "To: \"address with spaces\"@x42.com\nSubject: Hello 1" | \
> /var/qmail/bin/qmail-inject -f [EMAIL PROTECTED] \
> "\"address with spaces\"@x42.com"
> 
> FAILS!
> 
> but...
> 
> SUCCESS-STORY: 
> 
> echo "To: \"address with spaces\"@x42.com\nSubject: Hello 2" | \
> /var/qmail/bin/qmail-inject -f [EMAIL PROTECTED] 
> 
> Succedes. 
> 
> (syntax above depends on your shell, but you get the overall picture)
> 
> /magnus
> 
> --
> References: RFC822; STANDARD FOR THE FORMAT OF ARPA INTERNET TEXT MESSAGES
>             http://rfc821.x42.com/

Reply via email to