Re: qmail-inject not fully RFC822 compliant.
On Mon, Jul 10, 2000 at 03:51:50PM +0200, Magnus Bodin 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]' I use this: set sendmail='/usr/local/sbin/muttqmail' where muttqmail is compiled from the attached c source. #include #include #include #include void nomem() { printf("muttqmail: out of memory\n"); exit(111); } void removequote (char *d, char *s) { char c; do { c = *s++; if (c != '\"') { if (c == '\\') c = *s++; *d++ = c; } } while (c != '\0'); } void main(int argc,char **argv) { char **newargv; char **arg; int i; newargv = (char **) malloc((argc + 1) * sizeof(char *)); if (!newargv) nomem(); arg = newargv; *arg++ = "/var/qmail/bin/qmail-inject"; for (i = 1;i < argc;++i) { *arg=malloc((strlen(argv[i])+1)*sizeof(char)); if (!*arg) nomem(); removequote(*arg,argv[i]); arg++; } *arg = NULL; execv(*newargv,newargv); printf("muttqmail: unable to run qmail-inject\n"); exit(111); }
Re: qmail-inject not fully RFC822 compliant.
On Mon, Jul 10, 2000 at 04:22:11PM +0200, Magnus Bodin <[EMAIL PROTECTED]> wrote: > How do you mean that mutt encodes the addresses? > It passes the address like this: "address with spaces"@x42.com > nothinge else. Most likely you the address you are really referring to is: address with [EMAIL PROTECTED] That address under rfc 821 encoding is transmitted as: "address with spaces"@x42.com
Re: qmail-inject not fully RFC822 compliant.
On Mon, Jul 10, 2000 at 09:18:09AM -0500, Bruno Wolff III wrote: > > 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. How do you mean that mutt encodes the addresses? It passes the address like this: "address with spaces"@x42.com nothinge else. > This topic has appeared both here and on the mutt-dev list in the past. Thanks. I'll dig the archives. /magnus -- http://x42.com/
Re: qmail-inject not fully RFC822 compliant.
On Mon, Jul 10, 2000 at 03:51:50PM +0200, Magnus Bodin wrote: > > 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" > Using echo -e "To:... this works for me. > FAILS! > > but... > > SUCCESS-STORY: > > echo "To: \"address with spaces\"@x42.com\nSubject: Hello 2" | \ > /var/qmail/bin/qmail-inject -f [EMAIL PROTECTED] > nope, doesnt work. Using echo -e, this works for me. Gerrit. -- [EMAIL PROTECTED] innominate AG networking people fon: +49.30.308806-0 fax: -77 web: http://innominate.de pgp: /pgp/gpa
Re: qmail-inject not fully RFC822 compliant.
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/
qmail-inject not fully RFC822 compliant.
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/