Server관련/AWS

Amazon EC2 SMTP port 25 보내기 limit 해결

saltdoll 2020. 10. 13. 06:53
반응형

Amazon EC2 서버에서는 SMTP port 25을 이용해서 메일을 여러 개 보내기가 전송이 제한이 되어 있습니다.

해당 방법을 해결하는 방법은 SMTP Port 25를 사용 제한 해제 요청을 해야 합니다.

Amazon EC2 인스턴스에서 Port 25를 통해 메일 전달의 제한
Amazon EC2가 포트 25를 통해 전송된 이메일에 기본 발신 한도를 적용하고 그러한 한도를 초과하려는 경우 아웃바운드 연결을 제한합니다. 이 제한을 제거하려면 Amazon EC2 이메일 전송 제한 제거 요청을 제출하십시오
(출처: https://docs.aws.amazon.com/ko_kr/ses/latest/DeveloperGuide/smtp-issues.html)

 

만약, 메일 보내기를 25번 포트가 아닌 다른 포트 465, 587 포트를 사용하게 되면,

해당 연결은 제한되지 않아서 Email 보내는데 문제는 없습니다.

 

보통 포트 25번을 사용하면,

기본 발송 한도를 적용하고 그 한도를 초과하게 되는 경우

"아웃바운드 연결"을 제한하게 됩니다.

이 제한을 제거하는 방법은 아래의 "EC2 이메일 전송 제한 제거 요청"을 제출하고

승인 받아야만 가능합니다.

 

[ SMTP Port 25 제한 해제 Step ]

(1) Reverse DNS 등록을 위한, A타입 DNS 등록

(2) Request to Remove Email Sending Limiations 작성
(Amazon EC2 이메일 전송 제한 제거 요청)

 

 

 

(Step 1) Reverse DNS 등록을 위한, A타입 DNS 등록

DNS관리에서, 새로운 A타입의 호스트("smtp. 도메인. com")를 우선 등록합니다.

Godaddy.com에서 등록된 DNS에 smtp라는 호스트를 등록

 

 

(Step 2) Request to Remove Email Sending Limitations 작성 

AWS에 콘솔에 로그인후,

EC2 인스턴스에 대한 Email 전달 제한 해지 요청서를 작성해야 합니다.

https://aws.amazon.com/forms/ec2-email-limit-rdns-request

 

"Email"과 "Use Case Description"에 사유를 간략한 영어로 등록해주고,

"Elastic IP Address 1"과 "Reverse DNS Record for EIP 1"을 입력해 줘야 합니다.

Email Sending (25)포트 제한 해제 등록양식

이 양식을 신청후,

성공할 경우 aws@amazon.com으로 부터 답변 메일을 받게 됩니다.

Your AWS Inquiry

Hello,

 

We have configured the reverse DNS record(s) you requested. Your request was mapped for smtp.*****.com as rDNS for 13.***.***.**. Please note that propagation of this update to DNSBL services that Amazon works with may take up to a week.

 

Email sending limitations have also been removed for any resources for the region your EIP is located in.

 

Please let us know if you have any questions.

 

Best regards,

 

Amazon Web Services

http://aws.amazon.com

 

---- Original message: ----

 

AWS AccountId            20*********

AccountEmailAddress            swsupport@********.com

UseCaseDescription            I want to send to report mailing to customers. *************.

ElasticIPAddress1            13.***.***.***

ElasticIPAddress2           

ReverseDNSRecord1            smtp.***********.com

ReverseDNSRecord2           

Submission received from source IP Address            45.***.***.***

AWS Account ID            20***********

Root Customer ID            A2****************

IAM Account            No

Email Address            swsupport@**********.com

Name            *****

 

실패 했을 경우,

Your AWS Inquiry

Hello,

 

The mapping for this reverse DNS entry is failing because the PTR record doesn't match the A record for that domain. We currently require the forward A record to match the PTR record for all reverse DNS entries.

 

You can either provide us with an alternate hostname, or configure the A record for this domain to match the desired PTR record on your side.

 

Please resubmit your request via the online form so that we can resubmit the request:

 

https://aws-portal.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request

 

If you'd like to proceed with assigning a reverse DNS record to the Elastic IP, the first step would be to configure the A record for the domain to match the desired PTR record on your side.

 

Please follow the instructions at the link below to create the A record:

https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-creating.html

 

Once created, please resubmit your RDNS request via the online form so that we can resubmit the request:

 

https://aws-portal.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request

 

Best regards,

 

Amazon Web Services

http://aws.amazon.com

 

---- Original message: ----

 

AWS AccountId            20*********

AccountEmailAddress            swsupport@********.com

UseCaseDescription            I want to send to report mailing to customers.

ElasticIPAddress1            13.***.***.***

ElasticIPAddress2           

ReverseDNSRecord1            report.**********.com     <== 사용하는 사이트 정보를 입력하는게 아니라, rDNS를 입력해야 합니다.

ReverseDNSRecord2           

Submission received from source IP Address            45.***.***.***

AWS Account ID            20*********

Root Customer ID            A2***********

IAM Account            No

Email Address            swsupport@********.com

Name            *****

 

 

 

AWS KC Videos: What can I do if I am unable to send email from an EC2 instance on TCP port 25?

오래전 AWS에서 만든 관련 동영상이 숨김 처리되었네요;;

 

 

 

내 EC2 인스턴스에서 포트 25에 대한 제한을 제거하려면 어떻게 해야 합니까?

(https://aws.amazon.com/ko/premiumsupport/knowledge-center/ec2-port-25-throttle/)

문제

내 Amazon Elastic Compute Cloud(Amazon EC2) 인스턴스의 포트 25를 통해 이메일을 전송하는 데 문제가 있거나 자주 제한 시간 오류가 발생합니다. 내 EC2 인스턴스에서 포트 25 제한을 제거하려면 어떻게 해야 합니까?

 

해결 방법

Amazon EC2는 기본적으로 모든 EC2 인스턴스의 포트 25에 대한 트래픽을 제한하지만, 이 제한을 제거하도록 요청할 수 있습니다.

먼저 해당 DNS A 레코드를 생성해야 합니다.

  • Amazon Route 53을 DNS 서비스로 사용하는 경우 A 레코드를 포함하는 새 리소스 레코드 세트를 생성하거나 새 A 레코드를 포함하도록 기존 리소스 레코드 세트를 업데이트합니다.
  • Amazon Route 53 이외의 서비스를 사용하는 경우 DNS 공급자에게 A 레코드를 생성하도록 요청합니다.

그런 다음 인스턴스에서 포트 25 차단을 제거하도록 AWS에 요청하십시오.

  1. AWS 계정 루트 사용자 자격 증명으로 로그인한 후 이메일 전송 제한 제거 요청 양식을 엽니다.
  2. Use Case Description(사용 사례 설명) 필드에 사용 사례에 대한 설명을 입력합니다.
  3. (선택 사항) 아웃바운드 이메일을 전송하는 데 사용하는 AWS 소유 탄력적 IP 주소와 AWS가 탄력적 IP 주소와 연결하는 데 필요한 역방향 DNS 레코드를 제공합니다. AWS는 이 정보를 사용하여 탄력적 IP 주소에서 전송된 이메일이 스팸으로 표시될 가능성을 줄입니다.
  4. [Submit]을 선택합니다.

요청이 승인되면 EC2 인스턴스에 대한 포트 25 차단이 제거됨을 알리는 이메일이 전송됩니다.

 

관련 정보

Amazon SES SMTP 엔드포인트에 연결

 

 

반응형
도움이 되셨다면 하트모양의 "♡ 공감"을 눌러주시면 큰 격려가 됩니다.
(로그인하지 않으셔도 가능)