Monthly Archives: July 2013

Recompile Dovecot with Vpopmail on Debian

Here's a script I use to quickly recompile dovecot with vpopmail support on Debian 6.0. I'm using the backports repository to get the 2.1 version of dovecot.

Now I'm using the following script every time I update and I get a new version of the dovecot packages.

  1. #!/bin/bash
  2.  
  3. BDIR=./dovecot.$(date +%Y-%m-%d_%H-%M-%S)
  4.  
  5. mkdir $BDIR
  6. cd $BDIR
  7.  
  8. sudo apt-get source dovecot-core
  9. sudo apt-get build-dep dovecot-core
  10. dpkg-source -x *.dsc
  11.  
  12. cd $(find ./ -type d |grep dovecot|head -1)
  13.  
  14. sed -r -e 's/with-sqlite \\/with-sqlite \\\n\t\t--with-vpopmail \\/' debian/rules > debian/rules.mod
  15. cat debian/rules.mod > debian/rules
  16.  
  17. DEB_BUILD_OPTIONS="--with-vpopmail" fakeroot debian/rules binary
  18.  
  19. find $BDIR -type f -name "*.deb"|grep -v 'dbg' |xargs dpkg -i
  20.  
  21.  

The last line also installs all the dovecot packages except for the debug one. You might want to change it if you don't want all.

grub2 notes and tricks

Grub2 configuration is in /etc/defaut/grub ( on Debian at least ).

Set GRUB_DEFAULT=saved in /etc/default/grub if you want to start with the last good boot.

update-grub - detects kernels automatically and writes boot lines to /boot/grub/grub.conf

grub-set-default - set the default entry

grub-reboot - set the boot entry for the next reboot only ( for testing new kernels or other boot stuff especially when you're working remotely )

First boot entry is number 0