def filter_match(filename, recip, sender=None):
    """Check if the give e-mail addresses match lines in filename."""
    from . import Defaults
    from . import FilterParser
    filter = FilterParser.FilterParser(Defaults.DB_CONNECTION)
    filter.read(filename)
    actions, matchline = filter.firstmatch(recip, [sender])
    checking_msg = 'Checking ' + filename
    print(checking_msg)
    print('-' * len(checking_msg))
    if recip:
        print('To:', recip)
    if sender:
        print('From:', sender)
    print('-' * len(checking_msg))
    if actions:
        print('MATCH:', matchline)
    else:
        print('Sorry, no matching lines.')
