Saturday, May 26, 2012

Exim Commands

Debug a mail delivery:
 exim -bt -d email@address.com 
Retry message delivery:
 exim -M messageID
Force delivery of all message:
 exim -qf
Force delivery of all message and delete of frozen ones:
 exim -qff
Shows log delivery for a message:
 exim -Mvl messageID
Display message body:
 exim -Mvb messageID
Display message header:
 exim -Mvh messageID
Delete a message without warning:
 exim -Mrm messageID
Count messages in queue:
 exim -bpr | grep "<" | wc -l or exim -bpc
Display all messages from queue:
 exim -bp
Count frozen messages:
 exim -bpr | grep frozen | wc -l
Delete frozen messages:
 exim -bpr | grep frozen | awk '{print $3}' | xargs exim -Mrm
 
P.s. You can get some more cool tips from exim cheatsheet 

Saturday, May 12, 2012

Today I needed to set up connections to 2 different ports, running on a machine, sitting behind my firewall.

I knew that I needed to set up a SSH tunnel from my laptop to the server, but I certainly did not want to open 2 different shells each time I wanted to connect to the ports.

Thankfully, the ssh command allows you to specify multiple tunnels through the same server in one command. The command to do this is:

ssh -c arcfour  -C -L 8080:127.0.0.1:8080 -L 8081:127.0.0.1:8081  homedsl.org