Adventures in Ubuntu Breezy Dovecot

    I mentioned the other day that I am having problems with Dovecot on Ubuntu Breezy. Now's the time to debug it, and here are my notes...

    No inetd.conf

      
      sed: can't read /etc/inetd.conf: No such file or directory
      
      


    This first error is because of this poorly implemented test:

      
      # The init script should do nothing if dovecot is being run from inetd
      
      for p in `sed -r "s/^ *(([^:]+|\[[^]]+]|\*):)?(pop3s?|imaps?)[ \t].*/\3/;t;d" \
      
        /etc/inetd.conf`
      
      do
      
        for q in `sed -r "s/^ *protocols[ \t]*=[ \t]*(([^\"]*)|\"(.*)\")/\2\3/;t;d" \
      
          /etc/dovecot/dovecot.conf`
      
        do
      
          if [ $p = $q ]; then
      
            exit 0
      
          fi
      
        done
      
      done
      
      


    You can see from the comment that the intention is that the init script doesn't do anything if dovecot is running from inetd. The error message is kinda bogus though, in that the code keeps executing after that failed line with the sed call in it. If you find the error annoying, then make it go away:

      
      touch /etc/inetd.conf
      
      


    In a perfect world, you'd hope that the packager would change the script to do something more like this:

      
      for p in `sed -r "s/^ *(([^:]+|\[[^]]+]|\*):)?(pop3s?|imaps?)[ \t].*/\3/;t;d" \
      
        /etc/inetd.conf 2> /dev/null`
      
      


    Moving right along...

    It doesn't start the service

    I had enabled the imap_listen variable in the dovecot.conf file, but not put it in the protocols variable. The init script checks this, and bugged out without an error message. I would think an error message would be nicer.

    And now it works.

posted at: 20:40 | path: /linux/ubuntu | permanent link to this entry

    #1 Michael Still

    Andrew points out that at least some of this is covered in the /usr/share/doc/dovecot-imap/README.debian file, but I still think that an error message from the init script would be good.

    Add a comment to this post:

    Your name:

    Your email: Email me new comments on this post
      (Your email will not be published on this site, and will only be used to contact you directly with a reply to your comment if needed. Oh, and we'll use it to send you new comments on this post it you selected that checkbox.)


    Your website:

    Comments: