Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postfix is not added to opendkim group on first install #217

Closed
link2xt opened this issue Feb 17, 2024 · 2 comments · Fixed by #258
Closed

postfix is not added to opendkim group on first install #217

link2xt opened this issue Feb 17, 2024 · 2 comments · Fixed by #258

Comments

@link2xt
Copy link
Contributor

link2xt commented Feb 17, 2024

There is a code adding postfix to opendkim group:
https://github.com/deltachat/chatmail/blob/main/cmdeploy/src/cmdeploy/__init__.py#L141-L146

But on the forum it's reported that it did not work on a fresh chatmail setup:
https://support.delta.chat/t/error-sending-messages-between-accounts-on-self-hosted-chatmail/2933/6

This should be tested on a fresh setup to confirm, running cmdeploy run only once and checking if postfix is in opendkim group.

@link2xt link2xt transferred this issue from deltachat/deltachat-core-rust Feb 17, 2024
@missytake
Copy link
Contributor

missytake commented Mar 28, 2024

problem confirmed in https://github.com/deltachat/chatmail/actions/runs/8470883067/job/23210037319
(it was a deployment from scratch, as the PR which executed it aims to reset staging.testrun.org on every CI run again)

test_no_vfry fails because of permission errors:

root@staging:~# journalctl -f -t postfix/smtpd -t postfix/smtp -t postfix/lmtp
Mär 28 17:20:31 staging postfix/smtpd[9162]: connect from unknown[194.48.251.123]
Mär 28 17:20:31 staging postfix/smtpd[9162]: warning: connect to Milter service unix:opendkim/opendkim.sock: Permission denied
Mär 28 17:20:31 staging postfix/smtpd[9162]: NOQUEUE: milter-reject: CONNECT from unknown[194.48.251.123]: 451 4.7.1 Service unavailable - try again later; proto=SMTP
Mär 28 17:20:31 staging postfix/smtpd[9162]: NOQUEUE: milter-reject: EHLO from unknown[194.48.251.123]: 451 4.7.1 Service unavailable - try again later; proto=SMTP helo=<User>

On a closer look, it's because postfix wasn't added to opendkim group:

root@staging:~# ls -la /var/spool/postfix/opendkim/opendkim.sock
srwxrwx--- 1 opendkim opendkim 0 28. Mär 17:12 /var/spool/postfix/opendkim/opendkim.sock
root@staging:~# groups postfix
postfix : postfix

Which is weird, because pyinfra reports Success:

--> Starting operation: Add postfix user to opendkim group for socket access 
    [staging.testrun.org] Success

@link2xt
Copy link
Contributor Author

link2xt commented Mar 29, 2024

After deployment in #258 postfix is in the opendkim group:

root@staging:~# cat /etc/group | grep opendkim
opendkim:x:995:opendkim,postfix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants