Results 1 to 3 of 3

Thread: Inherited Dovecot 1.2 server on FreeBSD, need to upgrade, advice?

  1. #1
    Join Date
    Aug 2017
    Posts
    1

    Question Inherited Dovecot 1.2 server on FreeBSD, need to upgrade, advice?

    Dovecot is having some issues and a little googling lead me to doveadm commands, unfortunately it appears as though doveadm wasn't present in build 1.2.

    So the plan is to upgrade, right now the server is running FreeBSD 10.4, and Dovecot 1.2.17.

    First what I want to do a tarball backup of all dovecot directories/files before I attempt the upgrade in case I need to rollback, and then perform the upgrade.

    Are there any good resources, and/or tips anyone has?? I am completely unfamiliar with Dovecot (and only very lightly familiar with FreeBSD although I do know a lot of Linux so I "think" its mostly figuring out how FreeBSD does things), and while I'm going through the wiki I found it really doesn't seem to have a good walkthrough of upgrading, etc and this is a small company and the only mail server they have - so I can't screw it up

  2. #2
    Join Date
    May 2008
    Posts
    525
    I am pretty sure that they use ports to install their packages. Note that the information below is not valid if they are using DirectAdmin because DA does not use Dovecot from ports but install it on it's own. If they are using DA, you must update it using Custombuild.

    First of all, read the dovecot documentation regarding the update:
    https://wiki2.dovecot.org/Upgrading/2.0

    You may face some issues with the configuration file which you will have to solve on your own - I doubt that FreeBSD will help you with automatic conversion.

    Then you need to do is to update your ports tree with:

    Code:
    portsnap fetch update
    it's a safe command, won't hurt anything. Then check what ports have available updates:

    Code:
    portmaster -L
    It will probably give you a huge list with many updates. I would highly recommend to update them all anyway, but it is your choice to decide what to do anyway.

    Now before updating anything, BACKUP THE FILESYSTEM. Copy the files on a flash drive, zip them and throw them in a safe directory, etc - it's your choice. You should not expect any troubles with files but better safe than sorry.

    Now to backup a port, run the following:

    Code:
    portmaster -b <portname>
    As far as I remember, that will store the package under /usr/ports/packages/portmaster-backup/

    If anything fails, you can reinstall the backed-up package using:
    Code:
    pkg add <packagename>
    Now on the actual port upgrade. In FreeBSD the things are straight forward and you should not expect any issues usually. It just work. The first thing you must do is to read the following file:

    Code:
    cat /usr/ports/UPDATING
    It will give you details regarding pending updates with major changes inside. Then to update a single package run:

    Code:
    portmaster -dwv <portname>
    The -d will clean the dist files (not important). The -w will save the old shared libraries (in /usr/local/lib/compat/pkg/). The -v is a verbose output.

    That will update your port.

    I usually do the following:

    Code:
    portmaster -a
    Which updates all ports on the system to their latest version.

    You can also consider updating the OS base itself. This is done by:

    Code:
    freebsd-update fetch
    followed by

    Code:
    freebsd-update install
    This is for minor versions updating so you shouldn't expect any issues with it.

    If there are any issues, you can do:

    Code:
    freebsd-update rollback
    to revert the latest installed update.
    Last edited by wattie; 08-31-2017 at 12:20 AM.

  3. #3
    Join Date
    May 2008
    Posts
    525
    Interesting news from the UPDATING:

    Code:
    20170807:
      AFFECTS: users of mail/dovecot2 and mail/dovecot2-pigeonhole
      AUTHOR: adamw@FreeBSD.org
    
      Now that dovecot1 has been removed from the ports tree, dovecot2
      and dovecot2-pigeonhole have been renamed to simply dovecot and
      dovecot-pigeonhole.
    
      pkg should handle the rename automatically, but if you run into
      trouble, you can point pkg at the new origin via:
    
      # pkg set -o mail/dovecot2:mail/dovecot
      # pkg set -o mail/dovecot2-pigeonhole:mail/dovecot-pigeonhole
    
      Similarly, you can point portmaster at the new location via:
    
      # portmaster -o mail/dovecot mail/dovecot2
    
      If all else fails, just remove and reinstall the package:
    
      # pkg delete dovecot2
      # pkg install dovecot
    That means that dovecot 1.x is no longer available in FreeBSD. That means that you may not be able to update it anymore. Actually you won't be able to do it anyway since dovecot and dovecot2 were different ports, not the same one. I was confused because when I wrote the things above I looked under /ports/mail/ and saw only one directory dovecot and I thought that it's just one port and 1.2 will be updated to 2.0 with no issues. Obviously it won't work that easy.

    So here is what you need to do:

    1. Uninstall dovecot 1.2
    2. Make clean dovecot2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •