Skip to content

Commit

Permalink
fix dns records
Browse files Browse the repository at this point in the history
  • Loading branch information
everping committed Aug 20, 2023
1 parent 4df94fc commit cde1768
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/maily/domain_identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ def delete_domain(self):
record_value = f'{token}.dkim.amazonses.com'
self.delete_dns_record('CNAME', record_key, record_value)

# Remove MX records
self.delete_dns_record('MX', self.domain_name, f'inbound-smtp.{AWS_REGION}.amazonaws.com')

# Remove mail-from records
mail_from_domain = f'mail.{self.domain_name}'
self.delete_dns_record('MX', mail_from_domain, f'feedback-smtp.{AWS_REGION}.amazonses.com')
self.delete_dns_record('TXT', mail_from_domain, '"v=spf1 include:amazonses.com ~all"')

# Remove domain identity in SES
ses_client.delete_identity(self.domain_name)

Expand Down

0 comments on commit cde1768

Please sign in to comment.