On Nov 19, 2007 6:42 PM, Benjamin R. Haskell <[EMAIL PROTECTED]> wrote: > > On Mon, 19 Nov 2007, jan gestre wrote: > > > On Nov 19, 2007 12:57 AM, Bazy <[EMAIL PROTECTED]> wrote: > >> > >> jan gestre wrote: > >>> Hi Guys, > >>> > >>> I'm using CentOS 4.5, is the dovecot default rpm comes with mysql > >>> support? Do I need to rebuild it? > >>> > >>> > >>> TIA. > >>> > >>> jan > >> > >> Hi Jan, > >> > >> You need to rebuild it, without any patches or so... Just enable mysql > >> and LDA support in the .spec and don't forget to edit yum.conf and > >> exclude=postfix*. > >> > > > > Hi Bazy, > > > > Sigh.. that's what I'm afraid of, anyways, I tried rebuilding it using > > dovecot-1.0.7-0_63.src.rpm however I keep on getting this > > > > # rpmbuild -bb /usr/src/redhat/SPECS/dovecot.spec > > > > "Unknown tag error in line 1" > > %bcond_without inotify <--- line 1 > > > > I already tried adding --without inotify switch with same result. > > Googling around told me that the option is only available on the > > 2.6.13 kernel and above, the CentOS4 kernel is only 2.6.9. Any ideas > > how to resolve this? > > > I ran into the same problem on CentOS 4.5. It's not the 'inotify' part > that's causing that error message. It's the %bcond_without. See the wiki > (Building your own rpms) for how to add those macros. > http://wiki.dovecot.org/PrebuiltBinaries#line-54 > > After those RPM macros are installed, you also need to add --without > inotify: > > rpmbuild --without inotify -bb /path/to/dovecot.spec > > I didn't have to add anything regarding 'quota'. (This was with 1.0.1 a > while ago, though. YMMV.) > > Best, > Ben > Finally I was able to rebuild it by adding a file called /etc/rpm/macros.atrpms with the following contents:
%bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}} %bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}} %with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}} %without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}} Then run: # rpmbuild --without inotify -bb /usr/src/redhat/SPECS/dovecot.spec Then started dovecot , but encountered an error during startup [EMAIL PROTECTED] ~]# /etc/init.d/dovecot start Starting Dovecot Imap: Error: Error in configuration file /etc/dovecot.conf line 21: Unknown setting: imap_listen Fatal: Invalid configuration in /etc/dovecot.conf [FAILED] I then changed imap_listen to localhost and * respectively but still have the same error. I'm lost. :(