[CentOS] Specify sending machine from mailx command line?

Steve Snyder

swsnyder at insightbb.com
Mon Jan 23 17:07:40 UTC 2006


When using "mail" (from the mailx package) to send mail from the command 
line, can I specify the sending system name?

I want to mail the occasional status message to my personal e-mail account 
from a server machine.  Something like this:

  echo "New IP address: $new_ip_address" | \
        mail -s "DHCP - $interface addr change" myname at myisp.com

When I attempt to send mail from machine server.mydomain.lan my ISP sees 
incoming mail from "localhost.mydomain.lan [127.0.0.1]" and bounces it as 
being blacklisted.

Is there a way to submit an acceptable name to my ISP's mail server from 
command line e-mail?

Thanks.



More information about the CentOS mailing list