[Mailman-Users] genaliases not generating aliases

2020-12-07 Thread Eva Isaksson
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 
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.xx.net>
(expanded
from ): 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

--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
https://mail.python.org/archives/list/mailman-users@python.org/


[Mailman-Users] Re: Using Mailgun with Mailman

2020-12-07 Thread Stephen J. Turnbull
Mark Sapiro writes:

 > Mailman's bounce processing relies on the envelope sender being the
 > LISTNAME-bounces address (possibly VERPed. If MailGun does bounce
 > processing, it presumably sends the mail with its own envelope sender
 > which would preclude Mailman's bounce processing

I agree with Mark about the "presumably".  However, it's *possible*
that Mailgun allows you to set it to something different so you can do
your own processing.  You'd have to check Mailgun docs or ask Mailgun
about that.  Given the nature of Mailgun's business, if they do have
such a capability I would not be surprised if it's poorly advertised.
Most customers are gong to expect Mailgun to do that for them, I think.

Steve
--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
https://mail.python.org/archives/list/mailman-users@python.org/


[Mailman-Users] genaliases not generating aliases

2020-12-07 Thread Stephen J. Turnbull
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.xx.net>
 > (expanded
 > from ): 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
--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
https://mail.python.org/archives/list/mailman-users@python.org/


[Mailman-Users] Re: Using Mailgun with Mailman

2020-12-07 Thread Jonathan M

> On 7 Dec 2020, at 14:44, Stephen J. Turnbull 
>  wrote:
> 
> However, it's *possible*
> that Mailgun allows you to set it to something different so you can do
> your own processing.  You'd have to check Mailgun docs or ask Mailgun
> about that.


I’ve asked and will report back.

Mailgun does have webhooks including “permanent_fail”: 
https://documentation.mailgun.com/en/latest/api-webhooks.html#webhooks

More generally, does anyone in the Mailman world have an opinion on Mailgun and 
similar services? 

Thank you 

Jonathan 


--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
https://mail.python.org/archives/list/mailman-users@python.org/


[Mailman-Users] Re: genaliases not generating aliases

2020-12-07 Thread Eva Isaksson
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.xx.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...@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.xx.net>
>  > (expanded
>  > from ): 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
>
--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
https://mail.python.org/archives/list/mailman-users@python.org/


[Mailman-Users] Re: genaliases not generating aliases

2020-12-07 Thread Mark Sapiro
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.xx.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 The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan
--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
https://mail.python.org/archives/list/mailman-users@python.org/