'-r', '--respond', default=False, action='store_const', const=True,
help=('Send automatic response emails to acknowledge incoming '
'messages.'))
+ mailpipe_parser.add_argument(
+ '-t', '--trust-email-infrastructure',
+ default=False, action='store_const', const=True,
+ help=('Send automatic response emails even if the target has not '
+ 'registered a PGP key.'))
todo_parser = subparsers.add_parser(
'todo', help=_todo.__doc__.splitlines()[0])
else:
kwargs[attr].extend(course.find_people(name=person))
for attr in ['dry_run', 'mailbox', 'output', 'input_', 'max_late',
- 'old', 'statistics']:
+ 'old', 'statistics', 'trust_email_infrastructure']:
if hasattr(args, attr):
kwargs[attr] = getattr(args, attr)
elif args.func == _test_smtp:
def mailpipe(basedir, course, stream=None, mailbox=None, input_=None,
output=None, continue_after_invalid_message=False, max_late=0,
+ trust_email_infrastructure=False,
handlers={
'get': _handle_get,
'submit': _handle_submission,
handler(
basedir=basedir, course=course, message=message,
person=person, subject=subject,
- max_late=max_late, dry_run=dry_run)
+ max_late=max_late,
+ trust_email_infrastructure=trust_email_infrastructure,
+ dry_run=dry_run)
except _InvalidMessage as error:
error.course = course
error.message = original