All of lore.kernel.org
 help / color / mirror / Atom feed
* Two To: headers added to auto-mails from list
@ 2006-04-03 14:08 Martin Koch Andersen
  2006-04-03 21:21 ` Morten K. Poulsen
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Martin Koch Andersen @ 2006-04-03 14:08 UTC (permalink / raw)
  To: mlmmj

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.

-- 
Martin - http://925.dk
"Shoot for the moon, even if you miss, you'll land among the stars."

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Two To: headers added to auto-mails from list
  2006-04-03 14:08 Two To: headers added to auto-mails from list Martin Koch Andersen
@ 2006-04-03 21:21 ` Morten K. Poulsen
  2006-04-04 16:31 ` Martin Koch Andersen
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Morten K. Poulsen @ 2006-04-03 21:21 UTC (permalink / raw)
  To: mlmmj

Hi,

Quoting Martin Koch Andersen <martin@925.dk>:
> 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.

> 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.

> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Two To: headers added to auto-mails from list
  2006-04-03 14:08 Two To: headers added to auto-mails from list Martin Koch Andersen
  2006-04-03 21:21 ` Morten K. Poulsen
@ 2006-04-04 16:31 ` Martin Koch Andersen
  2006-04-04 18:16 ` Christian Laursen
  2006-04-04 22:37 ` Morten K. Poulsen
  3 siblings, 0 replies; 5+ messages in thread
From: Martin Koch Andersen @ 2006-04-04 16:31 UTC (permalink / raw)
  To: mlmmj

Hi,

Morten K. Poulsen skrev:
> Quoting Martin Koch Andersen <martin@925.dk>:
>> 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.
> 
>> 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: <news-twice-daily+bounces-help@list.xxx.com>
Delivered-To: martin.yyy.dk@pop3.pil.dk
Received: from watt.pil.dk (watt.pil.dk [195.41.47.12])
	by heimdal.pil.dk (Postfix) with ESMTP id 06D40ACF9
	for <martin@yyy.dk>; 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 <martin@yyy.dk>; 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 <martin@yyy.dk>; Tue,  4 Apr 2006 18:22:24 +0200 (CEST)
From: news-twice-daily+help@list.euobserver.com
To: martin@yyy.dk
Message-ID: <1144167744-747cf83f-mlmmj-113b64df@3d09bfb8.plonk>
Date: Tue, 04 Apr 2006 18:22:24 +0200
Subject: Goodbye from news-twice-daily@list.xxx.com
To: martin@yyy.dk
X-Virus-Status: No

Thank you and goodbye!

You have now been removed from the

news-twice-daily@list.xxx.com

mailinglist.

-- 
Martin - http://925.dk
"Shoot for the moon, even if you miss, you'll land among the stars."

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Two To: headers added to auto-mails from list
  2006-04-03 14:08 Two To: headers added to auto-mails from list Martin Koch Andersen
  2006-04-03 21:21 ` Morten K. Poulsen
  2006-04-04 16:31 ` Martin Koch Andersen
@ 2006-04-04 18:16 ` Christian Laursen
  2006-04-04 22:37 ` Morten K. Poulsen
  3 siblings, 0 replies; 5+ messages in thread
From: Christian Laursen @ 2006-04-04 18:16 UTC (permalink / raw)
  To: mlmmj

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

Martin Koch Andersen <martin@925.dk> writes:

> 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.

> 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.

> Using latest version.

I know. :)

-- 
Christian Laursen

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: mlmmj-send.c patch --]
[-- Type: text/x-patch, Size: 831 bytes --]

diff -urN mlmmj-1.2.11.orig/src/mlmmj-send.c mlmmj-1.2.11/src/mlmmj-send.c
--- mlmmj-1.2.11.orig/src/mlmmj-send.c	Tue Nov  1 14:23:49 2005
+++ mlmmj-1.2.11/src/mlmmj-send.c	Tue Apr  4 19:43:42 2006
@@ -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;
 	}
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Two To: headers added to auto-mails from list
  2006-04-03 14:08 Two To: headers added to auto-mails from list Martin Koch Andersen
                   ` (2 preceding siblings ...)
  2006-04-04 18:16 ` Christian Laursen
@ 2006-04-04 22:37 ` Morten K. Poulsen
  3 siblings, 0 replies; 5+ messages in thread
From: Morten K. Poulsen @ 2006-04-04 22:37 UTC (permalink / raw)
  To: mlmmj

Quoting Martin Koch Andersen <martin@925.dk>:
> Morten K. Poulsen skrev:
>>> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-04-04 22:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-03 14:08 Two To: headers added to auto-mails from list Martin Koch Andersen
2006-04-03 21:21 ` Morten K. Poulsen
2006-04-04 16:31 ` Martin Koch Andersen
2006-04-04 18:16 ` Christian Laursen
2006-04-04 22:37 ` Morten K. Poulsen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.