Virtual alias + shell
Hello, I want to have a mailman configured together with virtual alias. To do that I need to use alias_domain. I have tried to do it with mailman shell. The domain seams to be created but when I leave the shell and enter again, the domain is not longer there.
On the other hand, If I create a domain in administrator interface, it is not listed in the shell. If I create in the web interface, which field correspond to the alias_domain : Domain Name, Display Name , Mail domain?
The code I use in the shell is:
mailman shell
from mailman.interfaces.domain import IDomainManager from zope.component import getUtility manager = getUtility(IDomainManager) from operator import attrgetter def show_domains(*, with_owners=False): if len(manager) == 0: print('no domains') return for domain in sorted(manager, key=attrgetter('mail_host')): print(domain) owners = sorted(owner.addresses[0].email for owner in domain.owners) for owner in owners: print('- owner:', owner)
manager.add('example.edu',alias_domain='x.example.edu') show_domains(with_owners=True) exit()
Thanks in advance
Albert
On 5/26/23 4:36 AM, alopez@ac.upc.edu wrote:
Hello, I want to have a mailman configured together with virtual alias. To do that I need to use alias_domain. I have tried to do it with mailman shell. The domain seams to be created but when I leave the shell and enter again, the domain is not longer there.
Because you are leaving mailman shell with exit() which doesn't commit
changes. You deed to either explicitly commit with commit()
or exit
with control-D. Recent mailman shell will report in its banner
Welcome to the GNU Mailman shell Use commit() to commit changes. Use abort() to discard changes since the last commit. Exit with ctrl+D does an implicit commit() but exit() does not.
On the other hand, If I create a domain in administrator interface, it is not listed in the shell. If I create in the web interface, which field correspond to the alias_domain : Domain Name, Display Name , Mail domain?
Your Postorius is too old to support alias_domain, and your Mailman core may be too - requires core >= 3.2.0.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Thanks Mark for your fast reply :-). I have been able to create the domains with the domain alias . My mailman core is version 3.3 Now I have created the mailing list with 'mailman create' but I get this error:
postmap: warning: /etc/postfix/main.cf, line 65: overriding earlier entry: virtual_alias_maps=hash:/etc/postfix/virtual_alias/example.edu, hash:/etc/postfix/virtual_alias/example.org
in my postfix file I have the following code:
virtual_alias_maps = hash:/etc/postfix/virtual_alias/example.edu, hash:/etc/postfix/virtual_alias/example.org, hash:/var/lib/mailman3/data/postfix_vmap
Should I remove hash:/etc/postfix/virtual_alias/example.edu, and hash:/etc/postfix/virtual_alias/example.org, ? In that case how I create alias not related to mailman?
Thanks in advance.
Albert
On 5/26/23 9:51 AM, alopez@ac.upc.edu wrote:
Now I have created the mailing list with 'mailman create' but I get this error:
postmap: warning: /etc/postfix/main.cf, line 65: overriding earlier entry: virtual_alias_maps=hash:/etc/postfix/virtual_alias/example.edu, hash:/etc/postfix/virtual_alias/example.org
in my postfix file I have the following code:
virtual_alias_maps = hash:/etc/postfix/virtual_alias/example.edu, hash:/etc/postfix/virtual_alias/example.org, hash:/var/lib/mailman3/data/postfix_vmap
Should I remove hash:/etc/postfix/virtual_alias/example.edu, and hash:/etc/postfix/virtual_alias/example.org, ? In that case how I create alias not related to mailman?
Without seeing the contents of those files, I can't say, but something in /var/lib/mailman3/data/postfix_vmap is conflicting with and overriding something in the other two files. Since the only things in /var/lib/mailman3/data/postfix_vmap are specific list addresses, they are probably what you want, and you could just ignore the warning, but you probably do want to examine and remove conflicts from the other two files.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
alopez@ac.upc.edu
-
Mark Sapiro