HEX
Server: LiteSpeed
System: Linux server.nevid-deploma.com 4.18.0-553.111.1.lve.el8.x86_64 #1 SMP Fri Mar 13 13:42:17 UTC 2026 x86_64
User: smilepac (1037)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //proc/1098891/root/usr/local/lib/python3.6/site-packages/agent360/plugins/mailq.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import plugins

class Plugin(plugins.BasePlugin):
    __name__ = 'mailq'
    def run(self, *unused):
        import os
        stream = os.popen("sudo /usr/bin/mailq | /usr/bin/tail -n1 | /usr/bin/gawk '{print $5}'")
        retval = stream.read()
        results = {}
        if len(retval) == 1:
            results['queue_size'] = 0
        else:
            results['queue_size'] = int(retval)
        return results

if __name__ == '__main__':
    Plugin().execute()