Delete all messages in Postfix queue
Nov 14
for i in `mailq|grep '@' |awk {'print $1'}|grep -v '@'`; do postsuper -d $i ; done
Nov 14
for i in `mailq|grep '@' |awk {'print $1'}|grep -v '@'`; do postsuper -d $i ; done
Oct 25
Oct 25
Sep 21
Having spent a good amount of time working with the Xen platform, I’ve come across numerous occasions where the guest operating system would sometimes not detect disks and/or networking would not function. If you are having problems with a Linux based Xen guest, try this as a kernel argument at boot time:
xen_emul_unplug=never
I’ve used it with success on Fedora, Ubuntu, and Debian personally.
Sep 21
If for some reason or another you end up with a ton of e-mails in the queue and need them gone quickly, the command below will do the trick:
find /var/spool/exim/input -name '*.*' -exec rm {} \;
Sep 21
Most distros are now using ext4, which is great. We know that ext4 performs better than ext3. Did you know that you can make your system perform even better with a thirty second file modification?
The “relatime” option controls how ext4 records last access time information for files. By default, ext4 will modify a timestamp on a file everytime it is accessed. This may not seem like a significant performance killer, but trust me, it is. Adding relatime stops this from occurring, boosting your performance.
Your /etc/fstab file will looking something like this:
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
#
/dev/sda3 / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /boot ext3 defaults 0 2
# /home was on /dev/sda4 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /home ext4 defaults 0 2
# swap was on /dev/sda2 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx none swap sw 0 0
# ramdisk
tmpfs /tmp/ramdisk tmpfs rw,size=2G 0 0
We want to add the “relatime” option to your “/” partition. Also, your “/home” partition, if you have a separate “/home”. When done, your /etc/fstab will look more like this:
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
#
/dev/sda3 / ext4 relatime,errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /boot ext3 defaults 0 2
# /home was on /dev/sda4 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /home ext4 relatime,defaults 0 2
# swap was on /dev/sda2 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx none swap sw 0 0
# ramdisk
tmpfs /tmp/ramdisk tmpfs rw,size=2G 0 0
Now, most would say to reboot your computer to have the change take effect. Not necessary. Simply run:
sudo mount -o remount /
sudo mount -o remount /home (if you have a separate /home)
Enjoy your speedier installation.
Oct 05
Uncategorized Linux No Comments
If you find that incoming mail is rejected by Exim, and you see the following in your logfile, move /var/spool/exim/db/ratelimit out of the way, and then restart Exim. Problem solved.
failed to open DB file /var/spool/exim/db/ratelimit: Bad file descriptor
Berkeley DB error: memp_fopen: page sizes must be a power-of-2
Aug 13
Linux Linux, ubuntu server No Comments
sudo pico /etc/network/interfaces
If your device name is eth0, the configuration block should look like the following-
iface eth0 inet static
address 192.168.1.110
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 208.67.222.222 208.67.220.220 127.0.0.1
If you wish to add another I.P. address, you can add a block similar to this-
iface eth0:1 inet static
address 192.168.1.111
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
All that is needed now is a restart of networking-
sudo /etc/init.d/networking restart
Jul 28
Linux Linux, mysql, server, ubuntu No Comments
If you ever need to downgrade from MySQL 5.x to MySQL 4.x (hope you don’t), chances are you are going to run into a problem with apt-get. You will most likely receive cryptic, unhelpful dpkg errors.
If this is the case, try the command below.
sudo aptitude purge mysql-common mysql-client mysql-server && sudo aptitude install mysql-server-4.1 mysql-client-4.1
This should purge whatever is left of the MySQL 5.x installation, and then install the MySQL 4.x version. If this fails, proceed to bang head against nearest hard object.