when running postconf the last line without line ending gets combined with one of the lines in the postconf command. for next version add empty lines to main.cf . quick fix is to add the contents of last line to the postconf command.
docker exec -it postfix postconf -e \
"relayhost = email-smtp.us-east-1.amazonaws.com:587" \
"smtp_sasl_auth_enable = yes" \
"smtp_sasl_security_options = noanonymous" \
"smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd" \
"smtp_use_tls = yes" \
"smtp_tls_security_level = encrypt" \
"smtp_tls_note_starttls_offer = yes"
the above would end up looking like
smtpd_tls_auth_only = yes
inet_protocols = ipv4smtp_tls_note_starttls_offer = yes
smtp_tls_security_level = encrypt
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
relayhost = email-smtp.us-east-1.amazonaws.com:587
smtp_sasl_auth_enable = yes
```
`
The line starting with inet_protocols got combined
The solution was to add the last line to the postconf command , then it worked.
```
docker exec -it postfix postconf -e \
"inet_protocols = ipv4" \
"relayhost = email-smtp.us-east-1.amazonaws.com:587" \
"smtp_sasl_auth_enable = yes" \
"smtp_sasl_security_options = noanonymous" \
"smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd" \
"smtp_use_tls = yes" \
"smtp_tls_security_level = encrypt" \
"smtp_tls_note_starttls_offer = yes"
```
when running postconf the last line without line ending gets combined with one of the lines in the postconf command. for next version add empty lines to main.cf . quick fix is to add the contents of last line to the postconf command.
the above would end up looking like