On 12/25/19 1:53 PM, work@andrefincato.info wrote:
question: i tried to add the
alias_domain
to mailman using Mailman Core REST APIs because I read about https://mailman.readthedocs.io/en/latest/src/mailman/docs/mta.html#unusual-p... ; entering the mailman console and doingdump_json('http://localhost:9001/3.0/domains/example.com/lists')
was giving me error thatdump_json
is not an available module.is that the way to go? should I add a an
alias_domain
to Mailman in order for it to output apostfix_vmap
when doingmailman aliases
? and then add it to postfixmain.cf
like sovirtual_alias_maps = hash:/etc/postfix/valias, regexp:/opt/mailman/var/data//postfix_vmap
I think the above should work for you. As far as dump_json
is not an
available module goes, the docs reference a lot of helper functions that
are described at
<https://mailman.readthedocs.io/en/latest/build/lib/mailman/docs/documentation.html>.
These need to be imported. I.e., for dump_json
from mailman.testing.documentation import dump_json
But, if you are just trying to set an alias_domain for the domain and you have Postorius, you can do that via Postorius.
If not Postorius you can use mailman shell
, For example
$ mailman shell
Welcome to the GNU Mailman shell
>>> dm = getUtility(IDomainManager)
>>> d = dm.get('example.com')
>>> d.alias_domain = 'x.example.com'
>>>
Then you need to do mailman aliases
to create/update the maps.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan