FAQ
Configuration
- CentOS 5 64 bit
- Mailman 2.1.9
- Qmail with Plesk 8.3 mods

I have an interesting bounce issue occurring.
- Email is sent to a Mailman List
- List sends to each address
- One of the addresses bounces
- The bounce message ends with the right FROM and TO headers, but the wrong
RETURN-PATH and ERRORS-TO headers.

Is this a Mailman or Qmail issue?

Here is the bounce message

------------------
Return-Path: <mailman-bounces@[WRONGDOMAIN.COM]>
Received: (qmail 28263 invoked from network); 2 Jul 2008 14:46:36 -0400
Received: from localhost (HELO [MAIL.RIGHTDOMAIN.COM]) (127.0.0.1)
by localhost with SMTP; 2 Jul 2008 14:46:36 -0400
Return-Path: <>
Delivered-To: [LISTNAME]-bounces@[RIGHTDOMAIN.COM]
Received: (qmail 28252 invoked for bounce); 2 Jul 2008 14:46:34 -0400
Date: 2 Jul 2008 14:46:34 -0400
From: MAILER-DAEMON@[MAIL.RIGHTDOMAIN.COM]
To: [LISTNAME]-bounces@[RIGHTDOMAIN.COM]
Subject: failure notice
Errors-To: mailman-bounces@[WRONGDOMAIN.COM]

Hi. This is the qmail-send program at [MAIL.RIGHTDOMAIN.COM].
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

[BADEMAIL ADDRESS]:
[REMOTEIP] does not like recipient.
Remote host said: 550-5.1.1 The email account that you tried to reach does
not exist. Please
550-5.1.1 try double-checking the recipient's email address for typos
550-5.1.1 or unnecessary spaces. Learn more at
550 5.1.1 http://mail.google.com/support/bin/answer.py?answere96
23si5229629hsd.10
Giving up on [REMOTEIP].

--- Below this line is a copy of the message.

Return-Path: [LISTNAME]-bounces@[RIGHTDOMAIN.COM]
Received: (qmail 28243 invoked from network); 2 Jul 2008 14:46:34 -0400
Received: from localhost (HELO [MAIL.RIGHTDOMAIN.COM]) (127.0.0.1)
by localhost with SMTP; 2 Jul 2008 14:46:34 -0400
Return-Path: [SENDEREMAIL]
Delivered-To: [LISTNAME]@[RIGHTDOMAIN.COM]
Received: (qmail 28072 invoked from network); 2 Jul 2008 14:46:32 -0400
Received: [OMMITTED]
Received: [OMMITTED]
Message-ID: [OMMITTED]
Date: Wed, 02 Jul 2008 14:46:27 -0400
From: [OMMITTED]
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
To: [LISTNAME]@[RIGHTDOMAIN.COM]
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Subject: [members] whiter water trip update
X-BeenThere: [LISTNAME]@[RIGHTDOMAIN.COM]
X-Mailman-Version: 2.1.9
Precedence: list
Errors-To: [LISTNAME]-bounces@[RIGHTDOMAIN.COM]

[ORIGINAL MESSAGE]

------------------


In Service,

Michael Kabot
President - SOAR
Scouting Online
Affordable & Reliable
mkabot at soarol.com
585-388-0211

www.soarol.com

Search Discussions

  • Mark Sapiro at Jul 3, 2008 at 4:44 am
    Michael Kabotwrote:
    Configuration
    - CentOS 5 64 bit
    - Mailman 2.1.9
    - Qmail with Plesk 8.3 mods

    I have an interesting bounce issue occurring.
    - Email is sent to a Mailman List
    - List sends to each address
    - One of the addresses bounces
    - The bounce message ends with the right FROM and TO headers, but the wrong
    RETURN-PATH and ERRORS-TO headers.

    Is this a Mailman or Qmail issue?

    Here is the bounce message

    ------------------
    Return-Path: <mailman-bounces@[WRONGDOMAIN.COM]>
    Received: (qmail 28263 invoked from network); 2 Jul 2008 14:46:36 -0400
    Received: from localhost (HELO [MAIL.RIGHTDOMAIN.COM]) (127.0.0.1)
    by localhost with SMTP; 2 Jul 2008 14:46:36 -0400

    It looks like below here up to my next comment are the actual bounce
    notice headers with Return-Path: <> indicating a null envelope from
    which should be the case for a normal bounce.

    The headers above here look like Mailman received this bounce and
    resent it to a list owner. When sending to a list owner, Mailman sets
    the envelope from the site list (mailman) -bounces address. Is
    [WRONGDOMAIN.COM] the domain of the site list?

    Return-Path: <>
    Delivered-To: [LISTNAME]-bounces@[RIGHTDOMAIN.COM]
    Received: (qmail 28252 invoked for bounce); 2 Jul 2008 14:46:34 -0400
    Date: 2 Jul 2008 14:46:34 -0400
    From: MAILER-DAEMON@[MAIL.RIGHTDOMAIN.COM]
    To: [LISTNAME]-bounces@[RIGHTDOMAIN.COM]
    Subject: failure notice

    And the header below may have also been added by Mailman in resending.

    Errors-To: mailman-bounces@[WRONGDOMAIN.COM]

    Hi. This is the qmail-send program at [MAIL.RIGHTDOMAIN.COM].
    I'm afraid I wasn't able to deliver your message to the following addresses.
    This is a permanent error; I've given up. Sorry it didn't work out.

    [BADEMAIL ADDRESS]:
    [REMOTEIP] does not like recipient.
    Remote host said: 550-5.1.1 The email account that you tried to reach does
    not exist. Please
    550-5.1.1 try double-checking the recipient's email address for typos
    550-5.1.1 or unnecessary spaces. Learn more at
    550 5.1.1 http://mail.google.com/support/bin/answer.py?answere96
    23si5229629hsd.10
    Giving up on [REMOTEIP].

    --- Below this line is a copy of the message.

    Return-Path: [LISTNAME]-bounces@[RIGHTDOMAIN.COM]
    Received: (qmail 28243 invoked from network); 2 Jul 2008 14:46:34 -0400
    Received: from localhost (HELO [MAIL.RIGHTDOMAIN.COM]) (127.0.0.1)
    by localhost with SMTP; 2 Jul 2008 14:46:34 -0400
    Return-Path: [SENDEREMAIL]
    Delivered-To: [LISTNAME]@[RIGHTDOMAIN.COM]
    Received: (qmail 28072 invoked from network); 2 Jul 2008 14:46:32 -0400
    Received: [OMMITTED]
    Received: [OMMITTED]
    Message-ID: [OMMITTED]
    Date: Wed, 02 Jul 2008 14:46:27 -0400
    From: [OMMITTED]
    User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
    MIME-Version: 1.0
    To: [LISTNAME]@[RIGHTDOMAIN.COM]
    Content-Type: text/plain; charset=ISO-8859-1; format=flowed
    Content-Transfer-Encoding: 7bit
    Subject: [members] whiter water trip update
    X-BeenThere: [LISTNAME]@[RIGHTDOMAIN.COM]
    X-Mailman-Version: 2.1.9
    Precedence: list
    Errors-To: [LISTNAME]-bounces@[RIGHTDOMAIN.COM]

    [ORIGINAL MESSAGE]

    ------------------

    The thing that's strange in all the above is that Mailman (at least
    standard GNU Mailman) doesn't redirect bounces like this. It sends a
    totally new message to the list owner with the original bounce
    attached.

    Also, assuming [BADEMAIL ADDRESS]: in the notice was enclosed in <> as
    in <bad at example.com>:, it would not have been an unrecognized bounce
    in 2.1.9.

    Is this Mailman 2.1.9 installed from our distribution, or is it a Plesk
    or other package?

    --
    Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
    San Francisco Bay Area, California better use your sense - B. Dylan
  • Michael Kabot at Jul 3, 2008 at 2:43 pm
    Mark,

    My apologies, I should have noted that
    - I have Bounce Processing turned off
    - I have the -bounces address forwarding to the -owner address. With
    Bounce Processing off I still needed bounce messages to go back to the list
    owner
    /var/qmail/bin/preline /var/qmail/bin/mm_wrapper
    /usr/lib/mailman/mail/mailman
    owner [LISTNAME]

    -----Original Message-----
    From: Mark Sapiro [mailto:mark at msapiro.net]
    Sent: Thursday, July 03, 2008 12:45 AM
    To: mkabot at soarol.com; mailman-users at python.org
    Subject: Re: [Mailman-Users] Bounce Message, ReturnPath/ErrorsTo issue

    Michael Kabotwrote:
    Configuration
    - CentOS 5 64 bit
    - Mailman 2.1.9
    - Qmail with Plesk 8.3 mods

    I have an interesting bounce issue occurring.
    - Email is sent to a Mailman List
    - List sends to each address
    - One of the addresses bounces
    - The bounce message ends with the right FROM and TO headers, but the wrong
    RETURN-PATH and ERRORS-TO headers.

    Is this a Mailman or Qmail issue?

    Here is the bounce message

    ------------------
    Return-Path: <mailman-bounces@[WRONGDOMAIN.COM]>
    Received: (qmail 28263 invoked from network); 2 Jul 2008 14:46:36 - 0400
    Received: from localhost (HELO [MAIL.RIGHTDOMAIN.COM]) (127.0.0.1)
    by localhost with SMTP; 2 Jul 2008 14:46:36 -0400

    It looks like below here up to my next comment are the actual bounce
    notice headers with Return-Path: <> indicating a null envelope from
    which should be the case for a normal bounce.

    The headers above here look like Mailman received this bounce and
    resent it to a list owner. When sending to a list owner, Mailman sets
    the envelope from the site list (mailman) -bounces address. Is
    [WRONGDOMAIN.COM] the domain of the site list?
    Neither [RIGHTDOMAIN.COM] or [WRONGDOMAIN.COM] are the domain of the
    'mailman' site list. [WRONGDOMAIN.COM] is coincidentally the last
    add_virtualhost line of my config file.

    Where in the code are these being added to the -owner address?
    Return-Path: <>
    Delivered-To: [LISTNAME]-bounces@[RIGHTDOMAIN.COM]
    Received: (qmail 28252 invoked for bounce); 2 Jul 2008 14:46:34 -0400
    Date: 2 Jul 2008 14:46:34 -0400
    From: MAILER-DAEMON@[MAIL.RIGHTDOMAIN.COM]
    To: [LISTNAME]-bounces@[RIGHTDOMAIN.COM]
    Subject: failure notice

    And the header below may have also been added by Mailman in resending.

    Errors-To: mailman-bounces@[WRONGDOMAIN.COM]

    The thing that's strange in all the above is that Mailman (at least
    standard GNU Mailman) doesn't redirect bounces like this. It sends a
    totally new message to the list owner with the original bounce
    attached.

    Also, assuming [BADEMAIL ADDRESS]: in the notice was enclosed in <> as
    in <bad at example.com>:, it would not have been an unrecognized bounce
    in 2.1.9.

    Is this Mailman 2.1.9 installed from our distribution, or is it a Plesk
    or other package?
    I think the modification of -bounces to -owner and Bounce Processing turned
    off would explain the format above.



    In Service,

    Michael Kabot
    President - SOAR
    mkabot at soarol.com
  • Mark Sapiro at Jul 3, 2008 at 3:18 pm

    Michael Kabot wrote:
    My apologies, I should have noted that
    - I have Bounce Processing turned off
    - I have the -bounces address forwarding to the -owner address. With
    Bounce Processing off I still needed bounce messages to go back to the list
    owner
    /var/qmail/bin/preline /var/qmail/bin/mm_wrapper
    /usr/lib/mailman/mail/mailman
    owner [LISTNAME] <snip>
    Neither [RIGHTDOMAIN.COM] or [WRONGDOMAIN.COM] are the domain of the
    'mailman' site list. [WRONGDOMAIN.COM] is coincidentally the last
    add_virtualhost line of my config file.

    Where in the code are these being added to the -owner address?

    The scripts/owner script which receives mail addressed to -owner sets

    envsender=Utils.get_site_email(extra='bounces')

    (this is in Mailman/Utils.py). This in turn gets the domain part of the
    address in a complex way (see Utils.get_domain()), but in this case,
    it boils down to

    - get DEFAULT_URL_HOST
    - look up the corresponding email host in mm_cfg.VIRTUAL_HOSTS
    (the dictionary built by add_virtualhost())

    So it looks like you probably have more that one add_virtualhost()
    entry with the same url_host argument (either DEFAULT_URL_HOST or its
    literal value.

    This doesn't work. VIRTUAL_HOSTS is a Python dictionary (hash table)
    with key = the first add_virtualhost() argument and value = the second.

    So, if you have something equivalent to

    add_virtualhost('www.example.com', 'example.com')
    add_virtualhost('www.example.com', 'example.net')

    the second entry replaces the first.

    All url_hosts and all email hosts in

    add_virtualhost(url_host, email_host)

    lines need to be unique for it to work as intended.

    --
    Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
    San Francisco Bay Area, California better use your sense - B. Dylan
  • Michael Kabot at Jul 3, 2008 at 4:22 pm
    (To the list this time !)

    Mark,

    Thanks for the quick response and pointers to the right place in the code.

    I have left Plesk managing the Mailman lists to try to keep continuity on my
    server. It looks like Plesk is not doing a good job of properly configuring
    Mailman or the lists.

    The following is an excerpt from my mm_cfg.py

    from socket import *
    try:
    fqdn = getfqdn()
    except:
    fqdn = 'mm_cfg_has_unknown_host_domains'

    DEFAULT_URL_HOST = fqdn
    DEFAULT_EMAIL_HOST = fqdn

    add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)

    add_virtualhost('lists.[DOMAIN1.COM]')
    add_virtualhost('lists.[DOMAIN2.COM]')
    [ADDITIONAL LINES FOR EACH OF THE HUNDREDS OF DOMAINS I HOST]

    If there is no 2nd parameter to add_virtualhost, will it create one from the
    1st parameter? I checked, there are no duplicate add_virtualhost lines.

    It looks like getfqdn() is where the WRONGDOMAIN.COM is coming from.

    Either way, I would rather have a bounced bounce message go
    postmaster@[SERVER.COM] than a domain specific email address or the
    mailman-bounces address. Looks like I can "affect" that in the owner code
    given my Mailman configuration.

    Thank you for your assistance !

    Mike

    -----Original Message-----
    From: Mark Sapiro [mailto:mark at msapiro.net]
    Sent: Thursday, July 03, 2008 11:18 AM
    To: mkabot at soarol.com; mailman-users at python.org
    Subject: Re: [Mailman-Users] Bounce Message, ReturnPath/ErrorsTo issue

    Michael Kabot wrote:
    My apologies, I should have noted that
    - I have Bounce Processing turned off
    - I have the -bounces address forwarding to the -owner address. With
    Bounce Processing off I still needed bounce messages to go back to the list
    owner
    /var/qmail/bin/preline /var/qmail/bin/mm_wrapper
    /usr/lib/mailman/mail/mailman
    owner [LISTNAME] <snip>
    Neither [RIGHTDOMAIN.COM] or [WRONGDOMAIN.COM] are the domain of the
    'mailman' site list. [WRONGDOMAIN.COM] is coincidentally the last
    add_virtualhost line of my config file.

    Where in the code are these being added to the -owner address?

    The scripts/owner script which receives mail addressed to -owner sets

    envsender=Utils.get_site_email(extra='bounces')

    (this is in Mailman/Utils.py). This in turn gets the domain part of the
    address in a complex way (see Utils.get_domain()), but in this case,
    it boils down to

    - get DEFAULT_URL_HOST
    - look up the corresponding email host in mm_cfg.VIRTUAL_HOSTS
    (the dictionary built by add_virtualhost())

    So it looks like you probably have more that one add_virtualhost()
    entry with the same url_host argument (either DEFAULT_URL_HOST or its
    literal value.

    This doesn't work. VIRTUAL_HOSTS is a Python dictionary (hash table)
    with key = the first add_virtualhost() argument and value = the second.

    So, if you have something equivalent to

    add_virtualhost('www.example.com', 'example.com')
    add_virtualhost('www.example.com', 'example.net')

    the second entry replaces the first.

    All url_hosts and all email hosts in

    add_virtualhost(url_host, email_host)

    lines need to be unique for it to work as intended.

    --
    Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
    San Francisco Bay Area, California better use your sense - B. Dylan
  • Mark Sapiro at Jul 3, 2008 at 4:55 pm

    Michael Kabot wrote:
    I have left Plesk managing the Mailman lists to try to keep continuity on my
    server. It looks like Plesk is not doing a good job of properly configuring
    Mailman or the lists.

    The following is an excerpt from my mm_cfg.py

    from socket import *
    try:
    fqdn = getfqdn()
    except:
    fqdn = 'mm_cfg_has_unknown_host_domains'

    DEFAULT_URL_HOST = fqdn
    DEFAULT_EMAIL_HOST = fqdn

    add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)

    add_virtualhost('lists.[DOMAIN1.COM]')
    add_virtualhost('lists.[DOMAIN2.COM]')
    [ADDITIONAL LINES FOR EACH OF THE HUNDREDS OF DOMAINS I HOST]

    If there is no 2nd parameter to add_virtualhost, will it create one from the
    1st parameter?

    Yes. add_virtualhost('xxx.somedomain') is equivalent to
    add_virtualhost('xxx.somedomain', 'somedomain').

    It looks like getfqdn() is where the WRONGDOMAIN.COM is coming from.

    It looks that way. See <http://docs.python.org/lib/module-socket.html>.

    Either way, I would rather have a bounced bounce message go
    postmaster@[SERVER.COM] than a domain specific email address or the
    mailman-bounces address. Looks like I can "affect" that in the owner code
    given my Mailman configuration.

    You can set that in the scripts/owner script for messages sent directly
    to or via the -owner address. This will get some but not all owner
    notifications. To get the rest, you also have to look at
    Mailman/Message.py. In the definition of the OwnerNotification()
    class's __init__ method there is

    sender = Utils.get_site_email(mlist.host_name, 'bounces')

    which set's the sender similarly to the way the owner script does
    except it usees the list's host_name attribute as the domain of the
    mailman-bounces address.

    --
    Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
    San Francisco Bay Area, California better use your sense - B. Dylan
  • Michael Kabot at Jul 3, 2008 at 5:05 pm
    Mark,

    The modification to scripts/owner will do the trick for me.

    I have owner notifications turned off on all lists, so no need to modify
    Message.py.

    Thank again for the assistance.

    Mike
    -----Original Message-----
    From: Mark Sapiro [mailto:mark at msapiro.net]
    Sent: Thursday, July 03, 2008 12:56 PM
    To: mkabot at soarol.com; mailman-users at python.org
    Subject: Re: [Mailman-Users] Bounce Message, ReturnPath/ErrorsTo issue

    Michael Kabot wrote:
    I have left Plesk managing the Mailman lists to try to keep continuity on my
    server. It looks like Plesk is not doing a good job of properly
    configuring
    Mailman or the lists.

    The following is an excerpt from my mm_cfg.py

    from socket import *
    try:
    fqdn = getfqdn()
    except:
    fqdn = 'mm_cfg_has_unknown_host_domains'

    DEFAULT_URL_HOST = fqdn
    DEFAULT_EMAIL_HOST = fqdn

    add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)

    add_virtualhost('lists.[DOMAIN1.COM]')
    add_virtualhost('lists.[DOMAIN2.COM]')
    [ADDITIONAL LINES FOR EACH OF THE HUNDREDS OF DOMAINS I HOST]

    If there is no 2nd parameter to add_virtualhost, will it create one from the
    1st parameter?

    Yes. add_virtualhost('xxx.somedomain') is equivalent to
    add_virtualhost('xxx.somedomain', 'somedomain').

    It looks like getfqdn() is where the WRONGDOMAIN.COM is coming from.

    It looks that way. See <http://docs.python.org/lib/module-socket.html>.

    Either way, I would rather have a bounced bounce message go
    postmaster@[SERVER.COM] than a domain specific email address or the
    mailman-bounces address. Looks like I can "affect" that in the owner code
    given my Mailman configuration.

    You can set that in the scripts/owner script for messages sent directly
    to or via the -owner address. This will get some but not all owner
    notifications. To get the rest, you also have to look at
    Mailman/Message.py. In the definition of the OwnerNotification()
    class's __init__ method there is

    sender = Utils.get_site_email(mlist.host_name, 'bounces')

    which set's the sender similarly to the way the owner script does
    except it usees the list's host_name attribute as the domain of the
    mailman-bounces address.

    --
    Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
    San Francisco Bay Area, California better use your sense - B. Dylan

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmailman-users @
categoriespython
postedJul 3, '08 at 3:53a
activeJul 3, '08 at 5:05p
posts7
users2
websitelist.org

2 users in discussion

Michael Kabot: 4 posts Mark Sapiro: 3 posts

People

Translate

site design / logo © 2022 Grokbase