Meu servidor dedicado está executando o Ubuntu 14.04.
Ele também é configurado como um servidor de dns (bind) e meu domínio toto.be está apontando nele.
Eu também instalei o postfix, adicionei o registro mx, adicionei as regras do iptables para abrir a porta de entrada 53 (udp + tcp).
Ok, agora estou testando.
- No meu servidor, posso enviar um email para o usuário local root
- No meu servidor, posso enviar um email para o endereço de email externo ([email protected])
- Do Gmail, eu não posso enviar um email para [email protected]
No meu log
Oct 2 14:45:35 mail postfix/smtpd[31278]: connect from mail-qc0-x22b.google.com[2607:f8b0:400d:c01::22b]
Oct 2 14:45:36 mail postfix/smtpd[31278]: NOQUEUE: reject: RCPT from mail-qc0-x22b.google.com[2607:f8b0:400d:c01::22b]: 454 4.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-qc0-x22b.google.com>
Oct 2 14:45:36 mail postfix/smtpd[31278]: disconnect from mail-qc0-x22b.google.com[2607:f8b0:400d:c01::22b]
No meu main.cf , tento adicionar o google.com à mynetworks, mas não acho que seja a solução (para todos os outros domínios?)
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 google.com
Agora a mensagem é aceita, mas não pode ser entregue
Oct 2 14:49:09 mail postfix/smtpd[31484]: connect from mail-qg0-x231.google.com[2607:f8b0:400d:c04::231]
Oct 2 14:49:10 mail postfix/smtpd[31484]: 541357F836: client=mail-qg0-x231.google.com[2607:f8b0:400d:c04::231]
Oct 2 14:49:10 mail postfix/cleanup[31489]: 541357F836: message-id=<[email protected]>
Oct 2 14:49:10 mail postfix/qmgr[31437]: 541357F836: from=<[email protected]>, size=1754, nrcpt=1 (queue active)
Oct 2 14:49:10 mail postfix/smtp[31490]: 541357F836: to=<[email protected]>, relay=none, delay=0.31, delays=0.3/0/0/0, dsn=5.4.6, status=bounced (mail for toto.be loops back to myself)
Oct 2 14:49:10 mail postfix/cleanup[31489]: 8EC927F83A: message-id=<[email protected]>
Oct 2 14:49:10 mail postfix/bounce[31491]: 541357F836: sender non-delivery notification: 8EC927F83A
Oct 2 14:49:10 mail postfix/qmgr[31437]: 8EC927F83A: from=<>, size=3676, nrcpt=1 (queue active)
Oct 2 14:49:10 mail postfix/qmgr[31437]: 541357F836: removed
Oct 2 14:49:10 mail postfix/smtpd[31484]: disconnect from mail-qg0-x231.google.com[2607:f8b0:400d:c04::231]
Oct 2 14:49:11 mail postfix/smtp[31490]: 8EC927F83A: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[2a00:1450:400c:c02::1b]:25, delay=1, delays=0.03/0/0.17/0.83, dsn=2.0.0, status=sent (250 2.0.0 OK 1412254151 m13si5148612wjw.140 - gsmtp)
Oct 2 14:49:11 mail postfix/qmgr[31437]: 8EC927F83A: removed
O que posso fazer?
postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
mailbox_size_limit = 0
mydestination = smtp.toto.be, localhost, localhost.localdomain, localhost
myhostname = smtp.toto.be
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 google.com
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
/ etc / mailname
toto.be