[GH-ISSUE #2602] opendkim not work #1650

Closed
opened 2026-02-27 11:18:22 +03:00 by kerem · 6 comments
Owner

Originally created by @tate11 on GitHub (Sep 18, 2022).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/2602

Impacted versions

  • OS Type: Ubuntu 20.04
  • OS Version: Number or Name
  • Database Type: PostgreSQL
  • Database version: X.y
  • Modoboa: 2.0.1
  • installer used: Yes
  • Webserver: Nginx

Steps to reproduce

systemctl status opendkim
● opendkim.service - OpenDKIM DomainKeys Identified Mail (DKIM) Milter
Loaded: loaded (/lib/systemd/system/opendkim.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2022-09-18 19:11:42 CEST; 9s ago
Docs: man:opendkim(8)
man:opendkim.conf(5)
man:opendkim-genkey(8)
man:opendkim-genzone(8)
man:opendkim-testadsp(8)
man:opendkim-testkey
http://www.opendkim.org/docs.html
Process: 2123 ExecStart=/usr/sbin/opendkim -x /etc/opendkim.conf (code=exited, status=78)

Current behavior

Sep 18 19:11:41 mail opendkim[2120]: opendkim: /etc/opendkim.conf: dsn:pgsql://opendkim:AUgSEhrWj0FyTMCc@127.0.0.1:5432/modoboa/table=dkim?keycol=domain_name?datacol=id: dkimf_db_open(): Invalid argument
Sep 18 19:11:41 mail systemd[1]: opendkim.service: Control process exited, code=exited, status=78/CONFIG
Sep 18 19:11:41 mail systemd[1]: opendkim.service: Failed with result 'exit-code'.
Sep 18 19:11:41 mail systemd[1]: Failed to start OpenDKIM DomainKeys Identified Mail (DKIM) Milter.
Sep 18 19:11:42 mail systemd[1]: opendkim.service: Scheduled restart job, restart counter is at 3.
Sep 18 19:11:42 mail systemd[1]: Stopped OpenDKIM DomainKeys Identified Mail (DKIM) Milter.
Sep 18 19:11:42 mail systemd[1]: Starting OpenDKIM DomainKeys Identified Mail (DKIM) Milter...

Expected behavior

Video/Screenshot link (optional)

Originally created by @tate11 on GitHub (Sep 18, 2022). Original GitHub issue: https://github.com/modoboa/modoboa/issues/2602 # Impacted versions * OS Type: Ubuntu 20.04 * OS Version: Number or Name * Database Type: PostgreSQL * Database version: X.y * Modoboa: 2.0.1 * installer used: Yes * Webserver: Nginx # Steps to reproduce systemctl status opendkim ● opendkim.service - OpenDKIM DomainKeys Identified Mail (DKIM) Milter Loaded: loaded (/lib/systemd/system/opendkim.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sun 2022-09-18 19:11:42 CEST; 9s ago Docs: man:opendkim(8) man:opendkim.conf(5) man:opendkim-genkey(8) man:opendkim-genzone(8) man:opendkim-testadsp(8) man:opendkim-testkey http://www.opendkim.org/docs.html Process: 2123 ExecStart=/usr/sbin/opendkim -x /etc/opendkim.conf (code=exited, status=78) # Current behavior Sep 18 19:11:41 mail opendkim[2120]: opendkim: /etc/opendkim.conf: dsn:pgsql://opendkim:AUgSEhrWj0FyTMCc@127.0.0.1:5432/modoboa/table=dkim?keycol=domain_name?datacol=id: dkimf_db_open(): Invalid argument Sep 18 19:11:41 mail systemd[1]: opendkim.service: Control process exited, code=exited, status=78/CONFIG Sep 18 19:11:41 mail systemd[1]: opendkim.service: Failed with result 'exit-code'. Sep 18 19:11:41 mail systemd[1]: Failed to start OpenDKIM DomainKeys Identified Mail (DKIM) Milter. Sep 18 19:11:42 mail systemd[1]: opendkim.service: Scheduled restart job, restart counter is at 3. Sep 18 19:11:42 mail systemd[1]: Stopped OpenDKIM DomainKeys Identified Mail (DKIM) Milter. Sep 18 19:11:42 mail systemd[1]: Starting OpenDKIM DomainKeys Identified Mail (DKIM) Milter... <!-- Explain the behavior you're seeing that you think is a bug, and explain how you think things should behave instead. --> # Expected behavior # Video/Screenshot link (optional)
kerem closed this issue 2026-02-27 11:18:22 +03:00
Author
Owner

@Spitfireap commented on GitHub (Sep 18, 2022):

What is the output of sudo netstat -tlnup | grep 5432 plz? And have you tried a reboot after install 😁?

<!-- gh-comment-id:1250359386 --> @Spitfireap commented on GitHub (Sep 18, 2022): What is the output of `sudo netstat -tlnup | grep 5432` plz? And have you tried a reboot after install 😁?
Author
Owner

@tate11 commented on GitHub (Sep 18, 2022):

What is the output of sudo netstat -tlnup | grep 5432 plz? And have you tried a reboot after install 😁?

root@mail:~# sudo netstat -tlnup | grep 5432
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 477/postgres
And have you tried a reboot after install Yes

<!-- gh-comment-id:1250362239 --> @tate11 commented on GitHub (Sep 18, 2022): > What is the output of `sudo netstat -tlnup | grep 5432` plz? And have you tried a reboot after install 😁? root@mail:~# sudo netstat -tlnup | grep 5432 tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 477/postgres And have you tried a reboot after install Yes
Author
Owner

@tonioo commented on GitHub (Sep 19, 2022):

@tate11 Can you try to remove the ":5432" part from the postgres connection string in opendkim configuration file and try again please?

<!-- gh-comment-id:1250683815 --> @tonioo commented on GitHub (Sep 19, 2022): @tate11 Can you try to remove the ":5432" part from the postgres connection string in opendkim configuration file and try again please?
Author
Owner

@tate11 commented on GitHub (Sep 19, 2022):

@tate11 Can you try to remove the ":5432" part from the postgres connection string in opendkim configuration file and try again please?

opendkim.conf
KeyTable dsn:pgsql://opendkim:AUgSEhrWj0FyTMCc@127.0.0.1/modoboa/table=dkim?keycol=id?datacol=domain_name,selector,private_key_path
SigningTable dsn:pgsql://opendkim:AUgSEhrWj0FyTMCc@127.0.0.1/modoboa/table=dkim?keycol=domain_name?datacol=id

service opendkim status
● opendkim.service - OpenDKIM DomainKeys Identified Mail (DKIM) Milter
Loaded: loaded (/lib/systemd/system/opendkim.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-09-19 10:14:01 CEST; 5s ago
Docs: man:opendkim(8)
man:opendkim.conf(5)
man:opendkim-genkey(8)
man:opendkim-genzone(8)
man:opendkim-testadsp(8)
man:opendkim-testkey
http://www.opendkim.org/docs.html
Process: 3123 ExecStart=/usr/sbin/opendkim -x /etc/opendkim.conf (code=exited, status=0/SUCCESS)
Main PID: 3134 (opendkim)
Tasks: 6 (limit: 9479)
Memory: 2.9M
CGroup: /system.slice/opendkim.service
└─3134 /usr/sbin/opendkim -x /etc/opendkim.conf

Sep 19 10:14:01 mail.uzmantem.com systemd[1]: Starting OpenDKIM DomainKeys Identified Mail (DKIM) Milter...
Sep 19 10:14:01 mail.uzmantem.com systemd[1]: Started OpenDKIM DomainKeys Identified Mail (DKIM) Milter.
Sep 19 10:14:01 mail.uzmantem.com opendkim[3134]: OpenDKIM Filter v2.11.0 starting (args: -x /etc/opendkim.conf)

Yes it finally worked
Thank you for your support

<!-- gh-comment-id:1250737041 --> @tate11 commented on GitHub (Sep 19, 2022): > @tate11 Can you try to remove the ":5432" part from the postgres connection string in opendkim configuration file and try again please? opendkim.conf KeyTable dsn:pgsql://opendkim:AUgSEhrWj0FyTMCc@127.0.0.1/modoboa/table=dkim?keycol=id?datacol=domain_name,selector,private_key_path SigningTable dsn:pgsql://opendkim:AUgSEhrWj0FyTMCc@127.0.0.1/modoboa/table=dkim?keycol=domain_name?datacol=id service opendkim status ● opendkim.service - OpenDKIM DomainKeys Identified Mail (DKIM) Milter Loaded: loaded (/lib/systemd/system/opendkim.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2022-09-19 10:14:01 CEST; 5s ago Docs: man:opendkim(8) man:opendkim.conf(5) man:opendkim-genkey(8) man:opendkim-genzone(8) man:opendkim-testadsp(8) man:opendkim-testkey http://www.opendkim.org/docs.html Process: 3123 ExecStart=/usr/sbin/opendkim -x /etc/opendkim.conf (code=exited, status=0/SUCCESS) Main PID: 3134 (opendkim) Tasks: 6 (limit: 9479) Memory: 2.9M CGroup: /system.slice/opendkim.service └─3134 /usr/sbin/opendkim -x /etc/opendkim.conf Sep 19 10:14:01 mail.uzmantem.com systemd[1]: Starting OpenDKIM DomainKeys Identified Mail (DKIM) Milter... Sep 19 10:14:01 mail.uzmantem.com systemd[1]: Started OpenDKIM DomainKeys Identified Mail (DKIM) Milter. Sep 19 10:14:01 mail.uzmantem.com opendkim[3134]: OpenDKIM Filter v2.11.0 starting (args: -x /etc/opendkim.conf) Yes it finally worked Thank you for your support
Author
Owner

@stefaweb commented on GitHub (Sep 22, 2022):

Hi!

I seem to have the same type of problem with a fresh 2.0.1 install.

I removed port ":5432" in /etc/opendkim.conf file and everything is ok now.

Regards,

<!-- gh-comment-id:1254710534 --> @stefaweb commented on GitHub (Sep 22, 2022): Hi! I seem to have the same type of problem with a fresh 2.0.1 install. I removed port ":5432" in /etc/opendkim.conf file and everything is ok now. Regards,
Author
Owner

@tonioo commented on GitHub (Sep 22, 2022):

I fixed the DSN syntax:
github.com/modoboa/modoboa-installer@47a5d29043

<!-- gh-comment-id:1254726748 --> @tonioo commented on GitHub (Sep 22, 2022): I fixed the DSN syntax: https://github.com/modoboa/modoboa-installer/commit/47a5d29043019fac5264a17f0350e53a7638414c
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#1650
No description provided.