swaks를 사용한 SMTP이메일 전송 테스트 방법
SMTP 서버를 테스트 할 때 다른 여러 방법도 있지만 전용 프로그램을 사용해서 하면 잘 안될 경우에 어떤 문제인지 확인할 수도 있고 더 생산적이라고 생각한다.
swaks --to admin@myfirstbusiness.co.kr \
--from admin@myfirstbusiness.co.kr \
--server email-smtp.ap-northeast-2.amazonaws.com \
--port 587 \
--auth LOGIN \
--auth-user 'AKIASUGLFGUII3QHVQO6' \
--auth-password 'XXX' \
--tls
=== Trying email-smtp.ap-northeast-2.amazonaws.com:587...
=== Connected to email-smtp.ap-northeast-2.amazonaws.com.
<- 220 email-smtp.amazonaws.com ESMTP SimpleEmailService-d-64SISH78D kz3ibSdUm2M6GXaZJeX5
-> EHLO localhost
<- 250-email-smtp.amazonaws.com
<- 250-8BITMIME
<- 250-STARTTLS
<- 250-AUTH PLAIN LOGIN
<- 250 Ok
-> STARTTLS
<- 220 Ready to start TLS
=== TLS started with cipher TLSv1.3:TLS_AES_256_GCM_SHA384:256
=== TLS no local certificate set
=== TLS peer DN="/CN=email-smtp.ap-northeast-2.amazonaws.com"
~> EHLO localhost
<~ 250-email-smtp.amazonaws.com
<~ 250-8BITMIME
<~ 250-STARTTLS
<~ 250-AUTH PLAIN LOGIN
<~ 250 Ok
~> AUTH LOGIN
<~ 334 VXNlcm5hbWU6
~> QUtJQVNVR0xGR1VJSTNRSFZRTzY=
<~ 334 UGFzc3dvcmQ6
~> QkNTZCtraGVKc3FBMXRLZVB1WGJzc29weklVY1BnU0ZXSUZOMEVrMUd2NXk=
<~ 235 Authentication successful.
~> MAIL FROM:<admin@myfirstbusiness.co.kr>
<~ 250 Ok
~> RCPT TO:<admin@myfirstbusiness.co.kr>
<~ 250 Ok
~> DATA
<~ 354 End data with <CR><LF>.<CR><LF>
~> Date: Tue, 29 Jul 2025 11:54:44 +0900
~> To: admin@myfirstbusiness.co.kr
~> From: admin@myfirstbusiness.co.kr
~> Subject: test Tue, 29 Jul 2025 11:54:44 +0900
~> Message-Id: <20250729115444.301807@localhost>
~> X-Mailer: swaks v20201014.0 jetmore.org/john/code/swaks/
~>
~> This is a test mailing
~>
~>
~> .
<~ 250 Ok 010c0198541a92ea-1d2445cc-3730-408b-a7a2-1d92a5402882-000000
~> QUIT
<~ 221 Bye
=== Connection closed with remote host.