Koozali.org: home of the SME Server

pointing script to mail server?

thesynic

pointing script to mail server?
« on: March 28, 2003, 03:59:32 AM »
I'm running http and mail server and I want to point a script at the mail server. Where should I direct it? I want to know what I need to include, the path to use. ie- # $mailprog = '/usr/lib/sendmail -i -t'; I can't get my form to email my account correctly. Thanks.

CAM

Re: pointing script to mail server?
« Reply #1 on: March 28, 2003, 04:21:08 AM »
Create a PHP page and substitute as required.

$MP = "/usr/sbin/sendmail -t";
$fd = popen($MP,"w");
fputs($fd, "To: $outRecipient\n");
fputs($fd, "From: $senderName <$senderAddress>\n");
fputs($fd, "Subject: $outsubject\n");
fputs($fd, "X-Mailer: PHP4\n");
fputs($fd, $outMessage);
pclose($fd);
?>


Hope its usefull to you. Good Luck!

thesynic

Re: pointing script to mail server?
« Reply #2 on: March 28, 2003, 04:30:22 AM »
Sorry, I think I am in over my head here. I am trying to use a CGI script like formmail.pl on my server and have it mail me the form using my mail server. The script variable I am trying to find is the default path to my mail server. I appreciate your help very much. Thanks for your reply.

James

Re: pointing script to mail server?
« Reply #3 on: April 25, 2003, 04:20:00 AM »
Thanks CAM. Like the synic, I'm trying cgi, not php, but your source helped me locate my sendmail in '/usr/sbin' as well. I found a link from '/usr/sbin/sendmail' to the true location in '/var/qmail/bin/sendmail'. Try these locations. If these don't work, then be sure you've already tried 'which sendmail'. If that fails, there's always bruteforce: 'find / -name sendmail 2> /dev/null'

Brascoe

Re: pointing script to mail server?
« Reply #4 on: July 31, 2003, 01:24:28 AM »
Hi there,

Did any of you make the formmail.pl to work?

Because I'm also having problems with it :-(

/ Brascoe

Dave Liquorice

Re: pointing script to mail server?
« Reply #5 on: August 02, 2003, 01:56:16 PM »
Are you aware of the security/mail relay exploits that some versions of formail.pl are vulnerable to?

Cheers
Dave.

Brascoe

Re: pointing script to mail server?
« Reply #6 on: August 02, 2003, 02:29:37 PM »
Dave Liquorice wrote:
>
> Are you aware of the security/mail relay exploits that some
> versions of formail.pl are vulnerable to?
>
Yes, I'm aware of the security issues with the older versions.

But, still i need help to get to work with qmail.

Anyone please?

/ Brascoe