LinuxQuestions.org
Visit Jeremy's Blog.
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 03-11-2002, 05:18 PM   #1
Stingreen
Member
 
Registered: May 2001
Location: Baltimore,MD,USA,Earth,Some Galaxy, We haven't gone that far!
Distribution: Redhat 7.3
Posts: 104

Rep: Reputation: 15
Very short PERL question.


Guys, I have a mailform which has a variable that shows the
mailprogram as
"$mailprog = '/usr/sbin/sendmail '
However, as you can see this only works if sendmail is local but I want to use a remote mail server..
How do I change the variable so that my remote mail server understands it?
Well, typing an IP is not working..
Any ideas?
Thank you..
 
Old 03-11-2002, 06:23 PM   #2
nitr0gen
LQ Newbie
 
Registered: Feb 2002
Distribution: Homemade Slakware
Posts: 14

Rep: Reputation: 0
Lightbulb Perl CPAN

Don't you know what Perl CPAN modules are?
if not take a closer look at:
www.perl.org/CPAN

I found this module pretty interesting for you:
http://search.cpan.org/search?dist=Mail-Sender

Good luck
 
Old 03-11-2002, 07:00 PM   #3
Stingreen
Member
 
Registered: May 2001
Location: Baltimore,MD,USA,Earth,Some Galaxy, We haven't gone that far!
Distribution: Redhat 7.3
Posts: 104

Original Poster
Rep: Reputation: 15
Ok, here's the deal..
We have a RH 7.1 apache web server which we're hosting 5 domains. These are all basic personal homepages.
Whatever, now a customer asked if we could support formmail (formmail is located in apache, )or not. So we said yes..
We already have the script , since we don't use the apache server and mail server together, we have to redirect the $mailprog variable to our remote mail server. I'm looking for a solution for that.
My search on the web turned up to be unsuccesfull, all variables defined as, ... /usr/sbin/sendmail ' which is stupid. I mean all the people around the world using their web servers as mail server just a stupid line said so?????
Any other ideas, I couldn't find anything in CPAN at all,
Ok there are scripts and everything but they are all the same..
Thank you..

Last edited by Stingreen; 03-11-2002 at 07:02 PM.
 
Old 03-14-2002, 10:42 AM   #4
jrmann1999
Member
 
Registered: Feb 2001
Location: Texas
Distribution: Slackware, Mandrake, LFS
Posts: 306

Rep: Reputation: 30
Just becuase you have sendmail on your server doesn't necessarily make it need to be a mailserver. Rudimentary linux boxes should have a form of a mail delivery utility to receive system errors and such. I'd suggest putting a basic sendmail package on the box and deny all access from anything but localhost(this *should* prevent hacks).

Alternatively you could write a lovely little perl piece named sendmail that redirects the message in it's entirety to the actual sendmail server, tho you have to know a lot about what's going on for this to occur.
 
Old 03-15-2002, 09:59 AM   #5
lavelle
LQ Newbie
 
Registered: Mar 2001
Location: Dallas TX
Distribution: RH7.2 RH7.0
Posts: 12

Rep: Reputation: 0
what about MIME::Lite

I stopped using sendmail when I found MIME::Lite

This one package will open a socket to the machine receiving the mail (by looking up the MX records) and deliver it bypassing all executables on your local machine, it would probably even work on a Winders machine.

Two down sides:
1) The program hangs while the lookup and delivery occur so you may need to fork before you invoke the send method.
2) Code already written to pipe things in to sendmail need to be re-coded.
 
  


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
Short question about wine fatum112 Linux - Software 1 11-23-2005 09:50 AM
Not your regular GRUB question - just a short question for a fried MBR!! ziphem Linux - General 3 01-31-2005 01:51 PM
short modules question anadyr Slackware 1 01-02-2005 05:03 PM
A short question about compiling again Al Bundy Linux - Newbie 3 06-12-2003 06:48 AM
Permission question, (short) Stingreen Linux - General 5 03-14-2002 11:19 PM

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

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