É bem possível que a porta 25 esteja bloqueada ou não seja usada pelo hotmail. Você pode encontrar melhores referências , mas tente portas alternativas, como, por exemplo, a porta 465/587.
Primeiro, peço desculpas pelo meu inglês (sou francês).
Estou usando o desktop Ubuntu 12.04 . Eu ainda estou aprendendo Shell Scripts, então eu posso ter cometido um erro muito simples em algum lugar.
Estou tentando escrever um script de shell que me envia um email quando 80% do espaço em disco é usado. (Este script será usado em um cron em um servidor distante hospedado por uma empresa privada)
Para isso eu uso o comando sendfix sendmail.
O problema é que não consigo nem enviar um email de teste para o meu endereço de hotmail usando uma linha de comando simples.
Eu verifiquei o /var/log/mail.log e é isso que recebo (com apenas um comando usado no terminal):
Dec 2 16:52:18 user-Precision-T3600 postfix/qmgr[7076]: BD8CC1561B8E: from=<user@user-Precision-T3600>, size=317, nrcpt=1 (queue active)
Dec 2 16:52:18 user-Precision-T3600 postfix/qmgr[7076]: 77ED015620AC: from=<user@user-Precision-T3600>, size=443, nrcpt=3 (queue active)
Dec 2 16:52:18 user-Precision-T3600 postfix/qmgr[7076]: DCD541561FDF: from=<user@user-Precision-T3600>, size=443, nrcpt=3 (queue active)
Dec 2 16:52:18 user-Precision-T3600 postfix/qmgr[7076]: AEDC31561FD7: from=<user@user-Precision-T3600>, size=443, nrcpt=3 (queue active)
Dec 2 16:52:18 user-Precision-T3600 postfix/qmgr[7076]: 0C9C815620BC: from=<user@user-Precision-T3600>, size=290, nrcpt=1 (queue active)
Dec 2 16:52:18 user-Precision-T3600 postfix/qmgr[7076]: 3961C15620B6: from=<user@user-Precision-T3600>, size=443, nrcpt=3 (queue active)
Dec 2 16:52:18 user-Precision-T3600 postfix/qmgr[7076]: 6AC1F15620BD: from=<user@user-Precision-T3600>, size=443, nrcpt=3 (queue active)
Dec 2 16:52:48 user-Precision-T3600 postfix/smtp[7930]: connect to mx4.hotmail.com[65.55.37.88]:25: Connection timed out
Dec 2 16:52:48 user-Precision-T3600 postfix/smtp[7931]: connect to mx3.hotmail.com[65.55.37.88]:25: Connection timed out
Dec 2 16:52:48 user-Precision-T3600 postfix/smtp[7929]: connect to mx3.hotmail.com[65.55.37.120]:25: Connection timed out
Dec 2 16:52:48 user-Precision-T3600 postfix/smtp[7932]: connect to mx1.hotmail.com[65.55.92.136]:25: Connection timed out
Dec 2 16:52:48 user-Precision-T3600 postfix/smtp[7928]: connect to mx1.hotmail.com[65.54.188.126]:25: Connection timed out
Dec 2 16:53:18 user-Precision-T3600 postfix/smtp[7931]: connect to mx4.hotmail.com[65.55.37.104]:25: Connection timed out
Dec 2 16:53:18 user-Precision-T3600 postfix/smtp[7928]: connect to mx1.hotmail.com[65.54.188.110]:25: Connection timed out
Dec 2 16:53:18 user-Precision-T3600 postfix/smtp[7929]: connect to mx4.hotmail.com[65.55.92.152]:25: Connection timed out
Dec 2 16:53:18 user-Precision-T3600 postfix/smtp[7932]: connect to mx1.hotmail.com[65.54.188.72]:25: Connection timed out
Dec 2 16:53:18 user-Precision-T3600 postfix/smtp[7930]: connect to mx3.hotmail.com[65.55.92.184]:25: Connection timed out
Dec 2 16:53:48 user-Precision-T3600 postfix/smtp[7932]: connect to mx1.hotmail.com[65.55.92.168]:25: Connection timed out
Dec 2 16:53:48 user-Precision-T3600 postfix/smtp[7931]: connect to mx3.hotmail.com[65.55.37.72]:25: Connection timed out
Dec 2 16:53:48 user-Precision-T3600 postfix/smtp[7928]: connect to mx3.hotmail.com[65.55.92.184]:25: Connection timed out
Dec 2 16:53:48 user-Precision-T3600 postfix/smtp[7929]: connect to mx2.hotmail.com[65.55.37.104]:25: Connection timed out
Dec 2 16:53:48 user-Precision-T3600 postfix/smtp[7930]: connect to mx3.hotmail.com[65.55.92.168]:25: Connection timed out
Dec 2 16:54:18 user-Precision-T3600 postfix/smtp[7932]: connect to mx2.hotmail.com[65.55.92.136]:25: Connection timed out
Dec 2 16:54:18 user-Precision-T3600 postfix/smtp[7928]: connect to mx1.hotmail.com[65.55.37.88]:25: Connection timed out
Dec 2 16:54:18 user-Precision-T3600 postfix/smtp[7931]: connect to mx3.hotmail.com[65.55.92.184]:25: Connection timed out
Dec 2 16:54:18 user-Precision-T3600 postfix/smtp[7929]: connect to mx4.hotmail.com[65.55.37.104]:25: Connection timed out
Dec 2 16:54:18 user-Precision-T3600 postfix/smtp[7930]: connect to mx1.hotmail.com[65.55.37.72]:25: Connection timed out
Dec 2 16:54:48 user-Precision-T3600 postfix/smtp[7931]: connect to mx4.hotmail.com[65.55.37.88]:25: Connection timed out
Dec 2 16:54:48 user-Precision-T3600 postfix/smtp[7932]: connect to mx4.hotmail.com[65.55.37.104]:25: Connection timed out
Dec 2 16:54:48 user-Precision-T3600 postfix/smtp[7928]: connect to mx1.hotmail.com[65.55.92.184]:25: Connection timed out
Dec 2 16:54:48 user-Precision-T3600 postfix/smtp[7929]: connect to mx4.hotmail.com[65.55.37.120]:25: Connection timed out
Dec 2 16:54:48 user-Precision-T3600 postfix/smtp[7930]: connect to mx3.hotmail.com[65.55.37.72]:25: Connection timed out
Dec 2 16:54:48 user-Precision-T3600 postfix/smtp[7932]: 0C9C815620BC: to=<[email protected]>, relay=none, delay=1253, delays=1102/0.02/150/0, dsn=4.4.1, status=deferred (connect to mx4.hotmail.com[65.55.37.104]:25: Connection timed out)
Dec 2 16:54:48 user-Precision-T3600 postfix/smtp[7928]: BD8CC1561B8E: to=<[email protected]>, relay=none, delay=23169, delays=23019/0.01/150/0, dsn=4.4.1, status=deferred (connect to mx1.hotmail.com[65.55.92.184]:25: Connection timed out)
Dec 2 16:54:48 user-Precision-T3600 postfix/smtp[7930]: DCD541561FDF: to=<[email protected]>, relay=none, delay=18424, delays=18274/0.01/150/0, dsn=4.4.1, status=deferred (connect to mx3.hotmail.com[65.55.37.72]:25: Connection timed out)
Dec 2 16:54:48 user-Precision-T3600 postfix/smtp[7931]: AEDC31561FD7: to=<[email protected]>, relay=none, delay=19135, delays=18985/0.02/150/0, dsn=4.4.1, status=deferred (connect to mx4.hotmail.com[65.55.37.88]:25: Connection timed out)
Dec 2 16:54:48 user-Precision-T3600 postfix/smtp[7929]: 77ED015620AC: to=<[email protected]>, relay=none, delay=9121, delays=8971/0.01/150/0, dsn=4.4.1, status=deferred (connect to mx4.hotmail.com[65.55.37.120]:25: Connection timed out)
Dec 2 16:54:48 user-Precision-T3600 postfix/error[7952]: 3961C15620B6: to=<[email protected]>, relay=none, delay=8585, delays=8435/150/0/0.05, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to mx3.hotmail.com[65.55.37.72]:25: Connection timed out)
Dec 2 16:54:48 user-Precision-T3600 postfix/error[7953]: 6AC1F15620BD: to=<[email protected]>, relay=none, delay=8296, delays=8146/150/0/0.06, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to mx3.hotmail.com[65.55.37.72]:25: Connection timed out)
aqui está minha linha de comando:
$ echo foobar | sendmail -i [email protected]
No começo eu pensei que era a porta que estava bloqueada pelo firewall do Linux, eu verifiquei usando o comando:
$ sudo ufw status
aqui está o que eu recebo:
État : actif
Vers Action Depuis
---- ------ ------
25 ALLOW Anywhere
25/tcp ALLOW Anywhere
25 ALLOW Anywhere (v6)
25/tcp ALLOW Anywhere (v6)
Eu não sei o que não está funcionando, por favor me ajude, eu estive nisso por várias horas agora ...
Aqui está o arquivo de configuração do 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
# TLS parameters
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
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = bmerlet-Precision-T3600
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = bmerlet-Precision-T3600, localhost.localdomain, , localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
Não sei se tenho que alterar alguns parâmetros nesse arquivo e, se for o caso, não sei qual ...: (
Obrigado pela ajuda antecipada;)
Ben
É bem possível que a porta 25 esteja bloqueada ou não seja usada pelo hotmail. Você pode encontrar melhores referências , mas tente portas alternativas, como, por exemplo, a porta 465/587.
Tags command-line bash email linux ubuntu