On this page
Swaks - Swiss Army Knife SMTP
You may know Netcat, the “TCP/IP Swiss Army Knife”, now here’s Swaks, the “SMTP Swiss Army Knife” :)
apt-get install swaks
The description is accurate, I can’t say it better… you can do almost anything with it. Just read the man page to get ideas for how to use it.
An example of usage that allows you to reinject emails without having to go through a local server:
for i in *.eml; do cat "$i" | swaks -g -n -t recipient@yop.tld -f sender@yop.tld -s 1.2.3.4 ; done
If you don’t specify a server, it even resolves the MX record…
In short, it’s essential for anyone who works with SMTP.
Last updated 03 Oct 2006, 13:40 CEST.