Better Living Through Thinking

Finding Mail Senders

Thu, 17 May 2007

mailsender finds all of the email addresses sending to a given recipient (e.g., joe@here.tld) in one or more logfiles (assumes modern sendmail-style log format with 'sm-mta' lines, etc.) This will not work for any other kind of MTA (e.g., exim, postfix, qmail, etc.)

Usage:

mailsender joe@here.tld /var/log/maillog /var/log/maillog.0.gz ...

or using shell globbing:

mailsender joe@here.tld /var/log/maillog*

Output is the all of the sender email addresses, followed by how many times they attempted to send (which may be exacerbated by greylisting or other temporary failures, etc.):

travel@travelrefer11.info (1)
keystone@superlsp2.net (1)
ret@peddirectline.com (1)
info@cheapseos.com (1)
bounce@paycallnow.com (1)
SinglesConnection@mainread.com (1)
travel@travelrefer10.info (1)
inquiries@cigna.com (1)
PrescottFinancial@vendhouse.com (1)
GuyWiggins92@yahoo.co.uk (1)
offer@danielabff.net (1)
RazorSmart@myheaventime.com (1)
MillionaireTrainingGuide@friendmeter.com (1)

Current version: 0.90 (1.1 2007/05/17 17:39:59)

Download:

<mailsender>

Installation:

Move the file into your path somewhere (e.g., /usr/local/sbin) and:

chmod 755 /usr/local/sbin/mailsender
[ category: /sysadmin | link: finding_mail_senders ]

Audio Broadcast

(standby)

Moon Status

Phase: 64.18%
Illuminated: 81.43%
Age (days): 18.95
moon phase 0.641804312526021 Fri Jul 30 11:21:52 MDT 2010