Some programs submit local mail via smtp (eg: netscape) and they
set the Sender: to just the username, no domain. However if the message
is then sent on to a remote site the sender is still just the username.
This confuses a some mailers, so the attached patch allows for a rewrite
of the Sender.
I can't think of a case where this would cause problems. But if there
is one the flags in the rewrite rule could be set to not rewrite the
Sender:.
--
Lee McLoughlin. Phone: +44 171 594 8388
IC-Parc, Imperial College, Fax: +44 171 594 8449
South Kensington, London. SW7 2BZ. UK. Email: L.McLoughlin@???
*** rewrite.c.ORIG Fri Apr 5 13:35:37 1996
--- rewrite.c Fri Apr 5 13:52:07 1996
***************
*** 426,431 ****
--- 426,440 ----
return rewrite_one_header(h, rewrite_from, routed_old, routed_new);
break;
+ /* LMJM: Some programs submit local mail via smtp (eg: netscape) so they
+ * set the Sender: to just the username, no domain. However if the message
+ * is then sent on to a remote site the sender is still just the username.
+ * This confuses a some mailers, so allow for a rewrite.
+ */
+ case htype_sender:
+ return rewrite_one_header(h, rewrite_sender, routed_old, routed_new);
+ break;
+
case htype_to:
return rewrite_one_header(h, rewrite_to, routed_old, routed_new);
break;
*** macros.h.ORIG Fri Apr 5 13:51:12 1996
--- macros.h Fri Apr 5 13:36:01 1996
***************
*** 205,211 ****
#define rewrite_replyto 0x10
#define rewrite_envfrom 0x20
#define rewrite_envto 0x40
! #define rewrite_all 0x7F
/* Flags for log_write() */
--- 205,212 ----
#define rewrite_replyto 0x10
#define rewrite_envfrom 0x20
#define rewrite_envto 0x40
! #define rewrite_sender 0x80
! #define rewrite_all 0xFF
/* Flags for log_write() */
*** readconf.c.ORIG Fri Apr 5 13:39:36 1996
--- readconf.c Fri Apr 5 13:39:43 1996
***************
*** 1766,1772 ****
case ' ': case '\t': break;
case 'h': next->flags |= rewrite_from | rewrite_to | rewrite_cc |
! rewrite_bcc | rewrite_replyto;
break;
case 'f': next->flags |= rewrite_from; break;
--- 1766,1772 ----
case ' ': case '\t': break;
case 'h': next->flags |= rewrite_from | rewrite_to | rewrite_cc |
! rewrite_bcc | rewrite_replyto | rewrite_sender;
break;
case 'f': next->flags |= rewrite_from; break;
***************
*** 1774,1779 ****
--- 1774,1780 ----
case 'c': next->flags |= rewrite_cc; break;
case 'b': next->flags |= rewrite_bcc; break;
case 'r': next->flags |= rewrite_replyto; break;
+ case 's': next->flags |= rewrite_sender; break;
case 'E': next->flags |= rewrite_envfrom | rewrite_envto; break;
case 'F': next->flags |= rewrite_envfrom; break;