[NBLUG/talk] How to set FROM field in script-generated email?

Troy Arnold troy at zenux.net
Mon Nov 5 16:07:15 PST 2007


 On Mon, Nov 05, 2007 at 02:10:19PM -0800, Dave Sisley wrote:
> Hey:
> 
> I use a couple of scripts to send out some emails, using mutt in the 
> shell script.  I'd never noticed that the FROM field was blank in these 
> emails.
> 
> One recipient has a mail.com address, and that email would not go 
> through.  I added 'export EMAIL=myaddress at work' to my .bash_profile and 
> tried sending an email (from a script) to my sonic address.  It was 
> blocked -  "(reason: 554 5.7.1 localhost.localdomain isn't valid for 
> HELO/EHLO, please fix your server.)".  Sonic won't accept my email, 
> either, since I don't have a real domain name for my box.


This message is referring to the hostname of your local machine.  Mutt
hands off delivery off the message to the local MTA; it doesn't do SMTP
itself.

So, you can use another scriptable client that does do SMTP (sorry, no
suggestions), or configure your local MTA to send a valid HELO.  That
should be whatever your reverse IP address is.  If you're on on a sonic DSL
account it would be something like: 69-12-131-nnn.dsl.static.sonic.net

Also, if you have a static IP address from Sonic, they've got a nice tool
to set your own reverse DNS.

-troy




More information about the talk mailing list