Howto: Sending test mails with Swaks
Kamis, 21 Maret 2013
1
komentar
http://liquidat.wordpress.com/2013/03/20/howto-sending-test-mails-with-swaks
Setting up e-mail servers can become a time consuming and complex task. Test mails can help verifying the functionality of the system – and here Swaks comes into play, the “swiss army knife for smtp”.
Swaks can be used to send test mails of all kinds. The advantage of Swaks compared to sending mails with your normal e-mail client is that you are able to alter almost any part of the e-mail: to, from, header, attachments, which server to speak to, etc.
Here are some common Swaks usage examples:
The first, basic example is sending a mail to your own server (here “bayz.de”):
If you need more recipients, add them via comma:
It gets more interesting if you change the “TO” to another domain, but send the mail via the server for “bayz.de” nevertheless. If that works for arbitrary domains, and if the mails are forwarded to these you have big problem: an open relay.
Or do you need to know if a certain recipient is actually available?
But you can also use Swaks to test a spam filter: If any of the bigger spam filters out there identifies the GTube sting in an e-mail, it will mark it as spam:
The same is true for anti virus programs and the Eicar file:
But Swaks can also be used to test user authentication and tls:
And this can of course be used to test authentication between servers:
The last bit makes sure your local test machine does provide a correct fqdn.
But in case your MTA setup does rely or use custom headers, how about adding some of these?
If you have other interesting examples, don’t hesitate to drop them in the comments, I am happy to add them here.
Setting up e-mail servers can become a time consuming and complex task. Test mails can help verifying the functionality of the system – and here Swaks comes into play, the “swiss army knife for smtp”.
Swaks can be used to send test mails of all kinds. The advantage of Swaks compared to sending mails with your normal e-mail client is that you are able to alter almost any part of the e-mail: to, from, header, attachments, which server to speak to, etc.
Here are some common Swaks usage examples:
The first, basic example is sending a mail to your own server (here “bayz.de”):
1 | $ swaks -f someone@example.net -t liquidat@bayz.de |
1 | $ swaks -f someone@example.net -t liquidat@bayz.de,testme@bayz.de |
1 | $ swaks -f someone@example.net -t liquidat@example.com --server mail.bayz.de |
1 | $ swaks -f roland.wolters@credativ.de -t roland.wolters@bayz.de --quit-after RCPT |
1 | $ swaks -f someone@example.net -t liquidat@bayz.de --body /path/to/gtube/file |
1 | $ swaks -f someone@example.net -t liquidat@bayz.de --body /path/to/eicar/file |
1 | $ swaks -t -tls --server bayz.de -t someone@example.net -f liquidat@bayz.de -ao --auth-user=liquidat |
1 | $ swaks -t -tls -s bayz.de -f someone@example.net -t liquidat@bayz.de --ehlo $(host $(wget http://automation.whatismyip.com/n09230945.asp -O - -q)) |
But in case your MTA setup does rely or use custom headers, how about adding some of these?
1 | $ swaks -f someone@example.net -t liquidat@bayz.de --add-header "X-Custom-Header: Swaks-Tested" |
TERIMA KASIH ATAS KUNJUNGAN SAUDARA
Judul: Howto: Sending test mails with Swaks
Ditulis oleh Unknown
Rating Blog 5 dari 5
Semoga artikel ini bermanfaat bagi saudara. Jika ingin mengutip, baik itu sebagian atau keseluruhan dari isi artikel ini harap menyertakan link dofollow ke http://androidjapane.blogspot.com/2013/03/howto-sending-test-mails-with-swaks.html. Terima kasih sudah singgah membaca artikel ini.Ditulis oleh Unknown
Rating Blog 5 dari 5
1 komentar:
Thanks for reposting my article including the source =)
However, please note that the licence requires that you state the licence as well - that one is currently missing, please correct it.
Also, I would very much welcome it if you would take the time to update the article to the newest version, thus correcting some e-mail addresses...
Posting Komentar