[GH-ISSUE #30] the postfix_map command should be run has a standard management command #15

Closed
opened 2026-02-27 10:25:18 +03:00 by kerem · 1 comment
Owner

Originally created by @gawel on GitHub (Mar 17, 2016).
Original GitHub issue: https://github.com/modoboa/modoboa-postfix-autoreply/issues/30

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'
Originally created by @gawel on GitHub (Mar 17, 2016). Original GitHub issue: https://github.com/modoboa/modoboa-postfix-autoreply/issues/30 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' ```
kerem closed this issue 2026-02-27 10:25:18 +03:00
Author
Owner

@gawel commented on GitHub (Mar 17, 2016):

Hm... Bad repo

<!-- gh-comment-id:197787996 --> @gawel commented on GitHub (Mar 17, 2016): Hm... Bad repo
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-postfix-autoreply-modoboa#15
No description provided.