Created
January 13, 2014 09:13
-
-
Save ronaldronson/8396963 to your computer and use it in GitHub Desktop.
Resend all local mail # in php.ini write: # sendmail_path = /usr/bin/fake_sendmail.sh.
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="/var/mail/sendmail/new" | |
numPath="/var/mail/sendmail" | |
if [ ! -f $numPath/num ]; then | |
echo "0" > $numPath/num | |
fi | |
num=`cat $numPath/num` | |
num=$(($num + 1)) | |
echo $num > $numPath/num | |
name="$prefix/letter_$num.txt" | |
while read line | |
do | |
echo $line >> $name | |
done | |
chmod 777 $name | |
/bin/true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment