Monthly Archives: June 2008

Exim – list of useful commands

I put together a small list of useful commands for Exim mail server, needless to say that i am using this commands on a day-to-day basis.

exim -bp – Shows exim mail queue
exim -M emailID – Force delivery of one message
exim -Mvl messageID – View Log for message
exim -Mvb messageID – View Body for message
exim -Mvh messageID – View Header for message
exim -Mrm messageID – Remove message (no errors sent)
exiqgrep -zi | xargs exim -Mrm – Remove all frozen emails in queue
exiqgrep -i -f '<>' | xargs exim -Mrm – Delete the emails from that address
exiqgrep -i -o 172000 | xargs exim -Mrm – Delete the emails which were not delivered 2-3days
exim -bpc – Show emails number in queue
exim -d -bt – To see where exim is delivering (resolving the mail) login to your server
exim -bpru |awk '{print $3}' | xargs -n 1 -P 40 exim -v -M – This will force the queue and will run multiple instances along


Add multiple IP’s to a server – Linux servers

I will try to explain in here an easy way to add a lot of IP’s to a server without having to add every one of them manually but of course this works if IP’s are part of same classes.

For example if you want to add a few IP’s from the class:

[root@box1 ~]# cd /etc/sysconfig/network-scripts/ – this is where the network settings are being searched for

[root@box1 network-scripts]# vi ifcfg-eth0-range0 – this will be the file where we define the new IP class(considering that our main interface is called eth0)

Add this content to the file:



IPADDR_START – the first IP of the class you want to add

IPADDR_END – last IP of the class you want to add

CLONENUM_START – the number with which the virtual interface will start, this will create the virtual interfaces eth0:1 to eth0:28.

If you have more classes that you want to add on the next class CLONENUM will start at 29.

NETMASK – the mask for the IP class

After all this was added to the file and edited accordingly just save and restart the network.

Next class will be added same way only that you create a new file for it:

[root@box1 network-scripts]# vi ifcfg-eth0-range1

This is the easiest way to add multiple IP classes to a server known until now, at least by me :).


First post

After some time of debating i concluded that will be nice to start a new blog and try to put in what i know based on my area of expertise so this can help others but in the same time i will create my own database of how-to’s and put together a few things to remember.

I am not a big fan of blogging as it seems i am kind of unable to keep a straight pattern when i comes to having things arranged and in a cosmic order all the time 🙂 so bloging will go between the projects and for when i feel like bored.

Anyway will try to keep this going and will see how it ends.