email-mirror: Also accept original recipient via argv

(imported from commit 9a29fe6906713e75ee208c924b67211575c011f2)
This commit is contained in:
Luke Faraone 2014-01-30 12:25:24 -05:00
parent abc0be9c8c
commit 0f96d2229e
1 changed files with 2 additions and 2 deletions

View File

@ -132,8 +132,8 @@ def main():
class Command(BaseCommand):
help = __doc__
def handle(self, **options):
rcpt_to = os.environ.get("ORIGINAL_RECIPIENT", None)
def handle(self, *args, **options):
rcpt_to = os.environ.get("ORIGINAL_RECIPIENT", args[0] if len(args) else None)
if rcpt_to is not None:
try:
extract_and_validate(rcpt_to)