Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to configure 'mail' (not sendmail)

Status
Not open for further replies.
Sep 18, 2002
31
US
Hi all,

I'm trying to use the 'mail' program to notify me (& a couple other admins) of the output of a cron job, but I've not found out how to specify the IP address of the server that we use to route mail internally. The command I'm using is:

[tt]echo <foo> | mail -s &quot;Output from <bar>&quot; admin(a)domain.com[/tt]

where 'foo' is the output from the 'bar' script.

Oddly enough, mail goes out just fine to external addresses, but appears to go straight to /dev/null when I try to specify an address internal to the company... There's no indication that anything's wrong when I attempt to send to internal addresses, in fact, the command returns '0' when I check it's output (echo $?)...

I've tried reading the 'mail' man page (which references the &quot;Mail Reference Manual&quot;), but didn't see how to check/specify the mail gateway, and I've not had much luck finding the &quot;Mail Reference Manual&quot;... The mail.rc file provided no clues, nor did I find a .mailrc file in any user's home directory... Anyone?

Thanks in advance,

T.
 
Does your network share the same internet connection? The reason I ask is because it seems to be very common to not be able to access domains or sub-domains on the same net unless you list them all in the /etc/hosts file. Windows uses the same kind of file. I think the path is c:windows/Hosts. If you're not using sendmail's alias or virtusertable databases, then you can create procmail recipes. You should be able to run a search for &quot;procmail&quot; and get all the info you need for setting up recipes.
 
Yes, it's all on the same internet connection. FWIW, the mail server runs M$ Exchange, and I'm not seeing anything in the logs to tell me that it is dropping the messages...

I just wonder what path the mail is taking, whether it's hitting the Exchange server, or whether it's hitting the default mail gateway that's run by our ISP... (???)

BTW, thanks for the reply!

T.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top