[GH-ISSUE #983] Docs: What is "DNS status" doing? #833

Closed
opened 2026-02-27 11:13:48 +03:00 by kerem · 14 comments
Owner

Originally created by @jprasmussen on GitHub (Dec 4, 2016).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/983

This is probably related to #965 but I'm not too sure... I can't find in the documentation explaining what the "DNS status" column is doing/looking for under the Admin > Domains > List Domains page.

Presumably it's looking for MX records? Any insight will help. Thanks!

Originally created by @jprasmussen on GitHub (Dec 4, 2016). Original GitHub issue: https://github.com/modoboa/modoboa/issues/983 This is probably related to #965 but I'm not too sure... I can't find in the documentation explaining what the "DNS status" column is doing/looking for under the Admin > Domains > List Domains page. Presumably it's looking for MX records? Any insight will help. Thanks!
kerem closed this issue 2026-02-27 11:13:48 +03:00
Author
Owner

@tonioo commented on GitHub (Dec 5, 2016):

this column displays information about MX configuration and DNSBL status for each domain. Make sure those features are enabled (Check Modoboa > Parameters > Administration).

<!-- gh-comment-id:264871864 --> @tonioo commented on GitHub (Dec 5, 2016): this column displays information about MX configuration and DNSBL status for each domain. Make sure those features are enabled (Check Modoboa > Parameters > Administration).
Author
Owner

@jprasmussen commented on GitHub (Dec 5, 2016):

Thank you @tonioo.

I have those checks enabled under Modoboa > Parameters > Administration but the domains remain "Awaiting checks". So I'm not clear on what it's looking with the DNS records or if I need to manually trigger a check somehow.

In testing I'm able to send and receive emails to accounts on the domains that are marked as awaiting checks. So I believe things are correctly setup for each domain's MX records.

<!-- gh-comment-id:264875084 --> @jprasmussen commented on GitHub (Dec 5, 2016): Thank you @tonioo. I have those checks enabled under Modoboa > Parameters > Administration but the domains remain "Awaiting checks". So I'm not clear on what it's looking with the DNS records or if I need to manually trigger a check somehow. In testing I'm able to send and receive emails to accounts on the domains that are marked as awaiting checks. So I believe things are correctly setup for each domain's MX records.
Author
Owner

@tonioo commented on GitHub (Dec 5, 2016):

I don't know how you installed Modoboa but those checks are issued by a cron task so you might need to install it manually. (http://modoboa.org/en/weblog/2016/09/14/modoboa-160-out/)

<!-- gh-comment-id:264875574 --> @tonioo commented on GitHub (Dec 5, 2016): I don't know how you installed Modoboa but those checks are issued by a cron task so you might need to install it manually. (http://modoboa.org/en/weblog/2016/09/14/modoboa-160-out/)
Author
Owner

@jprasmussen commented on GitHub (Dec 5, 2016):

Hmm... I see the cron task in there. I tried running the command manually but get an error... perhaps it's because I'm not familiar enough with python.

Here's what I ran:
/usr/bin/env python /srv/modoboa/instance/manage.py modo check_mx

And this is the error:

Traceback (most recent call last):
  File "/srv/modoboa/instance/manage.py", line 8, in <module>
    from django.core.management import execute_from_command_line
ImportError: No module named django.core.management

If that command looks right then perhaps something went wrong in install. I'm just learning how this works so I'm not opposed to wiping out the server and started over.

Ultimately, emails are sending and receiving without this DNS check. So all else fails... do nothing. :)

<!-- gh-comment-id:264886488 --> @jprasmussen commented on GitHub (Dec 5, 2016): Hmm... I see the cron task in there. I tried running the command manually but get an error... perhaps it's because I'm not familiar enough with python. Here's what I ran: `/usr/bin/env python /srv/modoboa/instance/manage.py modo check_mx` And this is the error: ``` Traceback (most recent call last): File "/srv/modoboa/instance/manage.py", line 8, in <module> from django.core.management import execute_from_command_line ImportError: No module named django.core.management ``` If that command looks right then perhaps something went wrong in install. I'm just learning how this works so I'm not opposed to wiping out the server and started over. Ultimately, emails are sending and receiving without this DNS check. So all else fails... do nothing. :)
Author
Owner

@tonioo commented on GitHub (Dec 5, 2016):

You need to load the proper virtual env in order to run this command. Something like this:
/srv/modoboa/env/bin/python srv/modoboa/instance/manage.py modo check_mx

<!-- gh-comment-id:264894535 --> @tonioo commented on GitHub (Dec 5, 2016): You need to load the proper virtual env in order to run this command. Something like this: `/srv/modoboa/env/bin/python srv/modoboa/instance/manage.py modo check_mx`
Author
Owner

@jprasmussen commented on GitHub (Dec 5, 2016):

That worked!

So that means the cron tasks aren't working correctly. I'll dig into that some more and post back here incase anyone else runs into the problem.

