LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 05-05-2001, 08:34 AM   #1
oulevon
Member
 
Registered: Feb 2001
Location: Boston, USA
Distribution: Slackware
Posts: 438

Rep: Reputation: 30

If I wanted to use a Perl script to redirect my email, where on my system should this script go? Thanks for any help.
 
Old 05-11-2001, 09:42 PM   #2
doodah
Member
 
Registered: Apr 2001
Location: Columbus,OH
Distribution: slackware
Posts: 122

Rep: Reputation: 15
is it a remote pop3 account, if so what are you using to get your email? or is it your local mailbox, like root@yourBox?

_peace
 
Old 05-12-2001, 06:35 AM   #3
oulevon
Member
 
Registered: Feb 2001
Location: Boston, USA
Distribution: Slackware
Posts: 438

Original Poster
Rep: Reputation: 30
It's a local mailbox on my own system.
 
Old 05-17-2001, 10:02 PM   #4
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
Question confused

The location of the script wouldn't make any difference - its function would still be the same - or am I missing something?

Have you considered using a .forward file in your home directory?

cheers

Jamie...
 
Old 05-18-2001, 12:21 AM   #5
oulevon
Member
 
Registered: Feb 2001
Location: Boston, USA
Distribution: Slackware
Posts: 438

Original Poster
Rep: Reputation: 30
I'm not sure. That's why I asked. I figured the script had to be located somewhere specific.
 
Old 05-18-2001, 06:59 AM   #6
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
Cool,

The script doesn't *need* be be anywhere specific but I would put it in the user home directory, partially for the sake of being tidy, and partially to stop other users from reading it (this may not be an issue on a small home system). Then I'd run it from Cron (see 'man crond' and 'man crontab' for more detail) so that it was executed at regular intervals.

Do you know about .forward files? If you create a file in your home directory called .forward and put in that file an email address any mail for that user will be redirected for you. Is this what you were going to do with the Perl script or was it something more complex?

Cheers.

Jamie...
 
Old 05-18-2001, 12:41 PM   #7
oulevon
Member
 
Registered: Feb 2001
Location: Boston, USA
Distribution: Slackware
Posts: 438

Original Poster
Rep: Reputation: 30
Actually,
I was just creating an auto-reply. I was going to append a message saying why'd you send me this, and then I was going to reverse all the characters in the original message. I know it's stupid, but I had some free time and I was playing around in Perl. How exactly do those .forward files work? Is it just a shell script?
 
Old 05-18-2001, 12:45 PM   #8
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
Playing around with Perl is probably the best way to learn it

If you create a .forward file in the home directory of a user, and chmod that file so its 644, in the file put another email address (literally a single line with an email addres on it) then send mail to that user.

The system should read the .forward file, and forward the email to that address rather than delivering it locally. I think this functionatlity is provided directly by sendmail but it might be procmail, it seems to exist on most systems I've used though.

Cheers.

Jamie...
 
Old 05-18-2001, 12:48 PM   #9
oulevon
Member
 
Registered: Feb 2001
Location: Boston, USA
Distribution: Slackware
Posts: 438

Original Poster
Rep: Reputation: 30
Jamie,

Thanks for your quick reply. I'll definitely check out that .forward file.
 
Old 05-22-2001, 11:14 AM   #10
SenthamizhSelvan
LQ Newbie
 
Registered: May 2001
Posts: 1

Rep: Reputation: 0
Post Apache Webserver in Linux

Dear Friends,

I got a problem in working with CGI PERL. I was placed my hello.pl (PERL Program) in cgi-bin directory in Apache server in Linuc Machine. But I couldn't get the result.I got the error 'File Not Found' Error.

Can u help me ..

Regards,
Senthamizh Selvan.
 
Old 05-30-2001, 10:20 PM   #11
drudnev
LQ Newbie
 
Registered: May 2001
Posts: 4

Rep: Reputation: 0
Make sure you specify the full path to the file
 
Old 05-30-2001, 10:57 PM   #12
doodah
Member
 
Registered: Apr 2001
Location: Columbus,OH
Distribution: slackware
Posts: 122

Rep: Reputation: 15
if you post new topics under the main forum they will get more attention....
 
Old 05-31-2001, 06:54 AM   #13
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
Re: Apache Webserver in Linux

Quote:
Originally posted by SenthamizhSelvan
I got a problem in working with CGI PERL. I was placed my hello.pl (PERL Program) in cgi-bin directory in Apache server in Linuc Machine. But I couldn't get the result.I got the error 'File Not Found' Error.
Check the path is correct as already mentioned but also you will need to enable execution of CGI scripts on the server. If you want to be able to execute them anywhere (not the best for security, but the lazyiest) you can add
Code:
ExecCGI
to the options for '/' in httpd.conf. You'll also want to check that

# To use CGI scripts:
#
AddHandler cgi-script .cgi
AddHandler cgi-script .pl

is uncommented too.

HTH

Jamie...

PS - Also as mentioned before, start a new thread!!
 
  


Reply



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
a perl question thanhVic Programming 1 03-13-2005 02:45 AM
a perl question thanhVic Linux - Newbie 2 03-12-2005 05:04 PM
Hiding code in PERL, perl gui question randomx Programming 1 06-26-2004 03:22 PM
perl question eph Programming 4 04-04-2004 09:51 PM
perl(Cwd) perl(File::Basename) perl(File::Copy) perl(strict)....What are those? Baldorg Linux - Software 1 11-09-2003 08:09 PM

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

All times are GMT -5. The time now is 03:06 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