SMTP authenticatie

AUTH PLAIN

$ perl -MMIME::Base64 -e 'print encode_base64("\000username\000password");'
AHVzZXJuYW1lAHBhc3N3b3Jk
$ telnet smtphost 25
Trying 18.67.13.317
Connected to smtphost.
Escape character is "^]".
220 Domain.com SMTP Server
HELO mailserver
250 smtp.domain.com
AUTH PLAIN AHVzZXJuYW1lAHBhc3N3b3Jk
235 Authentication successful

AUTH LOGIN

$ perl -MMIME::Base64 -e 'print encode_base64("username");'
dXNlcm5hbWU=
$ perl -MMIME::Base64 -e 'print encode_base64("password");'
cGFzc3dvcmQ=
$ telnet smtphost 25
Trying 18.67.13.317
Connected to smtphost.
Escape character is "^]".
220 Domain.com SMTP Server
HELO mailserver
250 smtp.domain.com
AUTH LOGIN
334 VXNlcm5hbWU6
dXNlcm5hbWU=
334 UGFzc3dvcmQ6
cGFzc3dvcmQ=
235 Authentication successful

Let op: Gebruik geen echo in plaats van printf; echo stuurt n !