Eu segui o este tutorial e foi capaz de criar uma conta de e-mail que pode ser configurada em um cliente de e-mail.
O problema é que não consigo receber mensagens na minha caixa de entrada, MAS consigo enviar mensagens perfeitamente bem . Tentei enviar um e-mail do Gmail para minha conta recém-criada e recebi uma mensagem de erro enviada automaticamente para o meu Gmail na imagem abaixo.
Aqui está minha configuração de /etc/postfix/main.cf
:
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
inet_interfaces = localhost
mydestination = $myhostname, dougb3ney.com, localhost
unknown_local_recipient_reject_code = 550
alias_database = hash:/etc/aliases
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.10.1/samples
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
myhostname = mail.dougb3ney.com
mydomain = dougb3ney.com
myorigin = $mydomain
home_mailbox = mail/
mynetworks = 127.0.0.0/8
inet_interfaces = all
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reje$
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtp_tls_note_starttls_offer = yes
smtpd_tls_loglevel = 1
smtpd_tls_key_file = /etc/postfix/ssl/server.key
smtpd_tls_cert_file = /etc/postfix/ssl/server.crt
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
smtpd_milters = inet:127.0.0.1:8891
non_smtpd_milters = $smtpd_milters
milter_default_action = accept
milter_protocol = 2
Além disso, o servidor CentOS que está sendo executado tem um registro A para mail.dougb3ney.com.
UPDATE:
O correio ainda não está aparecendo na minha caixa de entrada, MAS o remetente não está mais recebendo uma mensagem de falha.
Ainda estou recebendo um erro desagradável em /var/log/maillog
Nov 10 17:07:27 mail dovecot: pop3-login: Login: user=<email>, method=PLAIN, rip=96.39.4.250, lip=162.243.7.7, mpid=10638, TLS, session=<p1By7zYkXgBgJwT6>
Nov 10 17:07:27 mail dovecot: pop3(email): Disconnected: Logged out top=0/0, retr=0/0, del=0/1, size=1235
Nov 10 17:08:12 mail postfix/submission/smtpd[10653]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Nov 10 17:08:12 mail postfix/submission/smtpd[10653]: warning: cannot get RSA certificate from file /etc/ssl/certs/ssl-mail.pem: disabling TLS support
Nov 10 17:08:12 mail postfix/submission/smtpd[10653]: warning: TLS library problem: 10653:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('/etc/ssl/certs/ssl-mail.pem','r'):
Nov 10 17:08:12 mail postfix/submission/smtpd[10653]: warning: TLS library problem: 10653:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:
Nov 10 17:08:12 mail postfix/submission/smtpd[10653]: warning: TLS library problem: 10653:error:140DC002:SSL routines:SSL_CTX_use_certificate_chain_file:system lib:ssl_rsa.c:722:
Nov 10 17:08:12 mail postfix/submission/smtpd[10653]: connect from mail-qk0-f173.google.com[209.85.220.173]
Nov 10 17:08:12 mail postfix/submission/smtpd[10653]: lost connection after STARTTLS from mail-qk0-f173.google.com[209.85.220.173]
Nov 10 17:08:12 mail postfix/cleanup[10656]: E3BF73FD10: message-id=<[email protected]>
Nov 10 17:08:12 mail postfix/qmgr[10564]: E3BF73FD10: from=<[email protected]>, size=904, nrcpt=1 (queue active)
Nov 10 17:08:12 mail postfix/submission/smtpd[10653]: disconnect from mail-qk0-f173.google.com[209.85.220.173]
Nov 10 17:08:12 mail postfix/local[10658]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Nov 10 17:08:12 mail postfix/local[10658]: E3BF73FD10: to=<[email protected]>, orig_to=<postmaster>, relay=local, delay=0.04, delays=0.02/0.01/0/0, dsn=2.0.0, status=sent (delivered to maildir)
Nov 10 17:08:12 mail postfix/qmgr[10564]: E3BF73FD10: removed
Nov 10 17:08:26 mail dovecot: pop3-login: Login: user=<email>, method=PLAIN, rip=96.39.4.250, lip=162.243.7.7, mpid=10664, TLS, session=<f4P68jYkaABgJwT6>
Nov 10 17:08:27 mail dovecot: pop3(email): Disconnected: Logged out top=0/0, retr=0/0, del=0/1, size=1235