remove emails prefix
This commit is contained in:
parent
b9066a8f59
commit
432259d459
|
|
@ -335,7 +335,7 @@ def _process_email(event, context):
|
||||||
if recipients:
|
if recipients:
|
||||||
domain = recipients[0].split('@', 1)[1]
|
domain = recipients[0].split('@', 1)[1]
|
||||||
bucket = domain_to_bucket(domain)
|
bucket = domain_to_bucket(domain)
|
||||||
prefix = f"emails/{msg_id}"
|
prefix = f"{msg_id}"
|
||||||
print(f"SES event: domain={domain}, bucket={bucket}, prefix={prefix}")
|
print(f"SES event: domain={domain}, bucket={bucket}, prefix={prefix}")
|
||||||
resp_list = s3.list_objects_v2(Bucket=bucket, Prefix=prefix)
|
resp_list = s3.list_objects_v2(Bucket=bucket, Prefix=prefix)
|
||||||
if 'Contents' not in resp_list or not resp_list['Contents']:
|
if 'Contents' not in resp_list or not resp_list['Contents']:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue