diff options
Diffstat (limited to 'pygn2m')
-rwxr-xr-x | pygn2m | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -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) |