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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FreeBSD sendmail question

Status
Not open for further replies.

redletterrocko

Programmer
Aug 8, 2005
53
US
Hi all-

I'm rather new to BSD, but not to the *nix operating system (Debian is my flavor of choice). The former admin of my employer seemed to leave everything halfway done, and so Bugzilla was not emailing. I wrote a sendmail script that I have attached. I then found out that the admin had halfway installed qmail, disabling sendmail, but not really fully enabling qmail. So after fighting with qmail, I deinstalled qmail and installed sendmail (from /usr/ports). The script now works on my gmail account, but not my account at work, which ends in precisiontech.biz. Does anyone have any ideas why?

Code:
#!/usr/bin/perl

open (MAIL, "|/usr/local/sbin/sendmail -t");

print MAIL "To: phummer\@precisiontech.biz\n";
print MAIL "From: sendmailtestagent\@precisiontech.biz\n";
print MAIL "Subject: Sendmail Test\n";
print MAIL "This is a test of all sendmail functions.  This is only a test.  This is being sent from planck.precisiontech.biz.\n";
close (MAIL);
print "Message Sent\n";
exit;
 
redletterrocko,

That's a perl script, and my perl skills are somewhat rusty these days, but is there a space between

open (MAIL, "| and the sendmail path?

Does this script throw any errors? What version of Sendmail is installed, and did you configure a domain name?

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
Yeah, after making the post here, and no reply, I went back to the linux forum to mope with the linux geeks, and made the post. Before I knew it, I realized what the problem was. We have our internel network as the same domain name as the mail server (which is external POP). Because my email and server ssh login are the same, there's a mail account that's IDENTICAL to my email address. It was sending the mail, but locally, so I checked my local mail and found all the missing email. Any time I ran that script, it was sending it to my local mailbox. Changed the local domain to local.ourdomainname.biz and all is well. Thought I'd post the solution...
 
redletterrocko,

I'm glad to hear it all worked out.

Personally, I prefer qmail to sendmail, but to each their own.

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top