Created
September 18, 2011 18:59
-
-
Save 66Ton99/1225407 to your computer and use it in GitHub Desktop.
Fake sendmail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
prefix="/home/mail" | |
numPath="$prefix/.num" | |
if [ ! -f $numPath ]; then | |
echo "0" > $numPath | |
chmod 0777 $numPath | |
fi | |
num=`cat $numPath` | |
num=$(($num + 1)) | |
echo $num > $numPath | |
name="$prefix/letter_$num.eml" | |
echo "Return-Path: <[email protected]>" > $name | |
while read line | |
do | |
echo $line >> $name | |
done | |
chmod 0777 $name | |
/bin/true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have to replace sendmail_path in php.ini