Home Account

auth plain smtp

2012-06-07 14:18 dennis iversen

Tags: php smtp

In order to test a correct setup of postfix I had to telnet into the remote server and enter the commands direct. My only problem was to create the AUTH PLAIN. It has to be created like this (in PHP):

echo base64_encode("\000mail@example.com\000password");

In order to test the postfix smtp setup I used something like the following:

dennis@dennis-laptop:~/www/sweetpoints$ telnet mailserver.example.com 25
Trying 123.123.123.123...
Connected to mailserver.example.com.
Escape character is '^]'.
220 mail.example.com ESMTP Postfix (Ubuntu)
AUTH PLAIN AGVtYWlsQGV4YW1wbGUuY29tAHBhc3N3b3JkMTIzNA==
235 2.7.0 Authentication successful

MAIL FROM:<dmail@example.com>
250 2.1.0 Ok
rcpt to: <mail@gmail.com>
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
And now the message of the mail!
.
250 2.0.0 Ok: queued as 9A44A3135A
quit

Worked fine!

This page has been requested 2804 times