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.
Commit
b4dcf8e4ef8660044a1fc1b9926d408212e614aea50bd60e78adba5d1cc0b60b
Parent
192c809a31242c6…
1 file changed
+5
-5
+5
-5
| --- src/alerts.c | ||
| +++ src/alerts.c | ||
| @@ -762,11 +762,11 @@ | ||
| 762 | 762 | ** Date: |
| 763 | 763 | ** Message-Id: |
| 764 | 764 | ** Content-Type: |
| 765 | 765 | ** Content-Transfer-Encoding: |
| 766 | 766 | ** MIME-Version: |
| 767 | -** X-Fossil-From: | |
| 767 | +** Sender: | |
| 768 | 768 | ** |
| 769 | 769 | ** The caller maintains ownership of the input Blobs. This routine will |
| 770 | 770 | ** read the Blobs and send them onward to the email system, but it will |
| 771 | 771 | ** not free them. |
| 772 | 772 | ** |
| @@ -774,14 +774,14 @@ | ||
| 774 | 774 | ** in the pHdr parameter. |
| 775 | 775 | ** |
| 776 | 776 | ** If the zFromName argument is not NULL, then it should be a human-readable |
| 777 | 777 | ** name or handle for the sender. In that case, "From:" becomes a made-up |
| 778 | 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 | |
| 779 | +** and an additional "Sender:" field is inserted with the email-self | |
| 780 | +** address. Downstream software might use the Sender header to set | |
| 781 | 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 | |
| 782 | +** then the "From:" is set to the email-self value and Sender is | |
| 783 | 783 | ** omitted. |
| 784 | 784 | */ |
| 785 | 785 | void alert_send( |
| 786 | 786 | AlertSender *p, /* Emailer context */ |
| 787 | 787 | Blob *pHdr, /* Email header (incomplete) */ |
| @@ -809,11 +809,11 @@ | ||
| 809 | 809 | if( p->zFrom==0 || p->zFrom[0]==0 ){ |
| 810 | 810 | return; /* email-self is not set. Error will be reported separately */ |
| 811 | 811 | }else if( zFromName ){ |
| 812 | 812 | blob_appendf(pOut, "From: %s <%s@%s>\r\n", |
| 813 | 813 | 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); | |
| 815 | 815 | }else{ |
| 816 | 816 | blob_appendf(pOut, "From: <%s>\r\n", p->zFrom); |
| 817 | 817 | } |
| 818 | 818 | blob_appendf(pOut, "Date: %z\r\n", cgi_rfc822_datestamp(time(0))); |
| 819 | 819 | if( strstr(blob_str(pHdr), "\r\nMessage-Id:")==0 ){ |
| 820 | 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 | ** 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 |