From: Nico G. <ni...@ng...> - 2005-08-15 14:56:04
|
Hi, I received this bug message: When i do 'fetchmail --bsmtp test.mail' test.mail looks like that: MAIL FROM:us...@us... RCPT TO: us...@us... DATA.. Before 6.2.5.2 there was a space after the from. This is caused by: - "MAIL FROM: %s", (msg->return_path[0]) ? msg->return_path : user); + "MAIL FROM:%s", (msg->return_path[0]) ? msg->return_path : user); Why was this space removed? Regards Nico -- Nico Golde - JAB: ni...@ja... | GPG: 0x73647CFF http://www.ngolde.de | http://www.muttng.org | http://grml.org VIM has two modes - the one in which it beeps and the one in which it doesn't -- encrypted mail preferred |
From: Nico G. <ni...@ng...> - 2005-08-15 15:01:32
|
Hi, * Nico Golde <ni...@ng...> [2005-08-15 14:58]: > I received this bug message: > When i do 'fetchmail --bsmtp test.mail' > test.mail looks like that: > > MAIL FROM:us...@us... > RCPT TO: us...@us... > DATA.. > > Before 6.2.5.2 there was a space after the from. > This is caused by: > - "MAIL FROM: %s", (msg->return_path[0]) ? msg->return_path : user); > + "MAIL FROM:%s", (msg->return_path[0]) ? msg->return_path : user); > > Why was this space removed? Ah ok, it was because of cyrus. Regards Nico -- Nico Golde - JAB: ni...@ja... | GPG: 0x73647CFF http://www.ngolde.de | http://www.muttng.org | http://grml.org VIM has two modes - the one in which it beeps and the one in which it doesn't -- encrypted mail preferred |
From: Rob F. <rf...@fu...> - 2005-08-15 18:37:45
|
Nico Golde wrote: > I received this bug message: > When i do 'fetchmail --bsmtp test.mail' > test.mail looks like that: > > MAIL FROM:us...@us... > RCPT TO: us...@us... > DATA.. There are supposed to be <angle brackets> around those email addresses. I'm a bit concerned that they aren't there. It should look like: MAIL FROM:<us...@us...> RCPT TO:<us...@us...> -- ==============================| "A microscope locked in on one point Rob Funk <rf...@fu...> |Never sees what kind of room that it's in" http://www.funknet.net/rfunk | -- Chris Mars, "Stuck in Rewind" |
From: Nico G. <ni...@ng...> - 2005-08-15 18:55:15
|
Hi, * Rob Funk <rf...@fu...> [2005-08-15 18:48]: > Nico Golde wrote: > > I received this bug message: > > When i do 'fetchmail --bsmtp test.mail' > > test.mail looks like that: > > > > MAIL FROM:us...@us... > > RCPT TO: us...@us... > > DATA.. > > There are supposed to be <angle brackets> around those email addresses. > I'm a bit concerned that they aren't there. It should look like: > > MAIL FROM:<us...@us...> > RCPT TO:<us...@us...> --- sink.c 2005-08-15 18:54:07.000000000 +0200 +++ la.c 2005-08-15 18:54:58.000000000 +0200 @@ -721,7 +721,7 @@ /* see the ap computation under the SMTP branch */ fprintf(sinkfp, - "MAIL FROM:%s", (msg->return_path[0]) ? msg->return_path : user); + "MAIL FROM:<%s>", (msg->return_path[0]) ? msg->return_path : user); if (ctl->pass8bits || (ctl->mimemsg & MSG_IS_8BIT)) fputs(" BODY=8BITMIME", sinkfp); @@ -746,7 +746,7 @@ for (idp = msg->recipients; idp; idp = idp->next) if (idp->val.status.mark == XMIT_ACCEPT) { - fprintf(sinkfp, "RCPT TO: %s\r\n", + fprintf(sinkfp, "RCPT TO:<%s>\r\n", rcpt_address (ctl, idp->id, 1)); (*good_addresses)++; } Regards Nico -- Nico Golde - JAB: ni...@ja... | GPG: 0x73647CFF http://www.ngolde.de | http://www.muttng.org | http://grml.org VIM has two modes - the one in which it beeps and the one in which it doesn't -- encrypted mail preferred |
From: Matthias A. <mat...@gm...> - 2005-08-16 14:48:01
|
Nico Golde <ni...@ng...> writes: > --- sink.c 2005-08-15 18:54:07.000000000 +0200 > +++ la.c 2005-08-15 18:54:58.000000000 +0200 > @@ -721,7 +721,7 @@ > > /* see the ap computation under the SMTP branch */ > fprintf(sinkfp, > - "MAIL FROM:%s", (msg->return_path[0]) ? msg->return_path : user); > + "MAIL FROM:<%s>", (msg->return_path[0]) ? msg->return_path : user); Thanks for your patch. However, the interactive SMTP sink checks if it needs to add angle brackets, so let's use the same in BSMTP for consistency. (Actually, the output drivers should be merged so there's only one SMTP/LMTP/BSMTP sink that talks to either file or socket. But that's a major change and for later, i. e. post 6.3.0.) -- Matthias Andree |
From: Matthias A. <mat...@gm...> - 2005-08-16 14:46:43
|
Nico Golde <ni...@ng...> writes: > Hi, > > I received this bug message: > When i do 'fetchmail --bsmtp test.mail' > test.mail looks like that: > > MAIL FROM:us...@us... > RCPT TO: us...@us... > DATA.. > > Before 6.2.5.2 there was a space after the from. > This is caused by: > - "MAIL FROM: %s", (msg->return_path[0]) ? msg->return_path : user); > + "MAIL FROM:%s", (msg->return_path[0]) ? msg->return_path : user); > > Why was this space removed? Protocol conformance. The BSMTP writer is b0rked in 6.2.5.2, it lacks the angle brackets, too. What a mess. Anyways, the next 6.2.6-pre snapshot and the SVN repo versions have this fixed, too. Here's the patch from SVN, I don't know if it works for 6.2.5.2: Index: sink.c =================================================================== --- sink.c (Revision 4234) +++ sink.c (Revision 4237) @@ -713,6 +713,7 @@ /* open a BSMTP stream */ { struct idlist *idp; + int need_anglebrs; if (strcmp(ctl->bsmtp, "-") == 0) sinkfp = stdout; @@ -720,8 +721,12 @@ sinkfp = fopen(ctl->bsmtp, "a"); /* see the ap computation under the SMTP branch */ - fprintf(sinkfp, - "MAIL FROM:%s", (msg->return_path[0]) ? msg->return_path : user); + need_anglebrs = (msg->return_path[0] != '<'); + fprintf(sinkfp, + "MAIL FROM:%s%s%s", + need_anglebrs ? "<" : "", + (msg->return_path[0]) ? msg->return_path : user, + need_anglebrs ? ">" : ""); if (ctl->pass8bits || (ctl->mimemsg & MSG_IS_8BIT)) fputs(" BODY=8BITMIME", sinkfp); @@ -746,7 +751,7 @@ for (idp = msg->recipients; idp; idp = idp->next) if (idp->val.status.mark == XMIT_ACCEPT) { - fprintf(sinkfp, "RCPT TO: %s\r\n", + fprintf(sinkfp, "RCPT TO:<%s>\r\n", rcpt_address (ctl, idp->id, 1)); (*good_addresses)++; } -- Matthias Andree |