Two To: headers added to auto-mails from list
Hi,
I have noticed that in emails from the list (confirm-sub, sub-ok etc.) I get two To: headers.
In the configuration of my list I have 'Add To: header'. And in 'Delete headers' 'To:' is listed also.
Why do I get this extra To: header? Could it be a bug with the mentioned configuration above?
Using latest version.
Signature · 2 lines
Martin - http://925.dk "Shoot for the moon, even if you miss, you'll land among the stars."
Hi,
Quoting Martin Koch Andersen <[email protected]>:
Quoted 5 lines
I have noticed that in emails from the list (confirm-sub, sub-ok etc.) I get two To: headers.
In the configuration of my list I have 'Add To: header'. And in 'Delete headers' 'To:' is listed also.
That sounds very strange.
The headers are changed in the incoming mail. Then the mail is checked for list control commands, and a reply is sent if needed. The changed headers should never appear in the reply.
Quoted 2 lines
Why do I get this extra To: header? Could it be a bug with the mentioned configuration above?
I cannot see how the customheaders option could change a confsub or sub-ok mail.
Quoted 1 line
Using latest version.
mlmmj 1.2.11?
Could you send an example of a mail with an extra To: header and your configuration files? A tarball on a web server is preferred :)
Morten
Hi,
Morten K. Poulsen skrev:
Quoted 13 lines
Quoting Martin Koch Andersen <[email protected]>:
Quoted 5 lines
I have noticed that in emails from the list (confirm-sub, sub-ok etc.) I get two To: headers.
In the configuration of my list I have 'Add To: header'. And in 'Delete headers' 'To:' is listed also.
That sounds very strange.
The headers are changed in the incoming mail. Then the mail is checked for list control commands, and a reply is sent if needed. The changed headers should never appear in the reply.
Quoted 5 lines
Quoted 2 lines
Why do I get this extra To: header? Could it be a bug with the mentioned configuration above?
I cannot see how the customheaders option could change a confsub or sub-ok mail.
It seems like the 'delete headers' thing is not executed for confsub, sub-ok etc. mails? And in my setting I have also 'Add To: header' - so that the actual receiver address is added as To: address. Could this not be the reason the 'To:' header is set twice?
Here is a sample:
From - Tue Apr 04 18:22:31 2006
X-Account-Key: account2
X-UIDL: UID3424-1115901712
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from watt.pil.dk (watt.pil.dk [195.41.47.12])
by heimdal.pil.dk (Postfix) with ESMTP id 06D40ACF9 for <[email protected]>; Tue, 4 Apr 2006 18:22:25 +0200 (CEST) Received: by watt.pil.dk (Postfix, from userid 106) id 770FADFD3; Tue, 4 Apr 2006 18:22:55 +0200 (CEST) Received: from nibu.pil.dk (nibu.pil.dk [193.162.142.149]) by watt.pil.dk (Postfix) with ESMTP id 5D1ECDFCD for <[email protected]>; Tue, 4 Apr 2006 18:22:55 +0200 (CEST) Received: from nibu.pil.dk (nibu.pil.dk [193.162.142.149]) by nibu.pil.dk (Postfix) with SMTP id A24856C2D7C for <[email protected]>; Tue, 4 Apr 2006 18:22:24 +0200 (CEST)
From: [email protected]
To: [email protected]
Message-ID: <[email protected]>
Date: Tue, 04 Apr 2006 18:22:24 +0200
Subject: Goodbye from [email protected]
To: [email protected]
X-Virus-Status: No
Thank you and goodbye!
You have now been removed from the
mailinglist.
Signature · 2 lines
Martin - http://925.dk "Shoot for the moon, even if you miss, you'll land among the stars."
Quoted 5 lines · Martin Koch Andersen
I have noticed that in emails from the list (confirm-sub, sub-ok etc.) I get two To: headers.
In the configuration of my list I have 'Add To: header'. And in Delete headers' 'To:' is listed also.
I have just reproduced this.
Quoted 2 lines
Why do I get this extra To: header? Could it be a bug with the mentioned configuration above?
The problem is that when addtohdr is true, an extra To: header is always appended by mlmmj-send even for mails not going to the list subscribers, e.g. subscribe confirmations and mails to moderators.
I have made a small patch that only sets addtohdr from the control dir when resending earlier failed mails or sending normal list mail. I am however not sure that this is the right solution, so I would welcome any input.
The patch is attached.
Quoted 1 line
Using latest version.
I know. :)
Signature · 1 line
Christian Laursen
src/mlmmj-send.c +2 -1
@@ -823,7 +823,6 @@exit (EXIT_FAILURE ); } - addtohdr =statctrl (listdir,"addtohdr" ); memmailsizestr =ctrlvalue (listdir,"memorymailsize" ); ctrlarchive =statctrl (listdir,"noarchive" );if (memmailsizestr) {
@@ -886,6 +885,7 @@ }break ;case '3' : + addtohdr =statctrl (listdir,"addtohdr" );case '4' :/* sending mails to subfile */ if ((subfd =open (subfilename,O_RDONLY )) <0 ) { log_error(LOG_ARGS, "Could not open '%s':",
@@ -904,6 +904,7 @@ archivefilename);break ;default :/* normal list mail -- now handled when forking */ + addtohdr =statctrl (listdir,"addtohdr" );break ; }
Quoting Martin Koch Andersen <[email protected]>:
Quoted 11 lines
Morten K. Poulsen skrev:
Quoted 5 lines
Quoted 2 lines
Why do I get this extra To: header? Could it be a bug with the mentioned configuration above?
I cannot see how the customheaders option could change a confsub or sub-ok mail.
It seems like the 'delete headers' thing is not executed for confsub, sub-ok etc. mails? And in my setting I have also 'Add To: header' - so that the actual receiver address is added as To: address. Could this not be the reason the 'To:' header is set twice?
Ah, you are using the addtohdr option, not customheaders. I should read a mail before replying to it :-)
Have you tried Christian Laursen's patch? I think it is the right way to fix this issue.
Morten