Changes

Jump to navigation Jump to search
1,908 bytes added ,  05:08, 27 September 2007
Add notes on qplogtail
Line 36: Line 36:  
or
 
or
 
  0    0  *    *  *    root    perl /usr/bin/spamfilter-stats-7.pl /var/log/qpsmtpd/'''@*''' /var/log/qpsmtpd/current
 
  0    0  *    *  *    root    perl /usr/bin/spamfilter-stats-7.pl /var/log/qpsmtpd/'''@*''' /var/log/qpsmtpd/current
 +
====qplogtail====
 +
qplogtail is a script intended to help monitor /var/log/qpsmtpd/current and extract a concise but meaningful display of what the server is doing the the current moment.
    +
qplogtail extracts 5 kinds of information:<ol>
 +
<li> Normal connections:<br>
 +
''28545 Accepted connection 4/30 from 86.139.2.73 ...''
 +
</li><li> Errors in violation of ''Instances'':<br>
 +
''5146 Too many connections: 40 >= 40.  Waiting one second.''
 +
</li><li> Errors in violation of ''InstancesPerIP'':<br>
 +
''5320 hosts_allow plugin: Too many connections from 212.100.229.201: 6 > 5Denying connection.''
 +
</li><li> Messages blocked by any qpsmtpd plugin:<br>
 +
''<nowiki>15751 logging::logterse plugin: ` 82.210.181.241      241-pra-6.acn.waw.pl  241-pra-6.acn.waw.pl    <Glasteinzhza@ask-it-here.com>          dnsbl  903    http://www.spamhaus.org/query/bl?ip=82.210.181.241    msg denied before queued</nowiki>''
 +
</li><li> Messages queued for delivery:<br>
 +
''<nowiki>15587 logging::logterse plugin: ` 128.220.32.40      miami.deuvis.com    miami.deuvis.com      <aapple@deuvis.com>  <c.wolf@ncxr.org>      queued        <200709270344.l8R3iq0b010299@deuvis.com>      No, hits=-2.6 required=5.0_</nowiki>''
 +
</li></ol>
 +
 +
Each smtp transaction will generate two lines of output containing:
 +
msgid  remote_ip  x/40
 +
msgid  remote_ip  dispostion  details
 +
 +
Sample output:
 +
# qplogtail
 +
14185  213.37.31.24    dnsbl  msg denied before queued
 +
14262  64.233.184.243  1/40
 +
14262  64.233.184.243  queued  No, hits=-101.1 required=5.0_
 +
14320  71.8.114.81    1/40
 +
14320  71.8.114.81    dnsbl  msg denied before queued
 +
14349  200.63.233.145  1/40
 +
14349  200.63.233.145  dnsbl  msg denied before queued
 +
 +
To install:
 +
cd /usr/local/bin
 +
wget -O qplogtail <nowiki>http://bugs.contribs.org/attachment.cgi?id=1379</nowiki>
 +
chmod 755 qplogtail
 +
 +
To run:
 +
qplogtail
 +
 +
 +
Direct comments or questions to [[Bugzilla:3418]]
 
----
 
----
 
[[Category:Howto]]
 
[[Category:Howto]]

Navigation menu