Solved

Can't send email via a perl script

Posted on 2004-04-30
6
1,158 Views
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.
Thankyou
0
Comment
Question by:nightgray
  • 4
  • 2
6 Comments
 
LVL 7

Accepted Solution

by:
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.
0
 

Author Comment

by:nightgray
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.
0
 
LVL 7

Assisted Solution

by:icky2000
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!
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:nightgray
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.
0
 

Author Comment

by:nightgray
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.
0
 

Author Comment

by:nightgray
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.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
In-place Upgrading Dirsync to Azure AD Connect
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 >>…
To show how to create a transport rule 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 Mail Flow >> Rules tab.:  To cr…

839 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