aboutsummaryrefslogtreecommitdiffstats
path: root/pygn2m
diff options
context:
space:
mode:
Diffstat (limited to 'pygn2m')
-rwxr-xr-xpygn2m10
1 files changed, 3 insertions, 7 deletions
diff --git a/pygn2m b/pygn2m
index 4acd2f2..ffe0573 100755
--- a/pygn2m
+++ b/pygn2m
@@ -100,17 +100,16 @@ try:
# reads stdin and parses article separating head from body
n2m.readfile()
-# n2m.parsearticle()
"""phase 2:
check whitelist for user's permission
"""
# make a first check of From: address
- owner = wl.checkfrom(n2m.nntpheads['From'])
+ owner = wl.checkfrom(n2m.message['From'])
if owner is None:
if sys.stdin.isatty() == 1 or args.test:
- print ('"%s" is not in whitelist!' % (n2m.nntpheads['From'][:-1]))
+ print ('"%s" is not in whitelist!' % (n2m.message['From'][:-1]))
else:
wl.logmsg(n2m.nntpheads, wl.DENY)
@@ -123,8 +122,6 @@ try:
format rfc 822 headers from input article
"""
- n2m.mergeheads() # make unique dict from NNTP and SMTP dicts
-
n2m.addheads() # add some important heads
n2m.renameheads() # rename useless heads
n2m.removeheads() # remove other heads
@@ -133,8 +130,7 @@ try:
# prints formatted email message only (without send) if user wants
if args.verbose:
- for line in n2m.headers:
- print(line)
+ print(n2m.message.as_string())
if owner is None:
sys.exit(1)