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

opendkim fails #155

Closed
rTiGd2 opened this issue Nov 3, 2023 · 9 comments
Closed

opendkim fails #155

rTiGd2 opened this issue Nov 3, 2023 · 9 comments

Comments

@rTiGd2
Copy link

rTiGd2 commented Nov 3, 2023

Am I missing something?

2023-11-03T14:10:26.995402+00:00 WARNING postfix/smtpd[424]: warning: host or service localhost:8891 not found: Temporary failure in name resolution
2023-11-03T14:10:26.995415+00:00 WARNING postfix/smtpd[424]: warning: connect to Milter service inet:localhost:8891: Cannot assign requested address

If I enable auto keys, or generate my own, everything breaks. If I remove all dkim stuff, then I can send but get spam jailed everywhere.

I'm fairy certain that I have configured this properly (I mean, you put some files in a place, right) was there some voodoo that isn't in the documentation ?

@bokysan
Copy link
Owner

bokysan commented Nov 3, 2023

Sorry, I'll need more info about this -- how exactly are you running the image:

  • what's the configuration
  • Helm / Docker
  • version
  • ....

Until I have more info to replicate the issue, it's going to be difficult for me to help you.

@rTiGd2
Copy link
Author

rTiGd2 commented Nov 3, 2023

Nevermind, I rolled my own container as I needed to go home today.

@tmeidinger
Copy link

Same here. v3.6.1 is working but v4.0.1 milter/dkim fails.

sudo docker run -d
--name postfix
--restart=unless-stopped
-e TZ="Europe/Zurich"
-e ALLOWED_SENDER_DOMAINS="redacted.com"
-e RELAYHOST="host:587"
-e RELAYHOST_USERNAME="redacted"
-e RELAYHOST_PASSWORD="redacted"
-e POSTFIX_smtp_tls_security_level="encrypt"
-e POSTFIX_myhostname="myhostname"
-e POSTFIX_message_size_limit="10485760"
-e DKIM_SELECTOR="mail"
-e DKIM_AUTOGENERATE="true"
-p 587:587
-v /a/b/postfix/spool:/var/spool/postfix
-v /a/b/postfix/etc:/etc/postfix
-v /a/b/postfix/keys:/etc/opendkim/keys
boky/postfix:$VERS

@bokysan
Copy link
Owner

bokysan commented Dec 29, 2023

Ok, this is a similar issue to #147. The default image was changed from Alpine to Debian. People who have mounted configuration folders have encountered issues because Alpine and Debian keep files in different places.

I have not encountered this error because I don't mount previous version's folders into the image (in fact, you don't need to mount /etc/postfix in most cases).

I will retest and let you know.

@bokysan
Copy link
Owner

bokysan commented Dec 29, 2023

I cannot replace this issue even with configuration files from v3.6.1:

This is from within the container:

docker exec -it clever_solomon bash -c "netstat -taupen"
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name
tcp        0      0 127.0.0.1:8891          0.0.0.0:*               LISTEN      101        11310415   -

These are the last lines from the log:

2023-12-29 15:01:35,521 INFO success: rsyslog entered RUNNING state, process has stayed up for > than 2 seconds (startsecs)
2023-12-29 15:01:38,531 INFO success: opendkim entered RUNNING state, process has stayed up for > than 5 seconds (startsecs)

So, OpenDKIM is running. I would need more info. Can you share startup logs, perhaps?

@tmeidinger
Copy link

Did you start a fresh install (empty configuration folders) with v4.0.1? That's what I did but no success.

@bokysan
Copy link
Owner

bokysan commented Dec 29, 2023

Fresh install (empty configuration folders) works as well over here, using the following script:

#!/bin/sh
# Save this to test.sh
VER="$1"
DIR="$(pwd)/test"
mkdir -p "${DIR}/spool" "${DIR}/etc" "${DIR}/keys"
 docker run \
    --pull always \
    -e ALLOWED_SENDER_DOMAINS="redacted.com" \
    -e TZ="Europe/Zurich" \
    -e RELAYHOST="host:587" \
    -e RELAYHOST_USERNAME="redacted" \
    -e RELAYHOST_PASSWORD="redacted" \
    -e POSTFIX_smtp_tls_security_level="encrypt" \
    -e POSTFIX_myhostname="myhostname" \
    -e POSTFIX_message_size_limit="10485760" \
    -e DKIM_SELECTOR="mail" \
    -e DKIM_AUTOGENERATE="true" \
    -p 587:587 \
    -v "${DIR}/spool:/var/spool/postfix" \
    -v "${DIR}/etc:/etc/postfix" \
    -v "${DIR}/keys:/etc/opendkim/keys" \
    --rm -it boky/postfix:$VER
./test.sh latest

@tmeidinger
Copy link

I did an upgrade to 4.0.2 but keeping my files/folders. It seems everything is ok now.

@bokysan
Copy link
Owner

bokysan commented Dec 29, 2023

Closing issue. If it pops up again, please provide additional info and reopen.

@bokysan bokysan closed this as completed Dec 29, 2023
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

No branches or pull requests

3 participants