A utility for downloading and verifying FreeBSD releases and snapshots
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

15 lines
347 B

  1. import itertools
  2. import mailbox
  3. import sys
  4. if __name__ == '__main__':
  5. cnt = itertools.count()
  6. mb = mailbox.mbox(sys.argv[1])
  7. for i in mb.itervalues():
  8. body = i.get_payload()
  9. if isinstance(body, list):
  10. continue
  11. with open('%s%04d' % (sys.argv[2], cnt.next()), 'w') as fp:
  12. print >>fp, 'Message-ID:', i['message-id']
  13. fp.write(body)