Sending email to all over the world, especially to China, is a big challenge. How to deliver email safely and lower the bandwidth consumption?
Here is my recipes.
Standard SMTP need a lot of conversations, to finish ONE email message. So, for long distance transaction, I’ll make use of QMQP (Quick Mail Queueing Protocol) which is a lot faster than standard one.
After setup smtp authentication (SMTP AUTH), we should test before let server go life. Here are some command to proof your work.
Input your authentication information
All AUTH information input must be base64-encoded, so you need perl MIME::Base64 to encode your user/pass into one encoded string as following:-
$ perl -MMIME::Base64 -e 'print encode_base64("\000test\@myserver.com\000the.password.is.fake")'
\000 is a separator between userid and password, so we put in first place of both information. If your userid is an email address (same as my sample), you’ll need a blackslash (\) for “@”, because perl silently interprets the “@” sign in the middle of a string and replaces it with the contents of an array with that name, if exists… or with nothing, if not.
Depends on server configuration, you may need to use SSL or TLS before you are able to use the AUTH command. In fact, if you are able to use the AUTH command without using either SSL or TLS, you are in fact sending your userid and password over the internet in clear text.