Mark Rogers mark@quarella.co.uk wrote:
[...] I also just found a guide to doing almost exactly what I needed: http://www.howtoforge.com/virtual_users_and_domains_with_postfix_debian_etch .. which also helps.
Ow. That does far too much as root for my liking. Also, if you give -uc -us flags to dpkg-buildpackage, it won't try to sign things, so won't complain if it can't. Putting stuff like "ignore this message" in a HOWTO makes me think its author hasn't spent much time testing and bugfixing it.
Assuming I have built alternative .deb file "postfix_2.3.8-2_i386.deb", and already have postfix 2.3.8 installed from the repos, I know that: dpkg -i postfix_2.3.8-2_i386.deb will install it.
But, if I need to roll back to the original version, how do I do that?
dpkg -i postfix_2.3.8-1_i386.deb perhaps?
You probably want to call your package 2.3.8-1quarella1 or something, instead of 2, to avoid it conflicting with repository packages. I think some flags to the "dch" command will do that for you, but I forget what they are and I'm rushing, sorry.
Returning to your original question:
So my theory is that I can create a new Ubuntu VM, install the postfix source package and compile tools, apply the patch, then build the .deb from that to install on the live server, replacing the version in the repositories.
Is that a sensible approach? [...]
Well, I'd use cowbuilder and maybe an IP alias to try it in a chroot, instead of building a whole VM. My notes on cowbuilder are http://mjr.towers.org.uk/blog/2007/debian#packaging and I think it's getting pretty common among DDs, so maybe others can offer better tips.
Hope that helps,