Fossil SCM

Experimental: Change the X-Fossil-From: header in alert emails to Sender:. This might help with Outlook users. Or it might make things worse. The only think I know to do is try it and see what happens.

drh 2020-03-16 19:45 trunk
Commit b4dcf8e4ef8660044a1fc1b9926d408212e614aea50bd60e78adba5d1cc0b60b
1 file changed +5 -5
+5 -5
--- src/alerts.c
+++ src/alerts.c
@@ -762,11 +762,11 @@
762762
** Date:
763763
** Message-Id:
764764
** Content-Type:
765765
** Content-Transfer-Encoding:
766766
** MIME-Version:
767
-** X-Fossil-From:
767
+** Sender:
768768
**
769769
** The caller maintains ownership of the input Blobs. This routine will
770770
** read the Blobs and send them onward to the email system, but it will
771771
** not free them.
772772
**
@@ -774,14 +774,14 @@
774774
** in the pHdr parameter.
775775
**
776776
** If the zFromName argument is not NULL, then it should be a human-readable
777777
** name or handle for the sender. In that case, "From:" becomes a made-up
778778
** email address based on a hash of zFromName and the domain of email-self,
779
-** and an additional "X-Fossil-From:" field is inserted with the email-self
780
-** address. Downstream software might use the X-Fossil-From header to set
779
+** and an additional "Sender:" field is inserted with the email-self
780
+** address. Downstream software might use the Sender header to set
781781
** the envelope-from address of the email. If zFromName is a NULL pointer,
782
-** then the "From:" is set to the email-self value and X-Fossil-From is
782
+** then the "From:" is set to the email-self value and Sender is
783783
** omitted.
784784
*/
785785
void alert_send(
786786
AlertSender *p, /* Emailer context */
787787
Blob *pHdr, /* Email header (incomplete) */
@@ -809,11 +809,11 @@
809809
if( p->zFrom==0 || p->zFrom[0]==0 ){
810810
return; /* email-self is not set. Error will be reported separately */
811811
}else if( zFromName ){
812812
blob_appendf(pOut, "From: %s <%s@%s>\r\n",
813813
zFromName, alert_mailbox_name(zFromName), alert_hostname(p->zFrom));
814
- blob_appendf(pOut, "X-Fossil-From: <%s>\r\n", p->zFrom);
814
+ blob_appendf(pOut, "Sender: <%s>\r\n", p->zFrom);
815815
}else{
816816
blob_appendf(pOut, "From: <%s>\r\n", p->zFrom);
817817
}
818818
blob_appendf(pOut, "Date: %z\r\n", cgi_rfc822_datestamp(time(0)));
819819
if( strstr(blob_str(pHdr), "\r\nMessage-Id:")==0 ){
820820
--- src/alerts.c
+++ src/alerts.c
@@ -762,11 +762,11 @@
762 ** Date:
763 ** Message-Id:
764 ** Content-Type:
765 ** Content-Transfer-Encoding:
766 ** MIME-Version:
767 ** X-Fossil-From:
768 **
769 ** The caller maintains ownership of the input Blobs. This routine will
770 ** read the Blobs and send them onward to the email system, but it will
771 ** not free them.
772 **
@@ -774,14 +774,14 @@
774 ** in the pHdr parameter.
775 **
776 ** If the zFromName argument is not NULL, then it should be a human-readable
777 ** name or handle for the sender. In that case, "From:" becomes a made-up
778 ** email address based on a hash of zFromName and the domain of email-self,
779 ** and an additional "X-Fossil-From:" field is inserted with the email-self
780 ** address. Downstream software might use the X-Fossil-From header to set
781 ** the envelope-from address of the email. If zFromName is a NULL pointer,
782 ** then the "From:" is set to the email-self value and X-Fossil-From is
783 ** omitted.
784 */
785 void alert_send(
786 AlertSender *p, /* Emailer context */
787 Blob *pHdr, /* Email header (incomplete) */
@@ -809,11 +809,11 @@
809 if( p->zFrom==0 || p->zFrom[0]==0 ){
810 return; /* email-self is not set. Error will be reported separately */
811 }else if( zFromName ){
812 blob_appendf(pOut, "From: %s <%s@%s>\r\n",
813 zFromName, alert_mailbox_name(zFromName), alert_hostname(p->zFrom));
814 blob_appendf(pOut, "X-Fossil-From: <%s>\r\n", p->zFrom);
815 }else{
816 blob_appendf(pOut, "From: <%s>\r\n", p->zFrom);
817 }
818 blob_appendf(pOut, "Date: %z\r\n", cgi_rfc822_datestamp(time(0)));
819 if( strstr(blob_str(pHdr), "\r\nMessage-Id:")==0 ){
820
--- src/alerts.c
+++ src/alerts.c
@@ -762,11 +762,11 @@
762 ** Date:
763 ** Message-Id:
764 ** Content-Type:
765 ** Content-Transfer-Encoding:
766 ** MIME-Version:
767 ** Sender:
768 **
769 ** The caller maintains ownership of the input Blobs. This routine will
770 ** read the Blobs and send them onward to the email system, but it will
771 ** not free them.
772 **
@@ -774,14 +774,14 @@
774 ** in the pHdr parameter.
775 **
776 ** If the zFromName argument is not NULL, then it should be a human-readable
777 ** name or handle for the sender. In that case, "From:" becomes a made-up
778 ** email address based on a hash of zFromName and the domain of email-self,
779 ** and an additional "Sender:" field is inserted with the email-self
780 ** address. Downstream software might use the Sender header to set
781 ** the envelope-from address of the email. If zFromName is a NULL pointer,
782 ** then the "From:" is set to the email-self value and Sender is
783 ** omitted.
784 */
785 void alert_send(
786 AlertSender *p, /* Emailer context */
787 Blob *pHdr, /* Email header (incomplete) */
@@ -809,11 +809,11 @@
809 if( p->zFrom==0 || p->zFrom[0]==0 ){
810 return; /* email-self is not set. Error will be reported separately */
811 }else if( zFromName ){
812 blob_appendf(pOut, "From: %s <%s@%s>\r\n",
813 zFromName, alert_mailbox_name(zFromName), alert_hostname(p->zFrom));
814 blob_appendf(pOut, "Sender: <%s>\r\n", p->zFrom);
815 }else{
816 blob_appendf(pOut, "From: <%s>\r\n", p->zFrom);
817 }
818 blob_appendf(pOut, "Date: %z\r\n", cgi_rfc822_datestamp(time(0)));
819 if( strstr(blob_str(pHdr), "\r\nMessage-Id:")==0 ){
820

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button