def passthrough_filter (msg, document):
    """This prints the 'from' address of the message and
    returns the document unchanged.
    """
    from_addr = msg.getaddr('From')[1]
    print from_addr
    return document
This prints the 'from' address of the message and
    returns the document unchanged.
    
recipes/Python/157437_Reading_writing_mbox_style_mailbox/recipe-157437.py