def parse_args(cap, args=None, namespace=None):
    """Wrap parse_args to allow additional logic:
    - Only require --email_from/--email-to when not doing a dryrun
    """
    args = cap.parse_args(args=args, namespace=namespace)
    if 'dryrun' in args and 'email_from' in args:
        if not args.dryrun:
            if not args.email_from:
                cap.error('error: argument --email-from is required')
            if not args.email_to:
                cap.error('error: argument --email-to is required')
        else:
            if not args.email_from:
                args.email_from = '<-dryrun->'
            if not args.email_to:
                args.email_to = ['<-dryrun->']
    return args
