On Jan 13, 2005, at 1:46 PM, Richard S. Crawford wrote:
Actually, I do.  Here is the relevant code:

my $fromAddress='[EMAIL PROTECTED]';
my $toAddress='[EMAIL PROTECTED]';
my $body="Neo is down as of $timeString\n";
my $mailer=open ({From => $fromAddress, To => toAddress, Subject=>$subject});
print $mailer $body;
$mailer->close();

The PERL module you are using is almost certainly just passing off the mail to your underlying Mail Transport Agent (MTA). It looks like your home machine's MTA isn't configured correctly. You can try to send the mail directly from the command line with the command mail. Type is 'mail [EMAIL PROTECTED]' at the command line, type in a message, and terminate with a single period on a line by itself. (the way email used to be done in the old days :-) If that works, then the MTA is configured correctly.


If it isn't configured correctly.. then you'll need to configure you MTA. In the old days that would have been sendmail, configured with a file like /etc/sendmail/sendmail.cf, though I wouldn't recommend sendmail now. On my Mandrake 8.1 box it's postfix, and I think you can configure it by editing the file /etc/postfix/main.cf, and uncommenting/changing the lines for mydomain. (by default it pulls it from the gethostname() library call, but that isn't set up correctly on most small home boxes, and therefore returns 'localhost.localdomain' by default.)

If your MTA is something else (like qmail), then you'll have to figure out how to configure it properly for that MTA.. a google search should do you well there.

Alternately, you could set up your machine so that gethostname(3) returns the proper value. That's going to be distro dependent.... I'm not even sure how on my Mandrake box frankly.

  -- Mitch

_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech

Reply via email to