Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sockets in a persistent volume #66

Closed
bcroq opened this issue Mar 29, 2021 · 3 comments
Closed

Sockets in a persistent volume #66

bcroq opened this issue Mar 29, 2021 · 3 comments

Comments

@bcroq
Copy link
Contributor

bcroq commented Mar 29, 2021

We get errors when backuping the persistent volume used for /var/spool/mail because it contains a lot of sockets.

Is it a good idea to put these sockets in a persistent volume?

@bokysan
Copy link
Owner

bokysan commented May 18, 2021

because it contains a lot of sockets

Can you provide a bit more info? Postfix is directed to use /var/spool/mail as the mail_spool_directory.

I am not familiar with any configuration which would direct postfix to put the socket connections elsewhere.

@bcroq
Copy link
Contributor Author

bcroq commented May 19, 2021

I use the 3.0.0 chart with persistence enabled.

Here is the configuration:

mail:
  fullnameOverride: mail
  config:
    general:
      ALLOWED_SENDER_DOMAINS: example.com
      RELAYHOST: "[mailhog.ns.svc.cluster.local]:1025"
      TZ: Europe/Paris
  persistence:
    enabled: true
    size: 100Mi
    existingClaim: my-claim

Here is the list of the sockets found in the volume:

$ kubectl -n ns exec -it mail-0 -- /bin/bash
bash-5.1# find /var/spool/postfix/ -type s
/var/spool/postfix/private/scache
/var/spool/postfix/private/error
/var/spool/postfix/private/tlsmgr
/var/spool/postfix/private/retry
/var/spool/postfix/private/virtual
/var/spool/postfix/private/proxymap
/var/spool/postfix/private/local
/var/spool/postfix/private/relay
/var/spool/postfix/private/smtp
/var/spool/postfix/private/lmtp
/var/spool/postfix/private/discard
/var/spool/postfix/private/proxywrite
/var/spool/postfix/private/anvil
/var/spool/postfix/private/defer
/var/spool/postfix/private/rewrite
/var/spool/postfix/private/verify
/var/spool/postfix/private/trace
/var/spool/postfix/private/bounce
/var/spool/postfix/public/pickup
/var/spool/postfix/public/qmgr
/var/spool/postfix/public/showq
/var/spool/postfix/public/cleanup
/var/spool/postfix/public/flush
/var/spool/postfix/public/postlog

@bokysan
Copy link
Owner

bokysan commented May 29, 2021

According to postfix documentation (emphasis mine):

Note that a chrooted daemon resolves all filenames relative to the Postfix queue directory (/var/spool/postfix). For successful use of a chroot jail, most UNIX systems require you to bring in some files or device nodes. The examples/chroot-setup directory in the source code distribution has a collection of scripts that help you set up Postfix chroot environments on different operating systems.

I will update the next version of helm chart to map /var/spool/postfix/private and /var/spool/postfix/public into tmpDir -- hopefully this will do the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants