host_name tag doesn't allow IP addresses

Bug #266271 reported by Doolyo
2
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
Medium
Unassigned

Bug Description

Hello.

I have realised that we cannot put an IP address in
the 'host_name' tag. Normally, we can send an e-mail
from a client to a server that doesn't have a domain
name by just putting it's IP address into square
brackets like this:
john@[142.56.2.72]
This works, especially if you have put the same IP
address on the destination server in your /etc/mail/local-
host-names file on one line (for Sendmail):
[142.56.2.72]

Now the problem is that if we specify the IP address
into square brackets in the 'host_name' tag, then the
resolved hostname is returned in the e-mail address
instead of this square brackets IP address.
I have tried several backslashes like '', [], "", %5B and %
5D but nothing does.

Square brackets are still correct to the standard, so I
think that this is a bug.

Regards,
Daniel

[http://sourceforge.net/tracker/index.php?func=detail&aid=1268939&group_id=103&atid=100103]

Revision history for this message
Mark Sapiro (msapiro) wrote :

Can you be more specific?

I have tested both Mailman 2.1.5 and 2.1.6 and they accept a
host_name of the form [142.56.2.72] on the General Options
page with no problem.

Is your issue that you can't get General Options to accept a
numeric IP in square brackets, or that it is accepted, but
it gets 'changed' somewhere else. Please clarify, and if the
latter, please be specific about where you observe the 'change'.

Revision history for this message
Doolyo (doolyo) wrote :

The 'host_name' tag I am speaking about is in
the /etc/mailman/*.cfg file (or /var/lib/mailman/data/*.cfg).
I can make the host_name accept the squared brackets IP
address without any problem. It stays there and it is properly
placed in the file, it is not changed.

However, when I send an e-mail to the list itself, then the e-
mail is indicated to come from 'myhost.mydomain.com'
instead of keeping '[142.56.2.72]'.
That is my problem, because I would like people to be able to
answer to this IP address instead of the host name, as this
host name is not yet active due to the fact that I am
configuring Mailman and testing it. Once it passes my tests,
then the domain will be active, but I need this 'from' header
containing this exact same '[142.56.2.72]' string
than 'host_name' for the system to receive back the e-mails.

Kind regards,
Daniel

Revision history for this message
Mark Sapiro (msapiro) wrote :

What version of mailman is this? Installed from source or
from rpm or other package?

In the standard installation the only .cfg file is
data/sitelist.cfg. This is provided as an aid to configuring
the site list (mailman list) because the normal site
defaults for a new list are probably not appropriate for the
site list. This file, sitelist.cfg, is intended to be used
as input to bin/config_list to actually configure the list.
Mailman itself in operation doesn't get anything from any
*.cfg file. Actual list configurations are in
lists/*/config.pck.

So, are you just putting something in some *.cfg file and
that's it, or do you or some other custom process in your
installation actually run bin/config_list or equivalent to
transfer that information the the actual list configuration?

If in fact, you have updated the list configuration such
that the value of host_name visible on the list's General
Options in the web admin interface or visible in the output
from 'bin/config_list -o' or in the output from 'bin/dumpdb
lists/list_name/config.pck' is the bracketed numeric IP
address, and you still have the problem of it being changed,
then I think it must be your outgoing MTA that is changing
it, not Mailman. As far as I can tell, Mailman always uses
the list's host_name attribute as the domain for email
addresses. The only exception is for the site list in some
cases where the email domain is obtained from the
VIRTUAL_HOSTS dictionary which is built by add_virtualhost()
directives in Defaults.py/mm_cfg.py.

If you have not actually changed the list's host_name
attribute because you've only changed some .cfg file and
nothing more, then you need to actually update the list.

Revision history for this message
Doolyo (doolyo) wrote :

The version of Mailman is mailman-2.1.5-33.
It is installed from an RPM for RHEL4 (centOS4).
The configuration file is the correct one and is properly done
through the web interface.
I don't think that it is the MTA which causes problems
because it works well when I use it directly like this: 'mail
john@[142.56.2.72]'.

Therefore I still think that this could be a bug. Could someone
try that on another setup ?

Regards,
Daniel

Revision history for this message
Doolyo (doolyo) wrote :

Hello, msapiro.

Thanks for that test.
I don't know then what happened at that time on my box, but
when I was sending something to a box configured like that
with this address in brackets it was not received or
processed. Now that you successfully tested it ony our side
then my assumption that there was a problem by interpreting
the brackets is gone.
Maybe there was still a problem with the MTA for incoming
mails but it's difficult to say. I don't have anymore that setup
now as it's several months I have tested this, so I cannot
reproduce this currently.
Therefore I think that you can close this report.

Thanks for your try.
Best regards,
Daniel

Revision history for this message
Mark Sapiro (msapiro) wrote :

Testing confirms that Mailman will accept and us a literal
IP address as host_name for a list. This report is closed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.