/usr/share/doc/pycmail/examples/example.pycmailrc is in pycmail 0.1.4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | md = USERHOME+"/Mail/"
# advanced usage: spawn xtell, and write there the name or address of the sender,
# and subject.
a=os.popen("xtell "+USERNAME+" >/dev/null 2>&1", "w")
a.write("Mail from "+(ADDR_FROM[0] or ADDR_FROM[1])+":"+SUBJECT+"\n")
a.close()
# well-known spammer
if Contains(FROM, "spammer@yahoo.com"):
Junk()
Stop()
# sort mailing list: bablo@view.net.au is the address, it can be either recipient
# or in Cc:
if "bablo@view.net.au" in ADDRLIST_TO+ADDRLIST_CC:
Set(MailBox(md+"bablo"))
Stop()
# better handled mailing list, it has header X-Mailing-list
# we write it to the mailbox and forward to a friend who was too lazy to subscribe by himself
# (this is better for the network, too...)
if InHeader("X-Mailing-list", "debian-devel"):
Set(MailBox(md+"debian-devel"),
Forward("krivanek@dmpc.dbp.fmph.uniba.sk"))
# this would be equivalent to:
#Set(MailBox(md+"debian-devel"))
#Append(Forward("krivanek@dmpc.dbp.fmph.uniba.sk"))
Stop()
|