Commit d7e01771 authored by Eric's avatar Eric

amelioration de la gestion DKIM pour les listes de diffusion

parent dc73c44f
......@@ -48,6 +48,7 @@ if [ $? == 0 ]; then
LEXIT=1
fi
#si un des deux fichier est different on re genere tout
if [ ${LEXIT} == 0 -o ${REXIT} == 0 ]; then
echo "LEXIT = ${LEXIT} et REXIT = ${REXIT} ..."
cp /etc/opendkim/KeyTable.orig /etc/opendkim/KeyTable
......@@ -55,32 +56,31 @@ if [ ${LEXIT} == 0 -o ${REXIT} == 0 ]; then
cp /etc/postfix/transport_regexp_listes.orig /etc/postfix/transport_regexp_listes
if [ -f ${FIC} ]; then
echo "les domaines:"
for domaine in `cat ${FIC}`
do
echo " $domaine"
echo "$domaine $domaine:dkim:/etc/opendkim/dkim.private" >> /etc/opendkim/KeyTable
echo "*@$domaine $domaine" >> /etc/opendkim/SigningTable
done
cp ${FIC} /etc/opendkim/reference
rm ${FIC}
fi
echo "les domaines:"
for domaine in `cat ${FIC}`
do
echo " $domaine"
echo "$domaine $domaine:dkim:/etc/opendkim/dkim.private" >> /etc/opendkim/KeyTable
echo "*@$domaine $domaine" >> /etc/opendkim/SigningTable
done
if [ -f ${FICLISTES} ]; then
echo "les listes:"
for domaine in `cat ${FICLISTES}`
do
echo " liste $domaine"
echo "$domaine $domaine:dkim:/etc/opendkim/dkim.private" >> /etc/opendkim/KeyTable
echo "*@$domaine $domaine" >> /etc/opendkim/SigningTable
#/.*@listes\..*/ smtp:${SYMPASRV}
echo "/.*@${domaine}/ smtp:${SYMPASRV}" >> /etc/postfix/transport_regexp_listes
done
cp ${FICLISTES} /etc/opendkim/referencelistes
rm ${FICLISTES}
fi
echo "les listes:"
for domaine in `cat /etc/opendkim/referencelistes`
do
echo " liste $domaine"
echo "$domaine $domaine:dkim:/etc/opendkim/dkim.private" >> /etc/opendkim/KeyTable
echo "*@$domaine $domaine" >> /etc/opendkim/SigningTable
#/.*@listes\..*/ smtp:${SYMPASRV}
echo "/.*@${domaine}/ smtp:${SYMPASRV}" >> /etc/postfix/transport_regexp_listes
done
service postfix restart
service opendkim restart
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment