Parece que o erro foi devido ao endereço ipv6 em /etc/resolv.conf. Eu removi e agora funciona.
Estou tentando enviar e-mails usando o Postfix, mas recebo o seguinte erro para todos os e-mails:
May 13 12:44:46 myhost postfix/qmgr[12169]: A6D9644526: from=<[email protected]>, size=317, nrcpt=1 (queue active)
May 13 12:44:46 myhost postfix/smtp[12178]: A6D9644526: to=<[email protected]>, relay=none, delay=0.03, delays=0.02/0/0/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=gmail.com type=MX: Host not found, try again)
Lendo as perguntas vinculadas, eu já verifiquei /etc/resolv.conf
e /var/spool/postfix/etc/resolv.conf
ambos são iguais. meu resolv.conf
se parece com:
nameserver 2001:4b98:dc0:49::225
nameserver 217.70.184.225
nameserver 217.70.184.226
options timeout:1 attempts:3 rotate
dig mx gmail.com
funciona:
; <<>> DiG 9.9.5-3ubuntu0.8-Ubuntu <<>> mx gmail.com ;; global
options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status:
NOERROR, id: 64383 ;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY:
4, ADDITIONAL: 15
Aqui está o conteúdo de /etc/postfix/main.cf
:
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = myhost
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
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 = ipv4
Alguma ideia do motivo pelo qual o host de e-mail não foi encontrado?