mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-26 09:26:00 +03:00
[GH-ISSUE #1642] Unable to run check_mx and generate_postfix_maps #1293
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#1293
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @CTDragon on GitHub (Dec 28, 2018).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/1642
Impacted versions
Steps to reproduce
Upgraded from 1.11.0

check_mx was not working
running manually: python /srv/modoboa/instance/manage.py modo check_mx
produces error: Value too long for type character varying(50)
Found this.. not sure if it helps
https://stackoverflow.com/questions/9036102/databaseerror-value-too-long-for-type-character-varying100
tried to run optional upgrade step python manage.py generate_postfix_maps --destdir

permissions issues with modoboa
ran as root instead

Exits with error: Cannot upgrade 'sql-domains.cf' map because it has been modified.
ran as root again

Exits with error: ValueError: too many values to unpack
(TRACKED THIS DOWN)

Remedied the offending value from /etc/postfix/modoboa-postfix-maps.chk
ran as root again
Same 2 errors. Stuck in a loop trying to run this
Current behavior
Can't run the following two commands without errors
python /srv/modoboa/instance/manage.py modo check_mx
python manage.py generate_postfix_maps --destdir
Expected behavior
Video/Screenshot link (optional)
@CTDragon commented on GitHub (Dec 28, 2018):
As for the check dns issue... could this be because I have 4096 key length and that's too long for the parameter? It seemed to get all the way to dkim on the first one it checked
@tonioo commented on GitHub (Jan 2, 2019):
@CTDragon Looks like one of the database fields is too short, I need to find which one.
About map files, have you tried to delete the .chk file and add the --force option to the command line?
@ghost commented on GitHub (Jan 4, 2019):
@tonioo fyi the problem is the field error in dnstools_dnsrecord
the error that you try to store (can?) have the complete record as content, so in case of dkim the error can be something like
"Invalid tag p=MIICIjA.......[rest of the key]"
@ghost commented on GitHub (Jan 4, 2019):
@tonioo The other problem (which causes the Invalid tag error in the dkim check) is in the check if the dkim key is valid.
in modoboa/dnstools/lib.py:203
You split the key value pair on '=' and check if you have 2 parts.. But the dkim key is base64 encoded and ends with == (so the check fails)
(I'm sorry, at the moment it's not possible for me to create a patch for these problems)