def METHOD_NAME():
	"""
	log the webhook and forward it to site
	"""
	data = json.loads(frappe.request.data)
	event_data = data["event-data"]
	headers = event_data["message"]["headers"]
	message_id = headers["message-id"]
	site = message_id.split("@")[1]
	status = event_data["event"]
	secret_key = event_data["user-variables"]["sk_mail"]
	frappe.get_doc(
		{
			"doctype": "Mail Log",
			"unique_token": secrets.token_hex(25),
			"message_id": message_id,
			"sender": headers["from"],
			"recipient": headers["to"],
			"site": site,
			"status": event_data["event"],
			"subscription_key": secret_key,
			"message": event_data["delivery-status"]["message"]
			or event_data["delivery-status"]["description"],
			"log": json.dumps(data),
		}
	).insert(ignore_permissions=True)
	frappe.db.commit()
	data = {"status": status, "message_id": message_id, "secret_key": secret_key}
	try:
		host_name = frappe.db.get_value("Site", site, "host_name") or site
		requests.post(
			f"https://{host_name}/api/method/email_delivery_service.controller.update_status",
			data=data,
		)
	except Exception as e:
		log_error("Mail App: Email status update error", data=e)
		return "Successful", 200
	return "Successful", 200