modoboa/modoboa-postfix-autoreply

the postfix_map command should be run has a standard management command

gawel opened this issue · 1 comments

gawel commented

No need to generate postfix_maps from the modoboa-admin script.
If you use a standard command, you can get the app context and avoid passing the --db-url parameters.
You'll also be able to use the orm to generate maps (and avoid typo and other stupid bugs)

For instance, this will generate the correct query for the autoreply plugin:

>>> str(Transport.objects.filter(domain='%s').values('method').query)
'SELECT `postfix_autoreply_transport`.`method` FROM `postfix_autoreply_transport` WHERE `postfix_autoreply_transport`.`domain` = %s'
gawel commented

Hm... Bad repo