Mail server: Postfix with MySQL and SASL together on a single package?

Hi.

I'd like to move my mail server (postfix+dovecot) from OpenBSD to FreeBSD 14.

Under OpenBSD, there is a package of Postfix with SASL2 and MySQL support together (postfix-3.8-sasl2-mysql). Is there anything like that under FreeBSD, containing both SASL and MySQL support as a single package of Postfix?

"pkg search postfix" didn't really bring a hope, and wanted to ask here to get your opinions on how to do it without compiling ports and stuff.

There is "postfix-sasl-3.8.4,1", there is "postfix-mysql-3.8.4" but not both together?

PKG system is very useful and practical to me, as because I don't really want to mess with ports and compilations, upgrade process is simple as well, that's why I prefer packages.

Any clue?

Best wishes.
 
No, the default mail/postfix pkg is built without any DB-support and Cyrus SASL (dovecot SASL is always natively supported by postfix). See the 'Configuration Options' section for the default options set by the port.
You'd have to build the port yourself and enable the DB support you want/need.
 
Thanks for the idea.

Is it possible at least build it with my custom options, on a home PC of mine running the same OS/FreeBSD14, and move the compiled package/tgz file to my mail server to install it (with 'pkg install') there?

(And then lock it to not get it changed/updated)

In case of dependencies, would that create too much troubles?

Thanks!
 
Is it possible at least build it with my custom options, on a home PC of mine running the same OS/FreeBSD14, and move the compiled package/tgz file to my mail server to install it (with 'pkg install') there?
sure, entirely possible. However, you should run the same version (-RELEASE) and ideally use the same ports tree (e.g. quarterly) on that host, to prevent dependency/version conflicts.
And FTR: it is usually discouraged to mix ports and packages, due to version conflicts that can create quite a mess. So if you are seeing yourself constantly locking various and more packages, you should think about building everything from ports. A list of what ports are installed on a specific host can be created via pkg prime-origins. This list doesn't contain dependencies that are automatically installed (and built if using ports), which is correct as you don't want to have them manually installed, because they might change and/or become unnecessary and could be removed by pkg autoremove.
Have a look at the handbook chapter on ports/packages to make yourself familiar with the differences and implications of using one or another.

If you also want/need several other packages with custom options (or to remove unneeded/unwanted dependencies), you might want to have a look at ports-mgmt/poudriere [1], to set up a build environment which uses dedicated jails to produce 'clean' packages and can also create a full pkg repository to be used by your server(s). This sounds scarier than it is - configuration is a single file with at most ~10-15 options that might be of interest and everything else is set up automagically and/or via very few subcommands.
This can be run on a dedicated, more beefy build host, or even some cloud VM that is only spun up every ~2 weeks for a few hours to rebuild all packages.

[1] https://docs.freebsd.org/en/books/handbook/ports/#ports-poudriere
 
I have similar setup. I build my custom repository on synth and upload it on private web server from there i update my mail servers. The only difference is that i use PostgreSQL instead of MySQL. If you are interested i can share my buildlist.
 
I have a related question regarding configuration of options using ports-mgmt/poudriere, just ignorant early going on my part, but I see that mail/postfix has been flavorized so the subordinate mail/postfix-sasl has been converted to a flavor and postfix flavors include postfix-pgsql and postfix-sasl. In previous installs I just selected SASL and PGSQL as build options in the default mail/postfix build.

With Poudriere, one of those might be specified as a "flavor" (I think) by specifying, say mail/postfix@sasl for Poudriere, but what about both? mail/postfix@sasl@pgsql?

Is that any different than configuring PGSQL and SASL as "on?" with
poudriere options -c -j (etc) mail/postfix
 
Back
Top