commun-smtpd (627 octets)
#!/bin/sh
Delai=6 # Intervalle en secondes entre deux verifications de la file de depart
DemonMailer="Postmaster"
PORT=2525
Tmp="/tmp/minsmtpd.$$"
FicLog="/tmp/minsmtpd.log"
BAL="./spool/mail"
Queue="./spool/mqueue"
Fic=`expr \`date +%s\` % 1000`
Fqdn="`hostname -s`.`hostname -d`"
Domaine="`hostname -d`"
ChercheLoop ()
{
[ $# -eq 1 ] && FicLoop=$1 || FicLoop=$Tmp
cat $FicLoop | while read ligne
do
[ -n "$ligne" ] || return 0
if echo "$ligne" | grep "^X-Loop:" > /dev/null
then
set -- $ligne
[ "$2" = "$DemonMailer@$Domaine" ] && return 1
fi
done
}