LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-03-2003, 09:01 PM   #1
joesbox
Member
 
Registered: Feb 2003
Location: hampton va
Distribution: ubuntu
Posts: 502

Rep: Reputation: 30
Question perl/sendmail/mailfilter help requested


first the script

#!/usr/bin/perl

open (FILE, "</home/joe/mailfilter_logs/.mailfilter.log");
@log = <FILE>;
close (FILE);

foreach $log (@log) {
if ($log =~ "@freelotto.com"){
$counter++;
}
}
open (MAIL, "|/usr/sbin/sendmail -t") || die;

print MAIL "To: joes_box@cox.net\n From: mailfilter/n";
print MAIL "Subject: Deleted mail for bonnie";
print MAIL "$counter E-mails were deleted today. send a message to bonnie \n
letting her know that the program is working";
close (MAIL);

next the question. is there a way to have this program send me an email (or someone else one) without having a full running server. i don't have a running mail server going. i ran the program and this is the output:

[joe@joes-box cgi-bin]$ ./mailfilter*
sendmail: warning: My hostname joes-box is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf
postdrop: warning: My hostname joes-box is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf
[joe@joes-box cgi-bin]$

is there a way to have this use my isp's mailserver or maybe a mail client to send the mail?? or maybe this is for a different forum but is there a way to utilize my isp's mail server to launch mail from my box kinda like emulating a mail server for my intranet? hopefully i said everything write. i am new at this server thing.
 
Old 03-04-2003, 11:07 AM   #2
joesbox
Member
 
Registered: Feb 2003
Location: hampton va
Distribution: ubuntu
Posts: 502

Original Poster
Rep: Reputation: 30
*bump* for a few more views
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl Sendmail problem sasklinuxuser Programming 2 05-28-2005 11:51 AM
Perl assistance requested... Ateo Programming 2 05-26-2005 03:01 PM
uninstall mailfilter [how to?] jimi_j Linux - Software 6 04-13-2004 05:53 PM
sendmail quits - cannot bind: Cannot assign requested address scott_r_wagner Linux - Software 5 09-14-2003 05:40 PM
Mailfilter Stophe Linux - Software 1 09-06-2003 07:03 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration