jasonc Posted September 22, 2009 Share Posted September 22, 2009 I have only just been made aware of a problem with my coding and face 100's of emails being sent to my main email account due to an incorrectly formed variable in my code!! i now wish to find out which site and script file is sending out these emails and have looked at logs provided by my host but these do not show much apart from the date and time how do i get a list of these files as someone i once knew and can not get hold of now once had this sort of thing and was able to get a list of the scripts and site urls that sent out the emails. hope someone can help out as i am now getting way to many on my phone to cope with. as i use my phone mainly for this address and can not possibly change it now. Quote Link to comment https://forums.phpfreaks.com/topic/175056-wish-to-get-log-of-scripts-that-send-out-emails/ Share on other sites More sharing options...
steviewdr Posted September 22, 2009 Share Posted September 22, 2009 See: http://wiki.kartbuilding.net/index.php/Mail_-_mutt_etc#Log_PHP_and_mail.28.29 -steve Quote Link to comment https://forums.phpfreaks.com/topic/175056-wish-to-get-log-of-scripts-that-send-out-emails/#findComment-922782 Share on other sites More sharing options...
jasonc Posted September 22, 2009 Author Share Posted September 22, 2009 See: http://wiki.kartbuilding.net/index.php/Mail_-_mutt_etc#Log_PHP_and_mail.28.29 -steve where do i put this? --- vi /etc/php5/apache2/php.ini ;sendmail_path = sendmail_path ="/usr/sbin/sendmail_wrapper" auto_prepend_file ="/etc/set_php_headers.php" vi /usr/sbin/sendmail_wrapper #!/bin/sh logger -p mail.info vhostmail: site=${HTTP_HOST}, client=${REMOTE_ADDR}, script=${SCRIPT_NAME} /usr/sbin/sendmail -t -i $* chmod 755 /usr/sbin/sendmail_wrapper vi /etc/set_php_headers.php <?php putenv("HTTP_HOST=". $_SERVER["HTTP_HOST"]); putenv("SCRIPT_NAME=". $_SERVER["SCRIPT_NAME"]); putenv("REMOTE_ADDR=". $_SERVER["REMOTE_ADDR"]); ?> --- Quote Link to comment https://forums.phpfreaks.com/topic/175056-wish-to-get-log-of-scripts-that-send-out-emails/#findComment-922907 Share on other sites More sharing options...
trq Posted September 23, 2009 Share Posted September 23, 2009 vi is a text editor for Linux, so the command... vi /etc/php5/apache2/php.ini Is saying open /etc/php5/apache2/php.ini and edit it (the php.ini file may or may not be in this same location on your system). The other two files in stevie's example will need to be created. Quote Link to comment https://forums.phpfreaks.com/topic/175056-wish-to-get-log-of-scripts-that-send-out-emails/#findComment-923410 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.