Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using mailx on my raspberry pi to try to send text messages updates for event monitoring.

  • My phone number:9876543210
  • My phone's email-to-text gateway address: 9876543210@txt.att.net

I can

  1. Send emails from my raspberry pi to various email addresses. mail -r me@somedomain.com -s "My Subject" you@someotherdomain.com < body.txt and off it goes and is successfully delivered.

  2. Send emails from various email address (not on RPi) using mailx to the above phone-email address and have them delivered as text messages.

However, when sending emails to 9876543210@txt.att.net from the Raspberry Pi using mailx the emails seem to spiral into the void and are never heard of again (no errors, no undeliverable messages, nothing). Does anyone know what could be causing this to go awry? Something about the basic deployment of the mail server on the pi?

EDIT

Based on @kobaltz's suggestion, I used sendmail instead. This led to a hang, then an error that stated that I lacked a fully qualified domain name (FQDN). I then used this website's instructions to add a domain name to the RPi. To paraphrase:

I have set the FQDN in  /etc/hostname: my-host-name.my-domain.com

and /etc/hosts:

127.0.0.1 localhost.localdomain localhost
192.168.0.5 my-host-name.my-domain.com my-host-name

Then add to /etc/mail/sendmail.cf:
MASQUERADE_AS(`my-domain.com')
MASQUERADE_DOMAIN(`my-host-name.my-domain.com')
FEATURE(`masquerade_entire_domain')
FEATURE(`masquerade_envelope')

I put this in /etc/mail/sendmail.cf, BEFORE the MAILER() lines, ran sendmailconfig, answered Yes to the questions about using the existing files, and restarted sendmail. Emails now have the proper domain name.

Progress, however, I am now stuck at the following error:

354 Enter mail, end with "." on a line by itself
>>> .
050 <9876543210@txt.att.net>... Connecting to mxx.cingularme.com. via esmtp...
050 421 Service not available
050 >>> QUIT
050 <9876543210@txt.att.net>... Deferred: 421 Service not available
250 2.0.0 q9U3ZESt021150 Message accepted for delivery
9876543210@txt.att.net... Sent (q9U3ZESt021150 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
share|improve this question
1  
try using sendmail –  kobaltz Oct 30 '12 at 3:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.