Well, I decided today would be a good day to update the mailserver so I decided to do a yum -y all. Needless to say, it went well.. but dumbass me didn’t bother to check the mailserver.
So.. needless to say, all day, I had my mailserver down due to the fact that the postfix update doesn’t include the mysql option enabled..
So.. to get it all working again, I did the following…
1) Download the source RPM from a CentOS 5 mirror
2) rpm -i postfix-2.3.3-2.src.rpm # Install the Source RPM
3) cd /usr/src/redhat/SPECS
4) Edit postfix.spec and change “%define MYSQL 0″ to %define MYSQL 1”
5) yum install pcre-devel mysql-devel # If you do not have these already
6) rpmbuild -ba postfix.spec # Ignore warnings
7) cd /usr/src/redhat/RPMS
8) If you have the regular postfix rpm installed, uninstall it via rpm -e postfix
8) rpm -i postfix-2.3.3-2.i386.rpm
now.. don’t forget to rename the .rpmsave files back to their original and do a postfix reload afterwards. Otherwise, you’ll be feeling the pain like i did.