I've been running mailman on an old Ubuntu server that will become defunct in a couple of weeks. Besides of having a new cloud based server (with Ubuntu 20.04.1 LTS), I also need to switch from Sendmail to Postfix.
Now, setting up Postfix was not too big a problem, but getting it to work with mailman has been challenging. Particularly, genaliases gives me a traceback like this:
root@ardbeg:~# /var/lib/mailman/bin/genaliases Traceback (most recent call last): File "/var/lib/mailman/bin/genaliases", line 124, in <module> main() File "/var/lib/mailman/bin/genaliases", line 118, in main MTA.create(None, quiet=True) File "/var/lib/mailman/Mailman/MTA/Postfix.py", line 336, in create _do_create(mlist, ALIASFILE, _addlist) File "/var/lib/mailman/Mailman/MTA/Postfix.py", line 320, in _do_create func(mlist, fp) File "/var/lib/mailman/Mailman/MTA/Postfix.py", line 113, in _addlist loopaddr = Utils.ParseEmail(Utils.get_site_email(extra='loop'))[0] File "/var/lib/mailman/Mailman/Utils.py", line 799, in get_site_email hostname = mm_cfg.VIRTUAL_HOSTS.get(get_domain(), get_domain()) File "/var/lib/mailman/Mailman/Utils.py", line 794, in get_domain return hostname.lower() AttributeError: 'NoneType' object has no attribute 'lower'
I'm getting no alias files in the /var/lib/mailman/data/ directory, and my list addresses are not working:
<"|/var/lib/mailman/mail/mailman post test-list"@ardbeg.xxxxxx.net> (expanded from test-list@ardbeg.xxxxxx.net): unknown user: "|/var/lib/mailman/mail/mailman post test-list"
I've spent quite some time checking what might be wrong with my Postfix configuration, and trying to search for previous, similar sounding cases, but I've reached the point of feeling quite clueless. Any help would be really appreciated.
- Eva Isaksson eisaksso@gmail.com
Eva Isaksson writes:
Now, setting up Postfix was not too big a problem, but getting it to work with mailman has been challenging. Particularly, genaliases gives me a traceback like this:
[traceback trimmed]
File "/var/lib/mailman/Mailman/Utils.py", line 799, in get_site_email hostname = mm_cfg.VIRTUAL_HOSTS.get(get_domain(), get_domain()) File "/var/lib/mailman/Mailman/Utils.py", line 794, in get_domain return hostname.lower() AttributeError: 'NoneType' object has no attribute 'lower'
get_domain is returning None, which means that the OS environment variables HTTP_HOST and SERVER_NAME are not set (this is normal) and DEFAULT_URL and DEFAULT_URL_HOST (set in mm_cfg.py) are also None. DEFAULT_URL is obsolete and normally is None, DEFAULT_URL_HOST should be a string (enclosed in quotes), and defaults to 'localhost'. You should check what these variables are in mm_cfg.py, and if neither is present in mm_cfg.py, what they are in Defaults.py (you should never edit Defaults.py because it will get overwritten on upgrade).
I'm getting no alias files in the /var/lib/mailman/data/ directory, and my list addresses are not working:
<"|/var/lib/mailman/mail/mailman post test-list"@ardbeg.xxxxxx.net> (expanded from test-list@ardbeg.xxxxxx.net): unknown user: "|/var/lib/mailman/mail/mailman post test-list"
I'm not very familiar with Postfix configuration (Exim user), but pretty clearly the aliases are getting written somehow.
The alias apparently contains quotation marks, but it should not. I don't know whether some program is generating them that way, or if you put them in.
It's perfectly acceptable to us for you to post your Postfix configuration files and mm_cfg.py, but you may consider some of the information (including but not limited to domain names and list names) sensitive. If so, you should redact sensitive information by substituting fake names, or if necessary, Mark and I accept private mail. (The technical conversation will continue on list; private mail is just a way to keep private information out of the public archives.)
Regards, Steve
Thanks - part of my problem was fixed:
DEFAULT_URL and DEFAULT_URL_HOST (set in mm_cfg.py) are also None.
Setting DEFAULT_URL_HOST seems to have solved the genaliases part of my problems, as I can now run the command and it generates the files it should.
However, mailman aliases are still user unknown with <"|/var/lib/mailman/mail/mailman post test-list"@ardbeg.xxxxxx.net>
The alias apparently contains quotation marks, but it should not. I don't know whether some program is generating them that way, or if you put them in.
Those are defined in the usual way as:
## test-list mailing list test-list: "|/var/lib/mailman/mail/mailman post test-list"
(etc.)
so I think some program is generating them, but which one?
- Eva
ma 7. jouluk. 2020 klo 16.44 Stephen J. Turnbull ( turnbull.stephen.fw@u.tsukuba.ac.jp) kirjoitti:
Eva Isaksson writes:
Now, setting up Postfix was not too big a problem, but getting it to work with mailman has been challenging. Particularly, genaliases gives me a traceback like this:
[traceback trimmed]
File "/var/lib/mailman/Mailman/Utils.py", line 799, in get_site_email hostname = mm_cfg.VIRTUAL_HOSTS.get(get_domain(), get_domain()) File "/var/lib/mailman/Mailman/Utils.py", line 794, in get_domain return hostname.lower() AttributeError: 'NoneType' object has no attribute 'lower'
get_domain is returning None, which means that the OS environment variables HTTP_HOST and SERVER_NAME are not set (this is normal) and DEFAULT_URL and DEFAULT_URL_HOST (set in mm_cfg.py) are also None. DEFAULT_URL is obsolete and normally is None, DEFAULT_URL_HOST should be a string (enclosed in quotes), and defaults to 'localhost'. You should check what these variables are in mm_cfg.py, and if neither is present in mm_cfg.py, what they are in Defaults.py (you should never edit Defaults.py because it will get overwritten on upgrade).
I'm getting no alias files in the /var/lib/mailman/data/ directory, and my list addresses are not working:
<"|/var/lib/mailman/mail/mailman post test-list"@ardbeg.xxxxxx.net> (expanded from test-list@ardbeg.xxxxxx.net): unknown user: "|/var/lib/mailman/mail/mailman post test-list"
I'm not very familiar with Postfix configuration (Exim user), but pretty clearly the aliases are getting written somehow.
The alias apparently contains quotation marks, but it should not. I don't know whether some program is generating them that way, or if you put them in.
It's perfectly acceptable to us for you to post your Postfix configuration files and mm_cfg.py, but you may consider some of the information (including but not limited to domain names and list names) sensitive. If so, you should redact sensitive information by substituting fake names, or if necessary, Mark and I accept private mail. (The technical conversation will continue on list; private mail is just a way to keep private information out of the public archives.)
Regards, Steve
On 12/7/20 10:41 AM, Eva Isaksson wrote:
However, mailman aliases are still user unknown with <"|/var/lib/mailman/mail/mailman post test-list"@ardbeg.xxxxxx.net>
The alias apparently contains quotation marks, but it should not. I don't know whether some program is generating them that way, or if you put them in.
Those are defined in the usual way as:
## test-list mailing list test-list: "|/var/lib/mailman/mail/mailman post test-list"
(etc.)
so I think some program is generating them, but which one?
Postfix. In order for us to help further, please post the full mail.log
entry for the bounce and the output of postconf -n
-- Mark Sapiro mark@msapiro.net The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (3)
-
Eva Isaksson
-
Mark Sapiro
-
Stephen J. Turnbull