[email] Prefix for email recipient address

This commit is contained in:
maike 2020-07-13 14:37:35 +02:00 committed by dl6tom
parent 2815f70bf8
commit fa3d8deb95

View file

@ -27,6 +27,10 @@ async def async_main(mail=None, hood_name=None):
args = parser.parse_args() args = parser.parse_args()
# extract hood name from the envelope recipient address # extract hood name from the envelope recipient address
hood_name = args.recipient_address.split('@')[0].lower() hood_name = args.recipient_address.split('@')[0].lower()
if hood_name.startswith('kibicara.'):
hood_name = hood_name[9:]
else:
logger.error("Recipient address didn't start with 'kibicara.'")
if mail is None: if mail is None:
# read mail from STDIN # read mail from STDIN