<!-- gh-comment-id:264919793 --> @jprasmussen commented on GitHub (Dec 5, 2016): That worked! So that means the cron tasks aren't working correctly. I'll dig into that some more and post back here incase anyone else runs into the problem.
Author
Owner

@jprasmussen commented on GitHub (Dec 10, 2016):

I re-installed on a new server this week (Ubuntu 16.04) and it still doesn't seem to work on cron. But manually running the below works fine for me since I'm not planning to add many domains.
/srv/modoboa/env/bin/python /srv/modoboa/instance/manage.py modo check_mx

<!-- gh-comment-id:266218729 --> @jprasmussen commented on GitHub (Dec 10, 2016): I re-installed on a new server this week (Ubuntu 16.04) and it still doesn't seem to work on cron. But manually running the below works fine for me since I'm not planning to add many domains. `/srv/modoboa/env/bin/python /srv/modoboa/instance/manage.py modo check_mx`
Author
Owner

@tonioo commented on GitHub (Dec 11, 2016):

You reinstalled using the installer?

<!-- gh-comment-id:266288036 --> @tonioo commented on GitHub (Dec 11, 2016): You reinstalled using the installer?
Author
Owner

@jprasmussen commented on GitHub (Dec 11, 2016):

Yes. I used the recommended way from the documentation.

<!-- gh-comment-id:266291012 --> @jprasmussen commented on GitHub (Dec 11, 2016): Yes. I used the recommended way from the documentation.
Author
Owner

@tonioo commented on GitHub (Dec 12, 2016):

Can you check if a cron daemon is installed on your server?

<!-- gh-comment-id:266440812 --> @tonioo commented on GitHub (Dec 12, 2016): Can you check if a cron daemon is installed on your server?
Author
Owner

@jprasmussen commented on GitHub (Dec 12, 2016):

Cron is installed and running. Here is the status output:

root@nz3:~# /etc/init.d/cron status
● cron.service - Regular background program processing daemon
   Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2016-12-10 18:35:20 NZDT; 2 days ago
     Docs: man:cron(8)
 Main PID: 344 (cron)
   CGroup: /system.slice/cron.service
           └─344 /usr/sbin/cron -f

Dec 13 03:17:01 nz3 CRON[7320]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Dec 13 03:17:01 nz3 CRON[7319]: pam_unix(cron:session): session closed for user root
Dec 13 03:18:01 nz3 CRON[7322]: pam_unix(cron:session): session opened for user amavis by (uid=0)
Dec 13 03:18:01 nz3 CRON[7323]: (amavis) CMD (test -e /usr/sbin/amavisd-new-cronjob && /usr/sbi...ync)
Dec 13 04:17:01 nz3 CRON[7624]: pam_unix(cron:session): session opened for user root by (uid=0)
Dec 13 04:17:01 nz3 CRON[7625]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Dec 13 04:17:01 nz3 CRON[7624]: pam_unix(cron:session): session closed for user root
Dec 13 05:17:01 nz3 CRON[8372]: pam_unix(cron:session): session opened for user root by (uid=0)
Dec 13 05:17:01 nz3 CRON[8373]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Dec 13 05:17:01 nz3 CRON[8372]: pam_unix(cron:session): session closed for user root

Contents of /etc/cron.d/modoboa

# This file was automatically installed on 2016-12-10T18:50:29.265421
#
# Modoboa specific cron jobs
#
PYTHON=/srv/modoboa/env/bin/python
INSTANCE=/srv/modoboa/instance

# Operations on mailboxes
*       *       *       *       *       vmail   $PYTHON $INSTANCE/manage.py handle_mailbox_operations

# Sessions table cleanup
0       0       *       *       *       root    $PYTHON $INSTANCE/manage.py clearsessions

# Logs table cleanup
0       0       *       *       *       root    $PYTHON $INSTANCE/manage.py cleanlogs

# Quarantine cleanup
0       0       *       *       *       root    $PYTHON $INSTANCE/manage.py qcleanup

# Notifications about pending release requests
0       12      *       *       *       root    $PYTHON $INSTANCE/manage.py amnotify --baseurl='http://mail.cms-issc.nz'

# Logs parsing
*/5     *       *       *       *       root    $PYTHON $INSTANCE/manage.py logparser &> /dev/null

# Radicale rights file
#*/2    *       *       *       *        root    $PYTHON $INSTANCE/manage.py generate_rights

# DNSBL checks
*/30    *       *       *       *       root    $PYTHON $INSTANCE/manage.py modo check_mx

