0

I've been trying for ages to get this to work. Standard Homebrew recipe does not include MySQL support.

I've tried: brew edit dovecot and added --with-mysql to the args section but it just seems to download the standard version without mysql support:

 % brew install --build-from-source dovecot <br/>
==> Fetching dovecot
######################################################################## 100.0%
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff
######################################################################## 100.0%
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff
Already downloaded: /Users/jlbrown/Library/Caches/Homebrew/downloads/195208ba31cadc265ea97bb8aad4e78caab1200daf4d855e6c839b5f987f92db--configure-big_sur.diff
==> Downloading https://pigeonhole.dovecot.org/releases/2.3/dovecot-2.3-pigeonhole-0.5.20.tar.gz
######################################################################## 100.0%
==> Downloading https://dovecot.org/releases/2.3/dovecot-2.3.20.tar.gz
Already downloaded: /Users/jlbrown/Library/Caches/Homebrew/downloads/b9e612337caea98cfb0c508b92ac69cb54c02769a6cc7d768e0bb9841c67dff3--dovecot-2.3.20.tar.gz
==> Patching
==> Applying configure-big_sur.diff
patching file configure
<br/>==> ./configure --prefix=/opt/homebrew/Cellar/dovecot/2.3.20 --libexecdir=/opt/homebrew/Cellar/dovecot/2.3.20/libexec --sysconfdir=/opt/homebrew/etc --localstatedir=/opt/homebrew/var --with-bzlib --with-pam --with-sqlite --with-ssl=openSSL<br/>
==> make install
==> Patching pigeonhole
<br/>==> Applying configure-big_sur.diff
patching file configure
==> ./configure --with-dovecot=/opt/homebrew/Cellar/dovecot/2.3.20/lib/dovecot --prefix=/opt/homebrew/Cellar/dovecot/2.3.20
==> make
==> make install
==> Caveats
For Dovecot to work, you may need to create a dovecot user
and group depending on your configuration file options.<br/>
To restart dovecot after an upgrade:<br/>
  sudo brew services restart dovecot
Or, if you don't want/need a background service you can just run:
  /opt/homebrew/opt/dovecot/sbin/dovecot -F
==> Summary
🍺  /opt/homebrew/Cellar/dovecot/2.3.20: 1,236 files, 30.4MB, built in 2 minutes 38 seconds


Feb 21 15:22:38 master: Info: Dovecot v2.3.20 (80a5ac675d) starting up
 for imap, pop3 (core dumps disabled) Feb 21 15:22:47 auth: Fatal: sql:
 Unknown database driver 'mysql'

Disparate for a solution! Running on Ventura (macOS 13.2.1) on a M1 Mac

1 Answer 1

1

I only just saw this thread when I ran into the same problem.

I've been using dovecot for several years now, built via brew, and like the OP, using MySQL as the backend for auth storage. I was trying to update my dovecot from 2.3.19 to the current latest (2.3.20), and I got hit with "unknown database driver 'mysql'".

The brew FAQ has the answer: after editing the formula, set

export HOMEBREW_NO_INSTALL_FROM_API=1

before running

brew reinstall -s dovecot

Otherwise, the formula changes will be ignored. :(

Worked like a charm for me just now. I'm happily running dovecot on top of Monterey 12.6.7 on a 2018 Mac Mini.

Sorry if you've already moved on and don't need the answer any more, but maybe this thread will help someone else.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .