FAQ
I'm a newbie to Mailman. I've read through the archives and seen many posts
around this topic. None of the threads seem to fit my problem. The solution
may be there, but perhaps I just can't see it. I apologize if it is.



Here's my problem with details changed to keep it generic:



- I have a server at www.domain.com <http://www.domain.com/> and host a
list with address list1 at domain.com.

- I have configured a subdomain for a customer at www.subdomain.domain.com
<http://www.subdomain.domain.com/> and host a list for that customer with
address list2 at subdomain.domain.com.

- I configured a Mailman virtual host per all the instructions and advice.
It works great with one exception.

- The "To:" field in all mail forwarded by Mailman from subdomain.domain.com
appears as list2 at domain.com. <--notice the "subdomain" has been omitted.

- Upon closer inspection of the email headers, it appears the subdomain is
also omitted from the "Return-Path:", "Sender:", and "Errors-To:" fields as
well.



I've tweaked the log messages generated by SMTPDirect to also log the "To"
field and see that the subdomain is omitted in the log message as well.



I'm using Mailman 2.1.9.



Can anyone help me with this problem??



Thanks

David Buntin

Search Discussions

  • Mark Sapiro at Aug 20, 2007 at 11:45 pm

    David Buntin wrote:
    Here's my problem with details changed to keep it generic:



    - I have a server at www.domain.com <http://www.domain.com/> and host a
    list with address list1 at domain.com.

    - I have configured a subdomain for a customer at www.subdomain.domain.com
    <http://www.subdomain.domain.com/> and host a list for that customer with
    address list2 at subdomain.domain.com.

    - I configured a Mailman virtual host per all the instructions and advice.
    It works great with one exception.

    - The "To:" field in all mail forwarded by Mailman from subdomain.domain.com
    appears as list2 at domain.com. <--notice the "subdomain" has been omitted.

    - Upon closer inspection of the email headers, it appears the subdomain is
    also omitted from the "Return-Path:", "Sender:", and "Errors-To:" fields as
    well.

    Run the following command in Mailman's directory:

    bin/withlist -l -r fix_url list2 -u www.subdomain.domain.com

    If that doesn't fix it, report the contents of mm_cfg.py and the
    settings for DEFAULT_URL_HOST and DEFAULT_EMAIL_HOST from Defaults.py.

    --
    Mark Sapiro <msapiro at value.net> The highway is for gamblers,
    San Francisco Bay Area, California better use your sense - B. Dylan
  • David Buntin at Aug 21, 2007 at 3:48 am
    Mark,

    Thanks for your offer to help.

    For what it's worth, I created the lists after creating the subdomain and
    virtual host. I created the lists with newlist and the appropriate --urlhost
    and --email host options.

    To be safe I tried running the fix_url script as you suggested with the same
    results (no change.)

    The contents of my mm_cfg.py are:

    from Defaults import *
    SMTPHOST='domain.com'
    add_virtualhost('www.subdomain.domain.com','subdomain.domain.com')
    SMTP_LOG_EVERY_MESSAGE = ('smtp','%(msg_message-id)s smtp to %(listname)s
    or %(#recips)d recips, completed in %(time).3f seconds. To=%(msg_to)s Return
    Path=%(msg_return-path)s Sender=%(msg_sender)s Errors To=%(msg_errors-to)s')


    The contents of Default.py that you requested are:

    DEFAULT_EMAIL_HOST = 'domain.com'
    DEFAULT_URL_HOST = 'domain.com'


    Thanks again for your help,
    David

    -----Original Message-----
    From: Mark Sapiro [mailto:msapiro at value.net]
    Sent: Monday, August 20, 2007 6:46 PM
    To: David Buntin; Mailman-Users at python.org
    Subject: Re: [Mailman-Users] virtual host problem - mail not originating
    fromsubdomain

    David Buntin wrote:
    Here's my problem with details changed to keep it generic:



    - I have a server at www.domain.com <http://www.domain.com/> and host a
    list with address list1 at domain.com.

    - I have configured a subdomain for a customer at www.subdomain.domain.com
    <http://www.subdomain.domain.com/> and host a list for that customer with
    address list2 at subdomain.domain.com.

    - I configured a Mailman virtual host per all the instructions and advice.
    It works great with one exception.

    - The "To:" field in all mail forwarded by Mailman from
    subdomain.domain.com
    appears as list2 at domain.com. <--notice the "subdomain" has been omitted.

    - Upon closer inspection of the email headers, it appears the subdomain is
    also omitted from the "Return-Path:", "Sender:", and "Errors-To:" fields as
    well.

    Run the following command in Mailman's directory:

    bin/withlist -l -r fix_url list2 -u www.subdomain.domain.com

    If that doesn't fix it, report the contents of mm_cfg.py and the
    settings for DEFAULT_URL_HOST and DEFAULT_EMAIL_HOST from Defaults.py.

    --
    Mark Sapiro <msapiro at value.net> The highway is for gamblers,
    San Francisco Bay Area, California better use your sense - B. Dylan
  • Mark Sapiro at Aug 21, 2007 at 4:21 am

    David Buntin wrote:
    For what it's worth, I created the lists after creating the subdomain and
    virtual host. I created the lists with newlist and the appropriate --urlhost
    and --email host options.

    Good.

    To be safe I tried running the fix_url script as you suggested with the same
    results (no change.)

    That's what I would have expected given that you created the list
    appropriately in the first place.

    The contents of my mm_cfg.py are:

    from Defaults import *
    SMTPHOST='domain.com'
    add_virtualhost('www.subdomain.domain.com','subdomain.domain.com')

    This is good.

    SMTP_LOG_EVERY_MESSAGE = ('smtp','%(msg_message-id)s smtp to %(listname)s
    or %(#recips)d recips, completed in %(time).3f seconds. To=%(msg_to)s Return
    Path=%(msg_return-path)s Sender=%(msg_sender)s Errors To=%(msg_errors-to)s')

    Here it makes a difference if you are using VERP like delivery or not.
    With VERP, msg_return-path, msg_sender and msg_errors-to will be as in
    the incoming message. Without VERP, msg_sender and msg_errors-to will
    be as set by Mailman for the outgoing message. See the 'MAS' comment
    about 30 lines into SMTPDirect.process() for why.

    The contents of Default.py that you requested are:

    DEFAULT_EMAIL_HOST = 'domain.com'
    DEFAULT_URL_HOST = 'domain.com'

    Good.

    It works great with one exception.

    - The "To:" field in all mail forwarded by Mailman from
    subdomain.domain.com
    appears as list2 at domain.com. <--notice the "subdomain" has been omitted.

    - Upon closer inspection of the email headers, it appears the subdomain is
    also omitted from the "Return-Path:", "Sender:", and "Errors-To:" fields as
    well.

    I don't think the problem is in Mailman. I think your incoming MTA is
    rewriting these headers in the inbound message. FAQ 6.22
    <http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq06.022.htp>,
    although written with outgoing messages in mind, may provide some
    insight to this.

    --
    Mark Sapiro <msapiro at value.net> The highway is for gamblers,
    San Francisco Bay Area, California better use your sense - B. Dylan
  • Mark Sapiro at Aug 21, 2007 at 4:30 am

    Mark Sapiro wrote:
    I don't think the problem is in Mailman. I think your incoming MTA is
    rewriting these headers in the inbound message.

    Or maybe the MTA sending to Mailman is doing the rewriting.

    FAQ 6.22
    <http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq06.022.htp>,
    although written with outgoing messages in mind, may provide some
    insight to this.

    The bottom line is in DNS, subdomain.domain.com must not have a CNAME.
    It must have an A record or an MX record with the name of a domain
    with an A record.

    --
    Mark Sapiro <msapiro at value.net> The highway is for gamblers,
    San Francisco Bay Area, California better use your sense - B. Dylan
  • David Buntin at Aug 21, 2007 at 4:43 am
    Thanks.

    This is what I've come to suspect as well (that the incoming MTA is doing
    the rewriting.) With SMTPDirect.py it is easy to log the output of Mailman.
    Is there an equivalent way to log the input before any processing of the
    incoming mail has been performed?

    I'm using sendmail as my MTA. I know this is beyond Mailman, but do you know
    if there is an easy way to get sendmail to log its output to Mailman??

    I am using a CNAME DNS alias for subdomain.domain.com. I've tried using a MX
    record without luck. I'll try again and take it up the issues with my server
    host.

    Thanks again for your help,
    David


    -----Original Message-----
    From: Mark Sapiro [mailto:msapiro at value.net]
    Sent: Monday, August 20, 2007 11:31 PM
    To: David Buntin; Mailman-Users at python.org
    Subject: Re: [Mailman-Users] virtual host problem - mail not
    originatingfromsubdomain

    Mark Sapiro wrote:
    I don't think the problem is in Mailman. I think your incoming MTA is
    rewriting these headers in the inbound message.

    Or maybe the MTA sending to Mailman is doing the rewriting.

    FAQ 6.22
    <http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq06.022.htp>,
    although written with outgoing messages in mind, may provide some
    insight to this.

    The bottom line is in DNS, subdomain.domain.com must not have a CNAME.
    It must have an A record or an MX record with the name of a domain
    with an A record.

    --
    Mark Sapiro <msapiro at value.net> The highway is for gamblers,
    San Francisco Bay Area, California better use your sense - B. Dylan
  • Brad Knowles at Aug 21, 2007 at 5:25 am

    On 8/20/07, David Buntin wrote:

    This is what I've come to suspect as well (that the incoming MTA is doing
    the rewriting.) With SMTPDirect.py it is easy to log the output of Mailman.
    Is there an equivalent way to log the input before any processing of the
    incoming mail has been performed?
    Mailman logs pretty much everything it knows how to log. There
    aren't any "debug" modes you can turn on to increase the logging.

    If you want to add more code to increase the logging, that would
    work, but then you'd need to have full privileged access to the
    server where Mailman is running, and you'd need to have at least some
    minimal idea of how to add new Python code to a program.
    I'm using sendmail as my MTA. I know this is beyond Mailman, but do you know
    if there is an easy way to get sendmail to log its output to Mailman??
    With sendmail, you can turn up or down the logging detail in
    excruciatingly fine increments. If you turn it up high enough, you
    should be able to get it to log the full contents of every message it
    handles.

    Alternatively, you could have sendmail send the message to something
    like "tee" so that the full contents of the message(s) can be saved
    to a file somewhere, prior to their being handed to Mailman.
    I am using a CNAME DNS alias for subdomain.domain.com. I've tried using a MX
    record without luck. I'll try again and take it up the issues with my server
    host.
    Use an A record. Even if it is exactly the same A record you use for
    other machines. It will work. Trust me.

    --
    Brad Knowles <brad at shub-internet.org>, Consultant & Author
    LinkedIn Profile: <http://tinyurl.com/y8kpxu>
    Slides from Invited Talks: <http://tinyurl.com/tj6q4>

    09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
  • David Buntin at Aug 21, 2007 at 8:01 pm

    Alternatively, you could have sendmail send the message to something
    like "tee" so that the full contents of the message(s) can be saved
    to a file somewhere, prior to their being handed to Mailman.
    OK. I modified my aliases file to pipe email to tee before it goes to
    Mailman. (The line in the aliases file reads: mailman: "|tee /tmp/email-log
    /home/user/mailman/mail/mailman post list2") This works great and confirms
    our suspicion. The log clearly reveals that the "To" field in the email is
    replaced before it is delivered to Mailman. With a little more
    investigation, I found that a neighboring MTA is replacing the "To" field
    before it even gets to my server. As the mail RFCs require, the MTA is
    expanding the CNAME alias subdomain.domain.com with the MX record of
    domain.com. Mailman allows this "To" field with the missing subdomain to
    pass through unmodified and forwards it to the mailing list. This gives the
    appearance that Mailman is omitting the subdomain from the "To" field.
    Use an A record. Even if it is exactly the same A record you use for
    other machines. It will work. Trust me.
    I deleted the DNS CNAME record and created a DNS A record for
    subdomain.domain.com with a parameter equal to the IP address of my server
    (the same address as domain.com.) This did not work at first. I found that
    all email to subdomain.domain.com was rejected by my incoming MTA (sendmail)
    with an error "config error: mail loops back to me (MX problem?) 554 5.3.5
    Local configuration error"

    This was the result of a sendmail configuration error. Sendmail was not
    aware that it should service mail addressed to subdomain.domain.com. Now
    that the CNAME record was gone and the neighboring MTA wasn't replacing
    subdomain.domain.com with domain.com, sendmail on my server was no longer
    able to receive mail originally sent to subdomain.domain.com.

    To solve the problem, I made a change to my /etc/mail/sendmail.cw and added
    subdomain.domain.com to the list. This change made sendmail accept email to
    subdomain.domain.com. (This is the solution for my server running sendmail
    on Red Hat Enterprise 2. I'm sure there is a similar setting for other
    MTAs.)

    Now it all works well.

    Sorry for the long explanation. I wanted the resolution to be documented for
    any others who may find and read this in the archives.

    Mark/Brad, thank you for your dedication and willingness to help out the
    inexperienced. I very much appreciate your efforts.

    David Buntin

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmailman-users @
categoriespython
postedAug 20, '07 at 10:21p
activeAug 21, '07 at 8:01p
posts8
users3
websitelist.org

People

Translate

site design / logo © 2022 Grokbase