hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Using sendmail from perl on cpanel(exim 4) server
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

Using sendmail from perl on cpanel(exim 4) server

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 07-15-2003, 03:15 AM
freakysid freakysid is offline
Web Hosting Master
 
Join Date: Dec 2000
Posts: 945

Using sendmail from perl on cpanel(exim 4) server


Hello

1) Why doesn't this work
Code:
#!/usr/bin/perl


# send an email to notify an order has been received 
open(MAIL, "|/usr/sbin/sendmail -t") || return 0;
 
select (MAIL);
print << "EOF";
To: bar@foobar.com
From: foobar@foo.com
Subject: Order Received
 
$time
 
EOF
The mail gets sent to bar@foobar.com@<host_name>
where <hostname> is the name of the server

Also, what are the correct flags for exim's sendmail accessed from a script like this?

Thanks

__________________
Vogelsang Hood 23

Reply With Quote


Sponsored Links
  #2  
Old 07-15-2003, 05:10 AM
Eric Lim Eric Lim is offline
Web Hosting Master
 
Join Date: Feb 2003
Location: Providence, RI
Posts: 1,512
Quote:
#!/usr/bin/perl


# send an email to notify an order has been received
open(MAIL, "|/usr/sbin/exim -t") || return 0;

select (MAIL);
print << "EOF";
To: bar\@foobar.com
From: foobar\@foo.com
Subject: Order Received

$time

EOF
This should work, I had a quick test on my machine and it worked.

Reply With Quote
  #3  
Old 07-15-2003, 06:59 AM
freakysid freakysid is offline
Web Hosting Master
 
Join Date: Dec 2000
Posts: 945
Hi - thanks for that. Well sendmail is just a link to exim but I noticed you had escaped the @ character in the string you sent to sendmail. Beauty! See I am not a perl guy so I really didn't know the answer.

cheers

__________________
Vogelsang Hood 23

Reply With Quote
Sponsored Links
  #4  
Old 07-15-2003, 07:12 AM
Eric Lim Eric Lim is offline
Web Hosting Master
 
Join Date: Feb 2003
Location: Providence, RI
Posts: 1,512
Well, I didn't know the answer as well. After reading some exim documentation and have this figured out.

Glad it works out.

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
cPanel & WHM Software 11.36 Reaches Stable Tier Status Web Hosting News 2013-04-09 11:44:33
cPanel Security Updates Address Perl Module Vulnerabilities Web Hosting News 2012-12-06 12:55:54
A Look at the New WHM Interface in Version 11.34 of the cPanel Hosting Control Panel Web Hosting News 2012-11-12 12:57:03
Web Hosting Control Panel cPanel and WHM Version 11.32 Adds Features, Fixes Web Hosting News 2012-04-08 11:51:35
cPanel Launches Version 11.32 of Control Panel and Web Host Manager Web Hosting News 2012-02-15 12:46:33


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?