install.fairie/home/dot_config/postfix/main.cf.tmpl
2023-08-01 06:28:03 +00:00

23 lines
No EOL
1.1 KiB
Cheetah

### INSTALL DOCTOR MANAGED ### START
# @file SendGrid Postfix configuration
# @brief Configures Postfix to use SendGrid as a relay host
# @description
# This configuration file is appended to `/etc/postfix/main.cf` by one of the scripts. It configures SendGrid
# as a relay host that Postfix can use. More details can be found in the
# [SendGrid documentation on integrating Postfix](https://docs.sendgrid.com/for-developers/sending-email/postfix).
#
# Some FROM addresses do not work properly when using SendGrid. Because of this, the configuration will automatically
# re-write the FROM address to equal `system@public.domain.com`, where `public.domain.com` is the value specified under
# `.host.domain` in `~/.config/chezmoi/chezmoi.yml`.
header_size_limit = 4096000
myhostname = {{ .host.domain }}
relayhost = [smtp.sendgrid.net]:587
smtp_header_checks = regexp:/etc/postfix/header_checks
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_security_level = encrypt
### INSTALL DOCTOR MANAGED ### END