UnluckySerivelha
@UnluckySerivelha

Postfix не подписывается DKIM?

Пытаюсь настроить DKIM-подписывание писем, делал все по этому мануалу, но почему-то Postfix ругается на отстутствие файла opendkim.sock:
Mar 25 00:04:16 vps postfix/cleanup[2035]: warning: connect to Milter service unix:/var/run/opendkim/opendkim.sock: No such file or directory

Хотя данный файл есть и имеет, вроде бы, все нужные права
ubuntu@vps:/var/run/opendkim$ ls -la
total 4
drwxr-xr-x  2 opendkim opendkim  80 Mar 24 22:57 .
drwxr-xr-x 27 root     root     940 Mar 24 22:58 ..
-rw-r--r--  1 opendkim opendkim   5 Mar 24 22:57 opendkim.pid
srwxrwxrwx  1 opendkim opendkim   0 Mar 24 22:57 opendkim.sock

opendkim запущен
Конфиг opendkim:
spoiler
# This is a basic configuration that can easily be adapted to suit a standard
# installation. For more advanced options, see opendkim.conf(5) and/or
# /usr/share/doc/opendkim/examples/opendkim.conf.sample.

# Log to syslog
Syslog                  yes
# Required to use local socket with MTAs that access the socket as a non-
# privileged user (e.g. Postfix)
UMask                   002

# Sign for example.com with key in /etc/dkimkeys/dkim.key using
# selector '2007' (e.g. 2007._domainkey.example.com)
#Domain                 example.com
#KeyFile                /etc/dkimkeys/dkim.key
#Selector               2007

# Commonly-used options; the commented-out versions show the defaults.
#Canonicalization       simple
#Mode                   sv
#SubDomains             no


# Always oversign From (sign using actual From and a null From to prevent
# malicious signatures header fields (From and/or others) between the signer
# and the verifier.  From is oversigned by default in the Debian pacakge
# because it is often the identity key used by reputation systems and thus
# somewhat security sensitive.
OversignHeaders         From

##  ResolverConfiguration filename
##      default (none)
##
##  Specifies a configuration file to be passed to the Unbound library that
##  performs DNS queries applying the DNSSEC protocol.  See the Unbound
##  documentation at http://unbound.net for the expected content of this file.
##  The results of using this and the TrustAnchorFile setting at the same
##  time are undefined.
##  In Debian, /etc/unbound/unbound.conf is shipped as part of the Suggested
##  unbound package

# ResolverConfiguration     /etc/unbound/unbound.conf

##  TrustAnchorFile filename
##      default (none)
##
## Specifies a file from which trust anchor data should be read when doing
## DNS queries and applying the DNSSEC protocol.  See the Unbound documentation
## at http://unbound.net for the expected format of this file.

TrustAnchorFile       /usr/share/dns/root.key


Canonicalization relaxed/relaxed
SyslogSuccess yes
KeyTable file:/etc/opendkim/keytable
SigningTable file:/etc/opendkim/signingtable
X-Header yes
#


Заранее спасибо.

UPD: Проблема была в неправильных путях и правах.
  • Вопрос задан
  • 1344 просмотра
Решения вопроса 1
sashkets
@sashkets
Прекратил отвечать после 24.02.2022
нестыковочка, у Вас в конфе UMask 002, а права на сокет получились srwxrwxrwx, а с такой маской дожны быть srwxrwxr-x

поэтому в конфе добавить

UserID opendkim:opendkim

и юзер postfix должен входить в группу opendkim

либо Umask 000

ну и перезапуск сервиса :-)
Ответ написан
Пригласить эксперта
Ответы на вопрос 1
На случай, если кто столкнется с такой же проблемой - мне помогло решение отсюда https://serverfault.com/questions/796742/connect-t... Александр не расписал, что сделал, поэтому оставлю ссылку тут. Насколько я понял, когда postfix запускается с параметрами "chroot = y" в конфиге, для него родительской директорией становится /var/spool/postfix и из-за этого он не видит папку var/run/opendkim.
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы