Postfix SSL to MariaDB

I'm using Postfix with a MariaDB backend for virtual mailboxes. Postfix is on a separate server from MariaDB. My MariaDB server is already configured to require a specific SSL issuer for some users. I'm eventually planning a more distributed system so I'd let to set up Postfix to use an SSL certificate when connecting to the MariaDB backend so my credentials and other data isn't floating around unencrypted. I've search around time after time and I can't figure out how to get Postfix to use SSL. I prefer to use what is built in without adding something like stunnel. Anybody else know?

Mail server:

CentOS 6.7

Postfix 2.6.6-6.el67.1.x8664

DB server:

CentOS 6.7

MariaDB 5.5.48-MariaDB-wsrep

3 Replies

Don't have direct experience, but it looks like you can tell Postfix to pick up configuration options from my.cnf. With your version of Postfix, you would need to add something like "option_group = client" to your Postfix MySQL configuration file.

However, it's not exactly clear to me whether SSL/TLS can be enabled client-side in MySQL/MariaDB with a configuration option, or whether a command-line option is necessary, so this may not help. Hopefully it's a start, anyway.

@Vance:

Don't have direct experience, but it looks like you can tell Postfix to pick up configuration options from my.cnf. With your version of Postfix, you would need to add something like "option_group = client" to your Postfix MySQL configuration file.

However, it's not exactly clear to me whether SSL/TLS can be enabled client-side in MySQL/MariaDB with a configuration option, or whether a command-line option is necessary, so this may not help. Hopefully it's a start, anyway.

I'm 99% sure you can enable it with a config option, which I've tried, but I was not aware of the option_group command you referred to. I'll look into it.

Cool. Postfix is linked (on CentOS 7, anyway) with libmysqlclient, so it seems like it ought to have the same capabilities as the regular MySQL/MariaDB client programs.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct