4
# copy this to your home dir and make a .forward file like this:
10
# edit config vars below to match your bot's config
12
__copyright__ = 'this file is in the public domain'
14
import socket, sys, re
24
z = '%s %s %s' % (passwd, printto, what)
26
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
27
sock.sendto(z, (host, port))
29
fromre = re.compile('^From: (.*)\n', re.M)
30
subjectre = re.compile('^Subject: (.*)\n', re.M)
35
a = sys.stdin.readlines()
41
frm = b.group(0).strip()
42
c = subjectre.search(i)
44
subject = c.group(0).strip()
51
result = "%s %s" % (frm, subject)