From 2280fdf8a47c407bec8ec4fa0d47c90187a8bd70 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 3 Dec 2015 19:22:37 +0100 Subject: Use texthash lookup tables to avoid calling postmap(1). This is complicated enough already :-P --- konfigurera.mdwn | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'konfigurera.mdwn') diff --git a/konfigurera.mdwn b/konfigurera.mdwn index 7c249ac..28edfe6 100644 --- a/konfigurera.mdwn +++ b/konfigurera.mdwn @@ -157,13 +157,6 @@ credentials in the following format: [smtp.fripost.org]:587 USERNAME@fripost.org:XXXXXXXX -Now you need to hash the file using `postmap(1)`: - - sudo postmap hash:/etc/postfix/sasl/passwd - -(Postfix doesn't read the file directly, but the compiled lookup table -instead. Thus you'll have to run `postmap(1)` again whenever the file -is updated.) Now add the following to `/etc/postfix/main.cf`: mynetworks_style = host @@ -171,7 +164,7 @@ Now add the following to `/etc/postfix/main.cf`: relayhost = [smtp.fripost.org]:587 smtp_sasl_auth_enable = yes - smtp_sasl_password_maps = hash:/etc/postfix/sasl/passwd + smtp_sasl_password_maps = texthash:/etc/postfix/sasl/passwd smtp_sasl_security_options = noanonymous, noplaintext smtp_sasl_tls_security_options = noanonymous @@ -223,12 +216,6 @@ the `smtp.example.org:587` relayhost for when the envelope sender address is under the `example.org` domain. (The brackets around the hostname tell Postfix not perform MX lookups.) -Ensure to compile the lookup tables for all files that have been edited: - - sudo postmap hash:/etc/postfix/sasl/passwd - sudo postmap hash:/etc/postfix/tls_policy - sudo postmap hash:/etc/postfix/relayhost_map - The configuration in `/etc/postfix/main.cf` is like that of the previous section, except that we're replacing the `smtp_tls_*` options by `smtp_tls_policy_maps`. We also keep a default `relayhost` value for @@ -240,14 +227,14 @@ table. relayhost = [smtp.fripost.org]:587 smtp_sender_dependent_authentication = yes - sender_dependent_relayhost_maps = hash:$config_directory/relayhost_map + sender_dependent_relayhost_maps = texthash:$config_directory/relayhost_map smtp_sasl_auth_enable = yes - smtp_sasl_password_maps = hash:/etc/postfix/sasl/passwd + smtp_sasl_password_maps = texthash:/etc/postfix/sasl/passwd smtp_sasl_security_options = noanonymous, noplaintext smtp_sasl_tls_security_options = noanonymous - smtp_tls_policy_maps = hash:$config_directory/tls_policy + smtp_tls_policy_maps = texthash:$config_directory/tls_policy smtp_tls_fingerprint_digest = sha256 Be sure to reload (or even restart) Postfix after changing the -- cgit v1.2.3