I want to send emails from my Debian 6 server. I only want to send. I've followed every set of instructions I can find for Sendmail, Exim4 and Postfix and can not get any working. I tried the SMTP Authentication Support module to send mail through a Gmail account. But then that suddenly stopped working too. The test email that I can send via the module's configuration form works, but trying to send via drupal_mail() fails.
mail -v travis@targetdomain.com
reports that the message was accepted for delivery, but the mail never arrives in my inbox. Below is the output. I was thinking that maybe the issue was with the MAIL From: travis@debian
, but everything I've tried to change that with is failing as well. I've changed /etc/email-addresses
and added a rewrite rule with an f
flag to change the from header, to no avail. Anyway, the output:
turibe@servername:~$ mail -v travis@addressdomain.com
Subject: Testing
bloopy
.
EOT
travis@addressdomain.com... Connecting to [127.0.0.1] via relay...
220 example.com ESMTP Sendmail 8.14.3/8.14.3/Debian-9.4; Thu, 30 May 2013 00:53:01 -0700; (No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1]
>>> EHLO example.com
250-example.com Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
>>> VERB
250 2.0.0 Verbose mode
>>> MAIL From:<turibe@example.com> SIZE=218 AUTH=turibe@example.com
250 2.1.0 <turibe@example.com>... Sender ok
>>> RCPT To:<travis@addressdomain.com>
>>> DATA
250 2.1.5 <travis@addressdomain.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
050 <travis@addressdomain.com>... Connecting to aspmx.l.google.com. via esmtp...
050 220 mx.google.com ESMTP zb4si24120260obb.80 - gsmtp
050 >>> EHLO example.com
050 250-mx.google.com at your service, [2600:3c00::f03c:91ff:fe70:4335]
050 250-SIZE 35882577
050 250-8BITMIME
050 250-STARTTLS
050 250-ENHANCEDSTATUSCODES
050 250 PIPELINING
050 >>> STARTTLS
050 220 2.0.0 Ready to start TLS
050 >>> EHLO example.com
050 250-mx.google.com at your service, [2600:3c00::f03c:91ff:fe70:4335]
050 250-SIZE 35882577
050 250-8BITMIME
050 250-ENHANCEDSTATUSCODES
050 250 PIPELINING
050 >>> MAIL From:<turibe@debian> SIZE=471
050 250 2.1.0 OK zb4si24120260obb.80 - gsmtp
050 >>> RCPT To:<travis@addressdomain.com>
050 >>> DATA
050 250 2.1.5 OK zb4si24120260obb.80 - gsmtp
050 354 Go ahead zb4si24120260obb.80 - gsmtp
050 >>> .
050 250 2.0.0 OK 1369900381 zb4si24120260obb.80 - gsmtp
050 <travis@addressdomain.com>... Sent (OK 1369900381 zb4si24120260obb.80 - gsmtp)
250 2.0.0 r4U7r1kG022811 Message accepted for delivery
travis@addressdomain.com... Sent (r4U7r1kG022811 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 example.com closing connection
I've tried several different addresses. It's driving me crazy. This seems like it should be a fairly simple issue to solve, but nothing I've tried nor anything I can find on the issue is working. I've read so many articles where the author says all he did to send mail was something like apt-get install sendmail
and off he went, but none of the same steps are working for me.
Update Before this is asked, I did ensure that all outbound connections were enabled. And indeed, the mail command does appear to successfully connect with GMail.
Update This server is a Linode server, not a home server.
Update I followed this article exactly, and didn't run into any errors at all. Still, no luck sending emails. All I want from life is to be able to send email from my server.
Update I tried this article as well - no luck. /var/log/exim4/mainlog
records after a few minutes that the message is frozen.