1

Topic: mlmmj | To: header being sent twice

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Deployed with iRedMail Easy or the downloadable installer? downloadable
- Linux/BSD distribution name and version: CentOS 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No.
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Given mlmmj mailing list "testml@mydomain.com"; ML open for external posters
Given subscriber of testml@mydomain.com: user1@mydomain.com
Given subscriber of testml@mydomain.com: user2@mydomain.com
Given non-subscriber of testml@mydomain.com: user3@mydomain.com

ISSUE:
======

1) user3@mydomain.com sends mail to testml@mydomain.com

2) user1@mydomain.com receives the mail. There are two To: headers:
         I) To: testml@mydomain.com
         II) To: user1@mydomain.com

3) user2@mydomain.com receives the mail. There are two To: headers:
         I) To: testml@mydomain.com
         II) To: user2@mydomain.com

Expected behaviour:
===================

user1@mydomain.com, user2@mydomain.com and all further subscribers receive the mail with only one To: header:
testml@mydomain.com


Any ideas?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: mlmmj | To: header being sent twice

Could you please show us the (original) "two To: headers"?

3

Re: mlmmj | To: header being sent twice

Hi Huangbin!

Sure:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Return-Path: <mbounce+testml-bounces-359-user1=mycompany.com@mycompany.com>
Delivered-To: user1@mycompany.com
Received: from myirmsvr.mycompany.com (localhost [127.0.0.1])
    by myirmsvr.mycompany.com (Postfix) with ESMTP id ACC72187B6DE
    for <user1@mycompany.com>; Wed, 22 Mar 2019 12:02:06 +0100 (CET)
Authentication-Results: myirmsvr.mycompany.com (amavisd-new);
    dkim=pass (1024-bit key) reason="pass (just generated, assumed good)"
    header.d=mycompany.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mycompany.com; h=to
    :message-id:mime-version:to:subject:subject:from:from
    [...]
Received: from myirmsvr.mycompany.com ([127.0.0.1])
    by myirmsvr.mycompany.com (myirmsvr.mycompany.com [127.0.0.1]) (amavisd-new, port 10027)
    with ESMTP id Oy4ex4E_2KDr for <user1@mycompany.com>;
    Wed, 22 Mar 2019 12:02:06 +0100 (CET)
Received: from myirmsvr.mycompany.com (localhost [127.0.0.1])
    by myirmsvr.mycompany.com (Postfix) with ESMTP id BFE38187B6DE
    for <testml@mycompany.com>; Wed, 22 Mar 2019 12:02:04 +0100 (CET)
X-Virus-Scanned: amavisd-new at myirmsvr.mycompany.com
Received: from myirmsvr.mycompany.com ([127.0.0.1])
    by myirmsvr.mycompany.com (myirmsvr.mycompany.com [127.0.0.1]) (amavisd-new, port 10024)
    with ESMTP id 1-cL9gLAV26P for <testml@mycompany.com>;
    Wed, 22 Mar 2019 12:01:39 +0100 (CET)
Received: from mytestsvr.mycompany.com (mytestsvr.mycompany.com [192.168.11.122])
    by myirmsvr.mycompany.com (Postfix) with ESMTP id 19497187B6DD
    for <testml@mycompany.com>; Wed, 22 Mar 2019 12:01:39 +0100 (CET)
Date: Wed, 22 Mar 2019 11:01:38 GMT
Content-Type: multipart/mixed; boundary=MIME_boundary_7291A4C16A868B9A
From: mytest@mycompany.com
Subject: [testml]  Mytestsvr | This is a test message
To: <testml@mycompany.com>
Mime-Version: 1.0
Message-Id: <20190322110224.BFE38187B6DE@myirmsvr.mycompany.com>
To: user1@mycompany.com

4

Re: mlmmj | To: header being sent twice

About 2 "To:" headers, do you mean this?

Delivered-To: user1@mycompany.com
To: <testml@mycompany.com>

- "Delivered-To:" is written by Postfix after queue.
- "To:" is generated by MUA (like Outlook/Thunderbird) when sender composed the email.

When Postfix receives the email, the "To:" address may be a mailing list, a virtual alias, Postfix must expand it and locate the final recipient email address - which is the one in "Delivered-To:".

5

Re: mlmmj | To: header being sent twice

No, I mean the last 4 lines:

To: <testml@mycompany.com>
Mime-Version: 1.0
Message-Id: <20190322110224.BFE38187B6DE@myirmsvr.mycompany.com>
To: user1@mycompany.com

6

Re: mlmmj | To: header being sent twice

I can not reproduce this issue, i got only one "To:" with mailing list address.

Could you please show us how you send the email?

7

Re: mlmmj | To: header being sent twice

ZhangHuangbin wrote:

Could you please show us how you send the email?

Sure.

I insert the ML's eMail address (i.e. testml@mycompany.com) into Thunderbird's compose eMail To: field and hit the "Send" button.

8

Re: mlmmj | To: header being sent twice

I tested with Roundcube webmail, but not Thunderbird. Could you try Roundcube also?
But it doesn't make any sense that it has 2 To: headers with Thunderbird.

Also, please upgrade mlmmjadmin to the latest version (v2.1) and try again:
FYI: https://docs.iredmail.org/upgrade.mlmmjadmin.html

9

Re: mlmmj | To: header being sent twice

Hi Huangbin!

I updated to mlmmj 2.1, but the issue persists.

It's not that important, just a little irritating to the users, but they will learn.

May be there's a spontaneous self-healing with one of the following updates.

Not worth to spend more time on this.

Thanks a lot!

BR
IRMA

10 (edited by irma 2019-06-04 19:47:21)

Re: mlmmj | To: header being sent twice

Unfortunately there is a similar issue regarding CC'ed mailing lists:

UserA with eMail address userA@mycompany.com is member of the mailing list ML1@mycompany.com.

UserB sends mail to userC@mycompany.com and put mailing list ML1@mycompany.com into CC.

UserA receives the mail with mailing list ML1 being in the CC field and userA@mycompany.com being in the To: field


This means, that there's definitely sth. badly configured.

11

Re: mlmmj | To: header being sent twice

Well it was quite easy. The option "Add To: header" was enabled.

I don't understand in which use case so. wants that the lists' members get the messages with an additional To: header.

Please feel free to set the thread on [SOLVED]

12

Re: mlmmj | To: header being sent twice

Do you mean this was configured to be added by mlmm or mlmmjadmin? Could you please share more details?