Score:0

Generating sasl_passwd.db in postfix docker container

pk flag

I have a working postfix container that acts as an smtp relay for a local app in another container.

I wish to change the relay to one which requires sasl authentication. This requires generating sasl_passwd.db using command

postmap hash:/etc/postfix/sasl_passwd

My question is what is the best way to accomplish this in a docker container context? Can I just copy the hashed sasl_passwd.db from another server and include it as with any other file? Or generated within the container and extracted? Or .... ?

Things like this confuse me with docker! Any guidance on the best approach is appreciated.

This is the relevant container in docker-compose.yml:

  postfix:
image: juanluisbaptiste/postfix:latest
env_file: postfix.env
volumes:
  - ./postfix-main.cf:/etc/postfix/main.cf
  - ./abcdwildcard_cert_chain.pem:/etc/ssl/certs/abcdwildcard_cert_chain.pem
  - ./abcdwildcard_cert_pvtkey.pem:/etc/ssl/private/abcdwildcard_cert_pvtkey.pem
networks:
  openkm:
    ipv4_address: 172.16.238.12
anx avatar
fr flag
anx
You may not need that: For single-key lookups, there is little benefit in using a lookup method more complicated than `inline:`
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.