# Public API communication
0       *       *       *       *       root    $PYTHON $INSTANCE/manage.py communicate_with_public_api
<!-- gh-comment-id:266480867 --> @jprasmussen commented on GitHub (Dec 12, 2016): Cron is installed and running. Here is the status output: ``` root@nz3:~# /etc/init.d/cron status ● cron.service - Regular background program processing daemon Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2016-12-10 18:35:20 NZDT; 2 days ago Docs: man:cron(8) Main PID: 344 (cron) CGroup: /system.slice/cron.service └─344 /usr/sbin/cron -f Dec 13 03:17:01 nz3 CRON[7320]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly) Dec 13 03:17:01 nz3 CRON[7319]: pam_unix(cron:session): session closed for user root Dec 13 03:18:01 nz3 CRON[7322]: pam_unix(cron:session): session opened for user amavis by (uid=0) Dec 13 03:18:01 nz3 CRON[7323]: (amavis) CMD (test -e /usr/sbin/amavisd-new-cronjob && /usr/sbi...ync) Dec 13 04:17:01 nz3 CRON[7624]: pam_unix(cron:session): session opened for user root by (uid=0) Dec 13 04:17:01 nz3 CRON[7625]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly) Dec 13 04:17:01 nz3 CRON[7624]: pam_unix(cron:session): session closed for user root Dec 13 05:17:01 nz3 CRON[8372]: pam_unix(cron:session): session opened for user root by (uid=0) Dec 13 05:17:01 nz3 CRON[8373]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly) Dec 13 05:17:01 nz3 CRON[8372]: pam_unix(cron:session): session closed for user root ``` Contents of /etc/cron.d/modoboa ``` # This file was automatically installed on 2016-12-10T18:50:29.265421 # # Modoboa specific cron jobs # PYTHON=/srv/modoboa/env/bin/python INSTANCE=/srv/modoboa/instance # Operations on mailboxes * * * * * vmail $PYTHON $INSTANCE/manage.py handle_mailbox_operations # Sessions table cleanup 0 0 * * * root $PYTHON $INSTANCE/manage.py clearsessions # Logs table cleanup 0 0 * * * root $PYTHON $INSTANCE/manage.py cleanlogs # Quarantine cleanup 0 0 * * * root $PYTHON $INSTANCE/manage.py qcleanup # Notifications about pending release requests 0 12 * * * root $PYTHON $INSTANCE/manage.py amnotify --baseurl='http://mail.cms-issc.nz' # Logs parsing */5 * * * * root $PYTHON $INSTANCE/manage.py logparser &> /dev/null # Radicale rights file #*/2 * * * * root $PYTHON $INSTANCE/manage.py generate_rights # DNSBL checks */30 * * * * root $PYTHON $INSTANCE/manage.py modo check_mx # Public API communication 0 * * * * root $PYTHON $INSTANCE/manage.py communicate_with_public_api ```
Author
Owner

@tonioo commented on GitHub (Dec 12, 2016):

Everything looks fine. Have you tried to restart the cron service?

<!-- gh-comment-id:266481197 --> @tonioo commented on GitHub (Dec 12, 2016): Everything looks fine. Have you tried to restart the cron service?
Author
Owner

@jprasmussen commented on GitHub (Dec 20, 2016):

It appears to be working now but I never restarted any services. I've added a couple of domains for testing purposes since your last post. Their DNS status was updated in the Admin UI without running the check manually.

I think it's probably safe to close this until someone else reports the problem.

<!-- gh-comment-id:268276897 --> @jprasmussen commented on GitHub (Dec 20, 2016): It appears to be working now but I never restarted any services. I've added a couple of domains for testing purposes since your last post. Their DNS status was updated in the Admin UI without running the check manually. I think it's probably safe to close this until someone else reports the problem.
Author
Owner

@hrx777 commented on GitHub (Jan 5, 2018):

Same issue here, cron jobs are started but not working. Apparently the variables $PYTHON and $INSTANCE are not interpreted correctly.

I tried to have them dumped by using

          • root /usr/bin/env > /root/cron-env

within the modoboa crontab (/etc/cron.d/modoboa)

Contents of /root/cron-env are:
[...]
PYTHON=/srv/modoboa/env/bin/python
INSTANCE=/srv/modoboa/instance
[...]

I'm using Debian Stretch 9.3 and Modoboa 1.9.1. Since I want the jobs to be run correctly I replaced the variables with the paths for having a workaround.

Probably worth being investigated, jprasmussen and me are certainly not the only ones having this issue.

<!-- gh-comment-id:355604777 --> @hrx777 commented on GitHub (Jan 5, 2018): Same issue here, cron jobs are started but not working. Apparently the variables $PYTHON and $INSTANCE are not interpreted correctly. I tried to have them dumped by using * * * * * root /usr/bin/env > /root/cron-env within the modoboa crontab (/etc/cron.d/modoboa) Contents of /root/cron-env are: [...] PYTHON=/srv/modoboa/env/bin/python INSTANCE=/srv/modoboa/instance [...] I'm using Debian Stretch 9.3 and Modoboa 1.9.1. Since I want the jobs to be run correctly I replaced the variables with the paths for having a workaround. Probably worth being investigated, jprasmussen and me are certainly not the only ones having this issue.
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#833
No description provided.