Can't send email via a perl script

Posted on 2004-04-30
Last Modified: 2010-05-18
Sorry about my lack of knowledge here, I am a newbie.
We recently moved our website from an ISP (unix based) to our MS Exchange 2000 server which is using IIS 3.0 and is behind a cisco firewall.  We are having problems getting our perl scripts (formmail and soupermail) to send emails.  We currently send and recieve emails through microsoft outlook throughout our network without a problem.

Steps that I have taken -

1. I verified that the scripts are working fine.  The perl scripts execute without any errors.
2.  Following the help files from soupermail script,  I downloaded and installed net:smtp for NT from libnet - still no luck there
3.  I tried downloading and installing windmail.  windmail is able to send mail from a dos command prompt windmail -i, however it still cannot send mail through a script even using their test script they provided
4. then I tried downloading and installing the latest formmail script for NT and also downloaded and installed devmailer.  Still no help there.  Script appears to execute fine but no email gets sent
5.  Yes I even tried using blat to no avail
6. I double checked and triple checked that I have the permissions properly set to allow scripts and executables for the entire path where I installed the programs
7.  I followed the help files for devmailer where it had me go into component services and add an application.
8.  I checked over and over again the path in the test scripts that were provided for each program to ensure that they were right..

bottom line is that I"m stuck.. I don't care which mailprog I use as long as I can get one of them to work..  supposably net:smtp doesn't need a mailprog but in any case.. I just would like to be able send email from my perl scripts again..  any help would be much appreciated.
Question by:nightgray
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2

Accepted Solution

icky2000 earned 250 total points
ID: 10970745
Is the computer that is running the Perl scripts different than the Exchange server? Are you sending to recipients that exist in your Exchange server or are the recipients external (not on your Exchange server)?

The answers to those questions will help. My suspicion is that you are running the Perl scripts on a different computer and sending to external recipients. If that is the case, when you try to submit these messages to the Exchange server, it thinks you are trying to relay off the server like a spammer so it won't accept the mail. To allow the computer running the Perl scripts to relay off Exchange, you need to add its IP address in the Relay section on the Access tab of the SMTP virtual server (you'll find the SMTP virtual server in Exchange System Manager under <servername>\Protocols\SMTP).

If my assumptions were wrong, it is something else  - post the answers to those questions and it will help narrow it down further. Plus, do you get any sort of error from any of the different approaches you have used? Any errors received might also be helpful.

Author Comment

ID: 10974234
I used ws_ftp pro to copy the web files directly from our old ISP to our Exchange server.  This included the cgi-bin that entailed the perl scripts.  FYI perl is located in another directory on the server.

I read somewhere that I needed to turn the cgi-bin folder into a virtual directory.  I'm not sure how that would solve anything, but I tried that too.  I switched the cgi-bin folder back and forth between a virutal directory and regular folder with every mail prog to see if it would solve the problem.  It obviously didn't.  As it stands now the cgi-bin folder is a virtual directory.  Just thought I'd mention this in case it has any significance.

As for the recipients, I changed that on day one.  At first, I had the perl scripts addressed to myself on the server and to myself at my local ISP I use at home.  I had it addressed this way simply for test purposes.  However, as soon as I started to have problems, I changed the email recipient to just the address on the server (easier when having problems to simply check 1 email box).  Thank you for the info about the IP address in the Relay section though.  Eventually I would need to address that issue when the perl scripts start sending email again. No pun intended.

As for errors, I have found none.  That's the thing that's got me stumped and quite frustrated.  If there was an error I could look it up, or at least narrow it down to a certain area. I receive nothing from either the perl scripts themselves nor from any of the mail program log files.  I know the perl scripts are working too, since the fields within the web page are validating and the web page gets redirected on submit to the thank you page like it is suppose to.

The only thing I have thought of and that I will check on monday is that the mail programs generally default to using C:\temp for their log files.  With hardly any space on C (due mostly to mirroring), I currently have all the web files on the E:\ drive/partition.  I'll double check that the temp folder is allowing the log files access to the temp folder in order to report the errors.  I believe that it is, but I'll double check on Monday.

I hope that helps narrow it down.

Assisted Solution

icky2000 earned 250 total points
ID: 10974915
Thanks for the extra info. Unfortunately, I don't have any further leads here. It certainly doesn't appear to be an Exchange issue but must be something with the scripts or the web piece - neither are my specialty. Hopefully someone else will have a great idea here - good luck!
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 10980702
Okay, let's say it is the script that is causing the problem.  I can see this causing the problem too since the original configuration of soupermail called for the sendmail program on the unix server.

Does anyone know exactly what needs changed in the soupermail script version 1.08 to make it work with windmail mail program?  I used souperfinder and the soupermail install and changed all of the configuration changes that it told me to.  What else in the script needs to be changed?  The script is rather large, so if someone needs it, let me know where to email it.  If it is okay to paste it here I could do that as well.

Author Comment

ID: 10981238
Actually i need to edit my last post... Supposably the soupermail script does not need the windmail mail program to work.  So If anyone has a solution as to how to make the script work without using the windmail program I'll take that too.  I need this script to send email on the ms exchange server I"m on.  Any information that anyone has would be appreciated.  Thank you.

Author Comment

ID: 10986947
I figured it out!  I fixed the temp file so that the soupermaillog file could be accessed.  After that, I could read the log file and it told me what was wrong with the script.  I fixed the script and then after I fixed the relay section everything was back to normal.  Thank you icky2000 for your response.  There were so many different areas I was looking at and you helped me narrow it down to where the problem actually was.  Thank you.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
In this video we show how to create a Distribution Group in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >>…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question