[GH-ISSUE #563] Docs: add note about using manage.py handle_mailbox_operations with virtualenv #536

Closed
opened 2026-02-27 11:12:16 +03:00 by kerem · 2 comments
Owner

Originally created by @rominf on GitHub (Jun 10, 2014).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/563

To isolate modoboa dependencies I used virtualenv. To get activated environment on modoboa user login I've added

. /opt/modoboa/bin/activate

But modoboa's .bashrc isn't sourced when cron executes vmail's crontab. So, to get it work I needed to add:

* * * * * source /var/vmail/.bashrc; python /srv/www/mail/manage.py handle_mailbox_operations
Originally created by @rominf on GitHub (Jun 10, 2014). Original GitHub issue: https://github.com/modoboa/modoboa/issues/563 To isolate modoboa dependencies I used virtualenv. To get activated environment on `modoboa` user login I've added ``` . /opt/modoboa/bin/activate ``` But `modoboa`'s `.bashrc` isn't sourced when `cron` executes `vmail`'s crontab. So, to get it work I needed to add: ``` * * * * * source /var/vmail/.bashrc; python /srv/www/mail/manage.py handle_mailbox_operations ```
kerem 2026-02-27 11:12:16 +03:00
Author
Owner

@tonioo commented on GitHub (Jun 11, 2014):

Another way (which I prefer because it does not rely on the underlying shell) is to use the python binary to the virtualenv like this:

*  *  *  *  *  <path/to/python> /srv/www/mail/manage.py handle_mailbox_operations
<!-- gh-comment-id:45711562 --> @tonioo commented on GitHub (Jun 11, 2014): Another way (which I prefer because it does not rely on the underlying shell) is to use the python binary to the virtualenv like this: ``` * * * * * <path/to/python> /srv/www/mail/manage.py handle_mailbox_operations ```
Author
Owner

@rominf commented on GitHub (Jun 11, 2014):

OK, didn't know that.

<!-- gh-comment-id:45733691 --> @rominf commented on GitHub (Jun 11, 2014): OK, didn't know that.
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-modoboa#536
No description provided.