[Mimedefang] $DOMAIN or it's equivilent?

Cormack, Ken kcormack at acs.roadway.com
Tue Nov 25 08:30:32 EST 2003


-----Original Message-----
From: mimedefang at jameswcurtis.com [mailto:mimedefang at jameswcurtis.com]
Sent: Monday, November 24, 2003 5:44 PM
To: mimedefang at lists.roaringpenguin.com
Subject: [Mimedefang] $DOMAIN or it's equivilent?

::snip
> I am filtering e-mail for several different domains.  Is there a $DOMAIN
> variable or something similar.  I want to be able to graph-defang with
> reports available on a per/domain basis.
::snip::

Bill,

To get the numbers you want, you might consider doing what I do, using just
native sendmail.  In my sendmail.mc file, I copied/pasted/renamed my esmtp
"mailer" definition, which for sendmail 8.12.10 looks like this (be aware of
possible screen-wrap)

Mesmtp,         P=[IPC], F=mDFMuXa, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP,
E=\r\n, L=990,
                T=DNS/RFC822/SMTP,
                A=TCP $h

In the MAILER_DEFINITIONS section of my sendmail.mc, I cloned that entry,
and changed the "name" of the mailer to one appropriate to each domain.  For
example:

MDOMAIN1,       P=[IPC], F=mDFMuXa, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP,
E=\r\n, L=990,
                T=DNS/RFC822/SMTP,
                A=TCP $h

MDOMAIN2,       P=[IPC], F=mDFMuXa, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP,
E=\r\n, L=990,
                T=DNS/RFC822/SMTP,
                A=TCP $h

MDOMAIN3,       P=[IPC], F=mDFMuXa, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP,
E=\r\n, L=990,
                T=DNS/RFC822/SMTP,
                A=TCP $h
...and so on.

Then, in my "mailertable" file, I placed corresponding entries as follows:

domain1.com		DOMAIN1[mailhost.domain1.com]
.domain1.com	DOMAIN1[mailhost.domain1.com]
domain2.com		DOMAIN2[mailhost.domain2.com]
.domain2.com	DOMAIN2[mailhost.domain2.com]
domain3.com		DOMAIN3[mailhost.domain3.com]
.domain3.com	DOMAIN3[mailhost.domain3.com]

Read up on the mailertable feature of sendmail, if you have any questions.

Finally, using this method of mapping specific "mailers" to specific
"domains", I run the "mailstats" command.  Mailstats was created to report
the traffic statistics for each mailer.  By mapping a mailer to a domain, it
gives us a breakdown per domain, as follows (take from my machine this
morning, showing stats since midnight):
Statistics from Tue Nov 25 00:11:49 2003

 M   msgsfr  bytes_from   msgsto    bytes_to  msgsrej msgsdis  Mailer
 4     5707     113051K     4670     175433K      604    1471  esmtp
 9     1831      55296K     3565      96091K        3       2  DOMAIN1
10        3          3K        0          0K        0       0  DOMAIN2
11       35        600K       30        312K        1       0  DOMAIN3
12       15        324K        3         52K        0       0  DOMAIN4
13       10         30K      311       2299K        0       0  DOMAIN5
14       66        284K      128       2842K        0       0  DOMAIN6
16        0          0K        8         48K        0       0  DOMAIN7
17     1634      58060K      242       7859K        0       0  DOMAIN8
18      635      52167K        1         91K        0       0  DOMAIN9
19     1723      19036K      323       1590K       44       0  local
=============================================================
 T    11659     298851K     9281     286617K      652    1473
 C    12276                 9463                 2714

Hope this helps.

KEN CORMACK, RHCE
Sr. UNIX Systems Analyst,
    Open Systems Group
Sr. Software Analyst,
    TSG Midrange Systems Group
AFFILIATED COMPUTER SERVICES, INC.
    557 E. Tallmadge Ave., Akron, OH  44310
    mailto:kcormack at acs.roadway.com
    mailto:ken.cormack at acs-inc.com
    Phone: (330) 643-6372
    Fax: (330) 643-6367
    Pager: (800) 946-4646 Pin 1412819

"If that that is 'is' is that that is not 'not is', is that that is 'not is'
that that is not 'is'?  It is!" - Ken Cormack

"Sendmail administration is not black magic.  There are legitimate technical
reasons why it requires the sacrificing of a live chicken." - Unknown



More information about the MIMEDefang mailing list