l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2005 Jan 13 14:08

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Perl programming problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Perl programming problem

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

my $fromAddress='rcrawford@unexmail.ucdavis.edu';
my $toAddress='rcrawford@unexmail.ucdavis.edu';
my $body="Neo is down as of $timeString\n";
my $mailer=open ({From => $fromAddress, To => toAddress, Subject=>$subject});
print $mailer $body;
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 rcrawford@unexmail.ucdavis.edu' 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

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.