geekaction.com

home ·  aggregator ·  blogs ·  forums
post blog ·  post story ·  post weblink
  
 

Postfix email tracing

 
By simon at Tue, 11/03/2008 - 16:33 | simon's blog | login or register to post comments | 704 reads

If you're not sure whats happening with an email, create a small script like this in /usr/local/bin/email-checker.sh


#!/bin/sh
for i in `grep $1 /var/log/mail.log | grep "postfix/smtp" | cut -d']' -f2 | cut -d':' -f2 | sort | uniq`
do
echo "------------------------------------"
grep $i /var/log/mail.log
echo "------------------------------------"
done

And then you can check whats been going on with email-checker.sh who@somewhere.com

Save a bit of trying to grep/less/find etc..

 
  
Proudly Open Source powered by drupal.
Check out these affiliate sites: fishaction.com · dirtaction.com · footyaction.com · craftaction.com
Content (c) Iseek Computing - click here to send feedback