HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   Trying to use this script.... (http://www.howtoforge.com/forums/showthread.php?t=61658)

Galopete 30th April 2013 02:10

Trying to use this script....
 
Hello,

I'm trying to use the script: How To Log Emails Sent With PHP's mail() Function To Detect Form Spam

But i have this errors in my apache log:

Quote:

PHP Notice: Undefined variable: mail in /usr/local/bin/phpsendmail on line 21
PHP Notice: Undefined index: PWD in /usr/local/bin/phpsendmail on line 33
Im using Open Suse 12.3, Apache 2.2.22 and PHP 5

Any idea?

Thanks in advance.

Abraham

till 30th April 2013 08:38

Theseare notices and not errors, so the script works. If you dont want to see developer notices then you can change theberror reporting level in php.ini.

Galopete 30th April 2013 10:36

Quote:

Originally Posted by till (Post 296478)
Theseare notices and not errors, so the script works. If you dont want to see developer notices then you can change theberror reporting level in php.ini.

Thank you Till, for your response.

This morning i have seen if the scripts works because i have my server took with a spammer, I think it's a php script in joomla. The cuestion is, there is no data on /var/log/mail.form..

Each time somebody is sending a spam, there is a report on apache's log appearing this info.
Quote:

PHP Notice: Undefined index: PWD in /usr/local/bin/phpsendmail on line 33
PHP Notice: Undefined variable: mail in /usr/local/bin/phpsendmail on line 21
PHP Notice: Undefined index: PWD in /usr/local/bin/phpsendmail on line 33
PHP Notice: Undefined variable: mail in /usr/local/bin/phpsendmail on line 21
PHP Notice: Undefined index: PWD in /usr/local/bin/phpsendmail on line 33
PHP Notice: Undefined variable: mail in /usr/local/bin/phpsendmail on line 21
PHP Notice: Undefined index: PWD in /usr/local/bin/phpsendmail on line 33
PHP Notice: Undefined variable: mail in /usr/local/bin/phpsendmail on line 21
PHP Notice: Undefined index: PWD in /usr/local/bin/phpsendmail on line 33
PHP Notice: Undefined variable: mail in /usr/local/bin/phpsendmail on line 21
PHP Notice: Undefined index: PWD in /usr/local/bin/phpsendmail on line 33
One thing, I'm using postfix, not sendmail, but i've seen you are using the sendmail binary in the script, is this OK?

Many thanks again..

till 30th April 2013 11:08

Quote:

One thing, I'm using postfix, not sendmail, but i've seen you are using the sendmail binary in the script, is this OK?
Thats ok,postfix has a sendmail binary as well.

Most likely the script can not log to the /var/log directory. Try to change the log file path in the script to e.g. /tmp/mailform.log


All times are GMT +2. The time now is 17:56.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.