Forum Astuces.divers petit script pour rechercher un historique de transaction email

Posté par  . Licence CC By‑SA.
8
25
sept.
2014

principalement en utilisant le log postfix au format par defaut au jour de publication de ce script

#!/bin/sh
#
# small script that search mail address within from or to
# and show the whole transaction log by email ID

case $# in
        3)
        count=0
        sens=$1
        motif=$2
        file=$3
        case $sens in
                from)
                        search='from=<'$motif
                ;;
                to)
                        search='to=<'$motif
                ;;
        esac
        for i in $(grep 
(…)