[Mimedefang] Off-Topic - Was "$DOMAIN or it's equivilent?"

Cormack, Ken kcormack at acs.roadway.com
Wed Nov 26 08:50:14 EST 2003

-----Original Message-----
From: Bill Curtis [mailto:mimedefang at jameswcurtis.com]
Sent: Tuesday, November 25, 2003 5:11 PM
To: mimedefang at lists.roaringpenguin.com
Subject: RE: [Mimedefang] $DOMAIN or it's equivilent?


> I am wanting to offer access to the domain specific statistics to the
> domain administrator viewing via the web.  Thanks for the cool tool on the
> mailstats, I compiled sendmail with it when I installed, but I've never
> gotten around to figuring out how to use it.  The only problem I have is
> in my sendmail.mc file (stock redhat sendmail.mc)the only thing refrencing
> mailer is:
> mailer(smtp)dnl


> Is the rest of your definiton something you added, or are you talking
> about the sendmail.cf file?


Look in your current sendmail.cf file, search for "Mesmtp".  You can copy
that definition into your sendmail.mc file, in a section labeled
LOCAL_RULESET section.)  If you dont have a LOCAL_RULESET section, just
create a MAILER_DEFINITIONS section at the bottom of your .mc file.  (I
havent looked at a stock redhat mc file in years.)  Copy the "Mestmp" line
from your sendmail.cf file... paste it into the .mc, then edit the "label"
of the mailer definition you just pasted (the "Mesmtp") to say something
like "Myourdomain".

The other half of getting this running is to ensure your .mc file contains
the foillowing FEATURE directive:

	FEATURE(`mailertable',`hash -o /etc/mail/mailertable')

That file should then include something like the following:

your_domain.com        YOURS:[mailhost.your_domain.com]
.your_domain.com       YOURS:[mailhost.your_domain.com]
my_domain.com          MINE:[mailhost.my_domain.com]
.my_domain.com         MINE:[mailhost.my_domain.com]
our_domain             OURS:[mailhost.our_domain.com]
.our_domain            OURS:[mailhost.our_domain.com]

Rebuild your sendmail.cf from your modified .mc file and restart sendmail.

Sendmail will automatically start adding your new "mailers" to the output of
mailstats, only after it has routed at least one message using a mailer.  If
it hasnt routed anything yet with the new mailer, it "has no stats to
report", and thus will be "silent" about that mailer.

If you have everything set up correctly, mail the comes to your server,
intended for user at you_domain.dom will get routed to
mailhost.your_domain.com.  In the mailstats output, you'll then start seeing
things like:

Statistics from Tue Nov 25 07:50:25 2003
 M   msgsfr  bytes_from   msgsto    bytes_to  msgsrej msgsdis  Mailer
 4       39        290K        0          0K        0       0  esmtp
 blah    blah      blah      blah       blah      blah   blah  YOURS
 blah    blah      blah      blah       blah      blah   blah  MINE
 blah    blah      blah      blah       blah      blah   blah  OURS
 9        1          5K       40        372K        0       0  local
 T       40        295K       40        372K        0       0
 C       41                    0                    0

Be sure to have cron truncate the /etc/mail/statistics file nightly, so
you'll get new totals daily.

Sr. UNIX Systems Analyst,
    Open Systems Group
Sr. Software Analyst,
    TSG Midrange Systems Group
    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