Skip to content

Instantly share code, notes, and snippets.

@Aleksandr-ru
Last active September 8, 2017 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Aleksandr-ru/e72d75bc8e207dd9ba11c2b0795a0936 to your computer and use it in GitHub Desktop.
Save Aleksandr-ru/e72d75bc8e207dd9ba11c2b0795a0936 to your computer and use it in GitHub Desktop.
Fake Sendmail
#!/bin/sh
DIR="/tmp/fake_sendmail"
EXT=".eml"
[ ! -d $DIR ] && mkdir $DIR && chmod 0777 $DIR
NAME=`date +%s.%N`
FILE="$DIR/$NAME$EXT"
while read line
do
echo $line >> $FILE
done
/bin/true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment