2013/07/08

dummy sendmail

[psumkin@psumkin-pc] ~
$ ls -l /usr/sbin/sendmail 
lrwxrwxrwx 1 root root 19 Oct 11  2012 /usr/sbin/sendmail -> /opt/dummy-sendmail

[psumkin@psumkin-pc] ~
$ cat /usr/sbin/sendmail 
#!/bin/sh
# should be placed as /usr/sbin/sendmail

prefix="/var/mail/dummy-sendmail"
mkdir -p $prefix
date=`date \+\%Y\%m\%d\%H\%M\%N`
name="$prefix/$date.eml"
while read line
do
echo $line >> $name
done
chmod 666 $name

[psumkin@psumkin-pc] ~
$ 

Навеяно habrahabr: Sendmail-заглушка для Linux