Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sendmail problem using formmail

Status
Not open for further replies.

kdwuk

Technical User
Mar 16, 2006
3
GB
Hi
I have been given the following instructions to alter a perl formmail script so it now works with a more secure smtp server setup -

Existing line -
$mailprog = "/usr/sbin/sendmail";

This would need to be replaced with:
$mailprog = "/usr/sbin/sendmail -faddress\@customers-domain-name";
OR
/$mailprog = "/usr/sbin/sendmail -f$email";

The script I am using has a couple of switches (-oi -t) so I have added the -fuser switch after those but not sure if I have done so correctly as I am not a perl programmer.

I have changed all lines like '/usr/sbin/sendmail -oi -t'; in the script to '/usr/sbin/sendmail -oi -t -f$email';

The form calling the script has a field named email.
The script runs without error but does not send email to the $email address.
Can anyone see where I am going wrong?
Thanks
 
Check your errorlogs, or run the command from the command line
Code:
prompt>/usr/bin/sendmail -oi -t -fmyemail@domain.com
and see what that comes up with
HTH
--Paul

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Thanks Paul
Can't run the command line prompt as on shared hosting.
The error log doesn't show any problem at all.
I am somewhat confused as the script is working without the -fuser switch for some domains but not others.
cheers
Keith
 
Think I may have solved it.
I had added the -f switch to all lines that had the other -oi -t switches and this seemed to be wrong.
I'm testing now.
Thanks again for the swift assistance.
 
you're welcome

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top