dummy sendmail
0
Lets say you are developing an app that sends mail, but you don’t want to actually send any mails out.
The answer for your quest is “dummy sendmail”
1 2 3 4 5 6 7 8 9 |
#!/bin/bash # replace the /usr/bin/sendail with this shell script. # Everytime someone sends a mail, the content of the mail will be written to a file under /tmp/mail.20150203.log TS=`date "+%Y%m%d"` FN="/tmp/mail.$TS.log" cat - >> $FN echo "=== End Of Message Received ===" >> $FN |