[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem sending mail from command line/script



I want to be able to check my IP every few minutes from cron and if my IP address has changed I want to send an email to a hotmail account notifying me of the change. (eventually I want to automatically reset my NAT and restart pf with the new settings, but that is the next goal) I have the script all set up that identifies the current IP and compares it with the old one, but I can't seem to get the command line util 'mail' to send the message. I always get an error message saying:

root... Connecting to localhost.mydomain.com. via relay...
root... Deferred: Connection refused by localhost.mydomain.com.

where 'mydomain' is actually my real domain name. I fairly sure that this error message happens because sendmail is configured by default to not be an open relay (which is of course a good thing). How can the default daily insecurity output in cron send an email, but my little script can't? I've tried sending the message to the local root account just to see if it had anyhting to do with sending the message outside my network, but that doesnt seem to make a difference.

I tried searching on the marc but for some reason it doesn't allow the keyword 'mail' to be used in a search. I understand why that might be excluded, but how else am I supposed to search the archives for problems with the unix command called 'mail' ? I just thought that was curious.

Matt








_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail




Visit your host, monkey.org