Não consigo encontrar três coisas no seu /etc/opendkim.conf, algo como:
Domain example.com
KeyFile /etc/opendkim/keys/example.com/dkim.private
Selector dkim
Caso contrário, parece bastante semelhante à minha configuração de corrida.
Estou tentando enviar e-mails do meu servidor Ubuntu (17.04) para o gmail, hotmail, mas o e-mail está indo para a pasta de spam. Eu verifiquei /var/log/mail.log e descobri que há um aviso sobre o opendkim lá:
Jul 25 15:12:31 francooro postfix/cleanup[21233]: warning: connect to Milter service inet:localhost:12301: Connection refused
Eu tentei desativar chroot check, meu firewall está desabilitado, o serviço opendkim está ativo, mas parece que ele não escuta nenhuma porta, então eu tentei adicionar outra porta, e a conexão foi recusada para ambas as portas .
Minha configuração é:
/etc/postfix/main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2
# TLS parameters
smtpd_tls_cert_file=/etc/letsencrypt/live/mail.x-pole-israel.org/cert.pem
smtpd_tls_CAfile=/etc/letsencrypt/live/mail.x-pole-israel.org/fullchain.pem
smtpd_tls_key_file=/etc/letsencrypt/live/mail.x-pole-israel.org/privkey.pem
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = x-pole-israel.org
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, x-pole-israel.org, francooro, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtp_tls_security_level = may
smtpd_tls_security_level = may
milter_protocol = 6
milter_default_action = accept
#smtpd_milters = unix:/spamass/spamass.sock, inet:localhost:12301
#non_smtpd_milters = unix:/spamass/spamass.sock, inet:localhost:12301
smtpd_milters = inet:localhost:12301
non_smtpd_milters = $smtpd_milters
/etc/opendkim.conf
TrustAnchorFile /usr/share/dns/root.key
AutoRestart Yes
AutoRestartRate 10/1h
UMask 0002
Syslog yes
SyslogSuccess Yes
LogWhy Yes
Canonicalization relaxed/simple
ExternalIgnoreList refile:/etc/opendkim/TrustedHosts
InternalHosts refile:/etc/opendkim/TrustedHosts
KeyTable refile:/etc/opendkim/KeyTable
SigningTable refile:/etc/opendkim/SigningTable
Mode sv
PidFile /var/run/opendkim/opendkim.pid
SignatureAlgorithm rsa-sha256
UserID opendkim:opendkim
Socket inet:12301@localhost
/ etc / default / opendkim
SOCKET="inet:12301@localhost"
meu chroot está ativado agora, mas tentei desativá-lo e não ajudou
minhas permissões nas teclas são assim:
drwxr-xr-x 2 root root 4096 Jul 24 15:59 ./
drwxr-xr-x 3 root root 4096 Jul 24 15:09 ../
-rw------- 1 opendkim opendkim 1679 Jul 24 15:09 mail.private
-rw------- 1 root root 507 Jul 24 15:09 mail.txt
sudo netstat -ltnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1443/sshd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 21779/master
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 5904/mysqld
tcp 0 0 0.0.0.0:5355 0.0.0.0:* LISTEN 1371/systemd-resolv
tcp6 0 0 :::22 :::* LISTEN 1443/sshd
tcp6 0 0 :::25 :::* LISTEN 21779/master
tcp6 0 0 :::443 :::* LISTEN 14402/apache2
tcp6 0 0 :::5355 :::* LISTEN 1371/systemd-resolv
tcp6 0 0 :::80 :::* LISTEN 14402/apache2
Não consigo encontrar três coisas no seu /etc/opendkim.conf, algo como:
Domain example.com
KeyFile /etc/opendkim/keys/example.com/dkim.private
Selector dkim
Caso contrário, parece bastante semelhante à minha configuração de corrida.