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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug report: I cant start docker mail server #3648

Closed
1 task done
patchthecode opened this issue Nov 21, 2023 · 6 comments
Closed
1 task done

bug report: I cant start docker mail server #3648

patchthecode opened this issue Nov 21, 2023 · 6 comments
Labels
area/configuration (file) area/documentation issue/limited support Due to a specific configuration on the user side only limited support is offered kind/bug/report A report about a bug kind/upstream Related to, or resolved by, an upstream project - Not resolvable within DMS os/macOS

Comments

@patchthecode
Copy link

patchthecode commented Nov 21, 2023

馃摑 Preliminary Checks

  • I tried searching for an existing issue and followed the debugging docs advice, but still need assistance.

馃憖 What Happened?

All i tried to do was start docker mail server.
I followed the instructions and created the first email.

When i launched it, the logs were as shown below. It keeps telling me that

2023-11-21 12:48:21 Nov 21 12:48:20 mail amavis[499]: (!)Net::Server: 2023/11/21-12:48:20 Can't connect to UNIX socket at file /var/lib/amavis/amavisd.sock [Address already in use]\n  at line 66 in file /usr/share/perl5/Net/Server/Proto/UNIX.pm

It also had this as shown below in the trace logs.

2023-11-21 12:48:18 sed: couldn't open temporary file /tmp/docker-mailserver/sednXdx4w: Permission denied
2023-11-21 12:48:18 sed: couldn't open temporary file /tmp/docker-mailserver/sedb2K84C: Permission denied
2023-11-21 12:48:18 chown: changing ownership of '/var/mail-state/lib-amavis/amavisd.sock': Invalid argument
2023-11-21 12:48:18 chown: changing ownership of '/var/mail-state/spool-postfix/private/smtpd': Invalid argument

By the way, this worked perfectly on my older MacOs. I was able to send and receive emails etc.
Im just putting the same thing on this other Mac, and im getting these issues.

馃憻 Reproduction Steps

I just tried to start docker mail server.
I didnt do anything else...

馃悑 DMS Version

12.1.0

馃捇 Operating System and Architecture

MacOS Ventura but also fails on MacOS Sonoma

鈿欙笍 Container configuration files

services:
  mailserver:
    image: ghcr.io/docker-mailserver/docker-mailserver:12.1.0
    container_name: mailserver
    # Provide the FQDN of your mail server here (Your DNS MX record should point to this value)
    hostname: mail.threadscape.social
    env_file: mailserver.env
    # More information about the mail-server ports:
    # https://docker-mailserver.github.io/docker-mailserver/latest/config/security/understanding-the-ports/
    # To avoid conflicts with yaml base-60 float, DO NOT remove the quotation marks.
    ports:
      - "25:25"    # SMTP  (explicit TLS => STARTTLS, Authentication is DISABLED => use port 465/587 instead)
      - "143:143"  # IMAP4 (explicit TLS => STARTTLS)
      - "465:465"  # ESMTP (implicit TLS)
      - "587:587"  # ESMTP (explicit TLS => STARTTLS)
      - "993:993"  # IMAP4 (implicit TLS)
    environment:
      - SSL_TYPE=letsencrypt
    volumes:
      - ./docker-data/dms/mail-data/:/var/mail:rw
      - ./docker-data/dms/mail-state/:/var/mail-state:rw
      - ./docker-data/dms/mail-logs/:/var/log/mail:rw
      - ./docker-data/dms/config/:/tmp/docker-mailserver:rw
      - /etc/localtime:/etc/localtime:ro
      - ../Apps/enuxt-certbot/data/certbot/conf:/etc/letsencrypt
    restart: always
    stop_grace_period: 1m
    # Uncomment if using `ENABLE_FAIL2BAN=1`:
    # cap_add:
    #   - NET_ADMIN
    healthcheck:
      test: "ss --listening --tcp | grep -P 'LISTEN.+:smtp' || exit 1"
      timeout: 3s
      retries: 0

networks:
  default:
    name: apps_default
    external: true

馃摐 Relevant log output

Log output
2023-11-21 12:48:18 [  DEBUG  ]  Handling general environment variable setup
2023-11-21 12:48:18 [  TRACE  ]  Setting anti-spam & anti-virus environment variables
2023-11-21 12:48:18 [  TRACE  ]  Setting service-enabling environment variables
2023-11-21 12:48:18 [  TRACE  ]  Setting IP, DNS and SSL environment variables
2023-11-21 12:48:18 [  TRACE  ]  Setting Dovecot- and Postfix-specific environment variables
2023-11-21 12:48:18 [  TRACE  ]  Setting SRS specific environment variables
2023-11-21 12:48:18 [  TRACE  ]  Setting miscellaneous environment variables
2023-11-21 12:48:18 [   INF   ]  Welcome to docker-mailserver 12.1.0
2023-11-21 12:48:18 [  DEBUG  ]  Registering functions
2023-11-21 12:48:18 [  TRACE  ]  _check_improper_restart() registered
2023-11-21 12:48:18 [  TRACE  ]  _check_hostname() registered
2023-11-21 12:48:18 [  TRACE  ]  _check_log_level() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_logs_general() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_timezone() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_dovecot() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_dovecot_sieve() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_dovecot_dhparam() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_dovecot_quota() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_dovecot_local_user() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_dovecot_inet_protocols() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_opendkim() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_opendmarc() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_policyd_spf() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_security_stack() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_spam_to_junk() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_rspamd() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_ssl() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_docker_permit() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_mailname() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_dovecot_hostname() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_postfix_early() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_fetchmail() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_fetchmail_parallel() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_spoof_protection() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_postfix_late() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_logrotate() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_mail_summary() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_logwatch() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_save_states() registered
2023-11-21 12:48:18 [  TRACE  ]  _setup_apply_fixes_after_configuration() registered
2023-11-21 12:48:18 [  TRACE  ]  _environment_variables_export() registered
2023-11-21 12:48:18 [  TRACE  ]  _start_daemon_cron() registered
2023-11-21 12:48:18 [  TRACE  ]  _start_daemon_rsyslog() registered
2023-11-21 12:48:18 [  TRACE  ]  _start_daemon_dovecot() registered
2023-11-21 12:48:18 [  TRACE  ]  _start_daemon_update_check() registered
2023-11-21 12:48:18 [  TRACE  ]  _start_daemon_opendkim() registered
2023-11-21 12:48:18 [  TRACE  ]  _start_daemon_opendmarc() registered
2023-11-21 12:48:18 [  TRACE  ]  _start_daemon_postfix() registered
2023-11-21 12:48:18 [  TRACE  ]  _start_daemon_amavis() registered
2023-11-21 12:48:18 [  TRACE  ]  _start_daemon_changedetector() registered
2023-11-21 12:48:18 [   INF   ]  Checking configuration
2023-11-21 12:48:18 [  DEBUG  ]  Checking for improper restart
2023-11-21 12:48:18 [  DEBUG  ]  Checking that hostname/domainname is provided or overridden
2023-11-21 12:48:18 [  DEBUG  ]  Domain has been set to threadscape.social
2023-11-21 12:48:18 [  DEBUG  ]  Hostname has been set to mail.threadscape.social
2023-11-21 12:48:18 [   INF   ]  Configuring mail server
2023-11-21 12:48:18 [  DEBUG  ]  Setting up general log files
2023-11-21 12:48:18 [  DEBUG  ]  Setting up Dovecot
2023-11-21 12:48:18 [  TRACE  ]  Dovecot default format (maildir) configured
2023-11-21 12:48:18 [  DEBUG  ]  Setting up Dovecot dhparam
2023-11-21 12:48:18 [  TRACE  ]  Dovecot will use official standardized DH parameters (ffdhe4096).
2023-11-21 12:48:18 [  DEBUG  ]  Setting up Dovecot quota
2023-11-21 12:48:18 [  DEBUG  ]  Setting up Dovecot Local User
2023-11-21 12:48:18 [  TRACE  ]  Checking file line endings
2023-11-21 12:48:18 [  TRACE  ]  Regenerating postfix user list
2023-11-21 12:48:18 [  DEBUG  ]  Creating user 'ceo' for domain 'threadscape.social'
2023-11-21 12:48:18 [  DEBUG  ]  Configuring DKIM
2023-11-21 12:48:18 [  TRACE  ]  Adding OpenDKIM to Postfix's milters
2023-11-21 12:48:18 [  DEBUG  ]  OpenDKIM enabled but no DKIM key(s) provided
2023-11-21 12:48:18 [  TRACE  ]  Nameservers added to '/etc/opendkim.conf'
2023-11-21 12:48:18 [  DEBUG  ]  Configuring OpenDMARC
2023-11-21 12:48:18 [  TRACE  ]  Adding OpenDMARC to Postfix's milters
2023-11-21 12:48:18 [  DEBUG  ]  Configuring policyd-spf
2023-11-21 12:48:18 [  DEBUG  ]  Setting up Security Stack
2023-11-21 12:48:18 [  DEBUG  ]  Postgrey is disabled
2023-11-21 12:48:18 [  DEBUG  ]  Configuring Postscreen
2023-11-21 12:48:18 [  DEBUG  ]  Disabling Postscreen DNSBLs
2023-11-21 12:48:18 [  DEBUG  ]  SpamAssassin is disabled
2023-11-21 12:48:18 [  DEBUG  ]  Disabling ClamAV
2023-11-21 12:48:18 [  DEBUG  ]  Fail2Ban is disabled
2023-11-21 12:48:18 [  DEBUG  ]  Configuring Amavis
2023-11-21 12:48:18 [  DEBUG  ]  Spam emails will be moved to the Junk folder
2023-11-21 12:48:18 [  DEBUG  ]  Rspamd is disabled
2023-11-21 12:48:18 [  DEBUG  ]  Setting up SSL
2023-11-21 12:48:18 [  DEBUG  ]  TLS configured with 'modern' ciphers
2023-11-21 12:48:18 [  DEBUG  ]  Configuring SSL using 'letsencrypt'
2023-11-21 12:48:18 [  TRACE  ]  Adding threadscape.social SSL certificate to the postfix and dovecot configuration
2023-11-21 12:48:18 [  TRACE  ]  SSL configured with 'letsencrypt' certificates
2023-11-21 12:48:18 [  DEBUG  ]  Setting up PERMIT_DOCKER option
2023-11-21 12:48:18 [  TRACE  ]  Clearing Postfix's 'mynetworks'
2023-11-21 12:48:18 [  DEBUG  ]  Setting up mailname and creating '/etc/mailname'
2023-11-21 12:48:18 [  DEBUG  ]  Applying hostname to Dovecot
2023-11-21 12:48:18 [  DEBUG  ]  Configuring Postfix (early setup)
2023-11-21 12:48:18 [  TRACE  ]  (Postfix setup) Applying hostname and domainname
2023-11-21 12:48:18 [  TRACE  ]  (Postfix setup) Disabling SMTPUTF8 support
2023-11-21 12:48:18 [  TRACE  ]  (Postfix setup) Configuring SASLauthd
2023-11-21 12:48:18 [  TRACE  ]  (Postfix setup) Setting up aliases
2023-11-21 12:48:18 [  DEBUG  ]  '/tmp/docker-mailserver/postfix-virtual.cf' not provided - no mail alias/forward created
2023-11-21 12:48:18 [  TRACE  ]  Configuring root alias
2023-11-21 12:48:18 [  TRACE  ]  (Postfix setup) Setting up Postfix vhost
2023-11-21 12:48:18 [  TRACE  ]  (Postfix setup) Setting up DH Parameters
2023-11-21 12:48:18 [  DEBUG  ]  Setting up Postfix dhparam
2023-11-21 12:48:18 [  TRACE  ]  Postfix will use official standardized DH parameters (ffdhe4096).
2023-11-21 12:48:18 [  TRACE  ]  (Postfix setup) Configuring message size limit to '10240000'
2023-11-21 12:48:18 [  TRACE  ]  (Postfix setup) Configuring mailbox size limit to '0'
2023-11-21 12:48:18 [  TRACE  ]  (Postfix setup) Configuring virtual mailbox size limit to '0'
2023-11-21 12:48:18 [  DEBUG  ]  Fetchmail is disabled
2023-11-21 12:48:18 [  DEBUG  ]  Fetchmail parallel is disabled
2023-11-21 12:48:18 [  DEBUG  ]  Spoof protection is disabled
2023-11-21 12:48:18 [  DEBUG  ]  Configuring Postfix (late setup)
2023-11-21 12:48:18 [  TRACE  ]  (Postfix setup) Configuring user access
2023-11-21 12:48:18 [  TRACE  ]  (Postfix setup) Configuring relay host
2023-11-21 12:48:18 [  DEBUG  ]  Setting up Postfix Relay Hosts
2023-11-21 12:48:18 [  DEBUG  ]  (Postfix setup) Overriding / adjusting configuration with user-supplied values
2023-11-21 12:48:18 [  TRACE  ]  (Postfix setup) No extra Postfix settings loaded because optional '/tmp/docker-mailserver/postfix-main.cf' was not provided
2023-11-21 12:48:18 [  TRACE  ]  (Postfix setup) No extra Postfix settings loaded because optional '/tmp/docker-mailserver/postfix-master.cf' was not provided
2023-11-21 12:48:18 [  DEBUG  ]  Setting up logrotate
2023-11-21 12:48:18 [  TRACE  ]  Setting postfix logrotate interval to weekly
2023-11-21 12:48:18 [  DEBUG  ]  Postfix log summary reports disabled
2023-11-21 12:48:18 [  DEBUG  ]  Logwatch reports disabled.
2023-11-21 12:48:18 [  DEBUG  ]  Consolidating all state onto /var/mail-state
2023-11-21 12:48:18 [  TRACE  ]  Destination /var/mail-state/lib-logrotate exists, linking /var/lib/logrotate to it
2023-11-21 12:48:18 [  TRACE  ]  Destination /var/mail-state/lib-postfix exists, linking /var/lib/postfix to it
2023-11-21 12:48:18 sed: couldn't open temporary file /tmp/docker-mailserver/sednXdx4w: Permission denied
2023-11-21 12:48:18 sed: couldn't open temporary file /tmp/docker-mailserver/sedb2K84C: Permission denied
2023-11-21 12:48:18 chown: changing ownership of '/var/mail-state/lib-amavis/amavisd.sock': Invalid argument
2023-11-21 12:48:18 chown: changing ownership of '/var/mail-state/spool-postfix/private/smtpd': Invalid argument
2023-11-21 12:48:18 [  TRACE  ]  Destination /var/mail-state/spool-postfix exists, linking /var/spool/postfix to it
2023-11-21 12:48:18 [  TRACE  ]  Destination /var/mail-state/lib-amavis exists, linking /var/lib/amavis to it
2023-11-21 12:48:18 [  TRACE  ]  Destination /var/mail-state/lib-dovecot exists, linking /var/lib/dovecot to it
2023-11-21 12:48:18 [  TRACE  ]  Fixing /var/mail-state/* permissions
2023-11-21 12:48:18 [  TRACE  ]  Removing leftover PID files from a stop/start
2023-11-21 12:48:18 [  DEBUG  ]  Checking /var/mail permissions
2023-11-21 12:48:18 [  DEBUG  ]  Removing files and directories from older versions
2023-11-21 12:48:18 [  DEBUG  ]  Exporting environment variables now (creating '/etc/dms-settings')
2023-11-21 12:48:18 [  DEBUG  ]  Setting up configuration checksum file
2023-11-21 12:48:18 [  TRACE  ]  Creating '/tmp/docker-mailserver-config-chksum'
2023-11-21 12:48:18 [  DEBUG  ]  Printing environment variables. Make sure no sensitive data is copied.
2023-11-21 12:48:18 ACCOUNT_PROVISIONER='FILE'
2023-11-21 12:48:18 AMAVIS_LOGLEVEL='0'
2023-11-21 12:48:18 CLAMAV_MESSAGE_SIZE_LIMIT='25M'
2023-11-21 12:48:18 DEFAULT_RELAY_HOST=''
2023-11-21 12:48:18 DOVECOT_INET_PROTOCOLS='all'
2023-11-21 12:48:18 DOVECOT_MAILBOX_FORMAT='maildir'
2023-11-21 12:48:18 DOVECOT_TLS='no'
2023-11-21 12:48:18 ENABLE_AMAVIS='1'
2023-11-21 12:48:18 ENABLE_CLAMAV='0'
2023-11-21 12:48:18 ENABLE_DNSBL='0'
2023-11-21 12:48:18 ENABLE_FAIL2BAN='0'
2023-11-21 12:48:18 ENABLE_FETCHMAIL='0'
2023-11-21 12:48:18 ENABLE_MANAGESIEVE='0'
2023-11-21 12:48:18 ENABLE_OPENDKIM='1'
2023-11-21 12:48:18 ENABLE_OPENDMARC='1'
2023-11-21 12:48:18 ENABLE_POLICYD_SPF='1'
2023-11-21 12:48:18 ENABLE_POP3='0'
2023-11-21 12:48:18 ENABLE_POSTGREY='0'
2023-11-21 12:48:18 ENABLE_QUOTAS='1'
2023-11-21 12:48:18 ENABLE_RSPAMD='0'
2023-11-21 12:48:18 ENABLE_RSPAMD_REDIS='0'
2023-11-21 12:48:18 ENABLE_SASLAUTHD='0'
2023-11-21 12:48:18 ENABLE_SPAMASSASSIN='0'
2023-11-21 12:48:18 ENABLE_SPAMASSASSIN_KAM='0'
2023-11-21 12:48:18 ENABLE_SRS='0'
2023-11-21 12:48:18 ENABLE_UPDATE_CHECK='1'
2023-11-21 12:48:18 FAIL2BAN_BLOCKTYPE='drop'
2023-11-21 12:48:18 FETCHMAIL_PARALLEL='0'
2023-11-21 12:48:18 FETCHMAIL_POLL='300'
2023-11-21 12:48:18 LOGROTATE_INTERVAL='weekly'
2023-11-21 12:48:18 LOGWATCH_INTERVAL='none'
2023-11-21 12:48:18 LOGWATCH_RECIPIENT='postmaster@threadscape.social'
2023-11-21 12:48:18 LOGWATCH_SENDER='mailserver-report@mail.threadscape.social'
2023-11-21 12:48:18 LOG_LEVEL='trace'
2023-11-21 12:48:18 MOVE_SPAM_TO_JUNK='1'
2023-11-21 12:48:18 NETWORK_INTERFACE='eth0'
2023-11-21 12:48:18 ONE_DIR='1'
2023-11-21 12:48:18 OVERRIDE_HOSTNAME=''
2023-11-21 12:48:18 PERMIT_DOCKER='none'
2023-11-21 12:48:18 PFLOGSUMM_RECIPIENT='postmaster@threadscape.social'
2023-11-21 12:48:18 PFLOGSUMM_SENDER='mailserver-report@mail.threadscape.social'
2023-11-21 12:48:18 PFLOGSUMM_TRIGGER='none'
2023-11-21 12:48:18 POSTFIX_DAGENT=''
2023-11-21 12:48:18 POSTFIX_INET_PROTOCOLS='all'
2023-11-21 12:48:18 POSTFIX_MAILBOX_SIZE_LIMIT='0'
2023-11-21 12:48:18 POSTFIX_MESSAGE_SIZE_LIMIT='10240000'
2023-11-21 12:48:18 POSTFIX_REJECT_UNKNOWN_CLIENT_HOSTNAME='0'
2023-11-21 12:48:18 POSTGREY_AUTO_WHITELIST_CLIENTS='5'
2023-11-21 12:48:18 POSTGREY_DELAY='300'
2023-11-21 12:48:18 POSTGREY_MAX_AGE='35'
2023-11-21 12:48:18 POSTGREY_TEXT='Delayed by Postgrey'
2023-11-21 12:48:18 POSTMASTER_ADDRESS='postmaster@threadscape.social'
2023-11-21 12:48:18 POSTSCREEN_ACTION='enforce'
2023-11-21 12:48:18 RELAY_HOST=''
2023-11-21 12:48:18 REPORT_RECIPIENT='postmaster@threadscape.social'
2023-11-21 12:48:18 REPORT_SENDER='mailserver-report@mail.threadscape.social'
2023-11-21 12:48:18 RSPAMD_GREYLISTING='0'
2023-11-21 12:48:18 RSPAMD_HFILTER='1'
2023-11-21 12:48:18 RSPAMD_HFILTER_HOSTNAME_UNKNOWN_SCORE='6'
2023-11-21 12:48:18 RSPAMD_LEARN='0'
2023-11-21 12:48:18 SA_KILL='10.0'
2023-11-21 12:48:18 SA_SPAM_SUBJECT='***SPAM*****'
2023-11-21 12:48:18 SA_TAG2='6.31'
2023-11-21 12:48:18 SA_TAG='2.0'
2023-11-21 12:48:18 SMTP_ONLY='0'
2023-11-21 12:48:18 SPAMASSASSIN_SPAM_TO_INBOX='1'
2023-11-21 12:48:18 SPOOF_PROTECTION='0'
2023-11-21 12:48:18 SRS_DOMAINNAME='threadscape.social'
2023-11-21 12:48:18 SRS_EXCLUDE_DOMAINS=''
2023-11-21 12:48:18 SRS_SECRET=''
2023-11-21 12:48:18 SRS_SENDER_CLASSES='envelope_sender'
2023-11-21 12:48:18 SSL_TYPE='letsencrypt'
2023-11-21 12:48:18 SUPERVISOR_LOGLEVEL='warn'
2023-11-21 12:48:18 TLS_LEVEL='modern'
2023-11-21 12:48:18 TZ=''
2023-11-21 12:48:18 UPDATE_CHECK_INTERVAL='1d'
2023-11-21 12:48:18 VIRUSMAILS_DELETE_DELAY='7'
2023-11-21 12:48:18 [  TRACE  ]  No optional '/tmp/docker-mailserver/user-patches.sh' provided
2023-11-21 12:48:18 [   INF   ]  Starting daemons
2023-11-21 12:48:18 [  DEBUG  ]  Starting cron
2023-11-21 12:48:19 [  DEBUG  ]  Starting rsyslog
2023-11-21 12:48:19 [  DEBUG  ]  Starting dovecot
2023-11-21 12:48:19 [  DEBUG  ]  Starting update-check
2023-11-21 12:48:19 [  DEBUG  ]  Starting opendkim
2023-11-21 12:48:19 [  DEBUG  ]  Starting opendmarc
2023-11-21 12:48:19 [  DEBUG  ]  Starting postfix
2023-11-21 12:48:20 [  DEBUG  ]  Starting amavis
2023-11-21 12:48:20 [  DEBUG  ]  Starting changedetector
2023-11-21 12:48:20 [   INF   ]  mail.threadscape.social is up and running
2023-11-21 12:48:21 Nov 21 12:48:20 mail amavis[499]: starting. /usr/sbin/amavisd-new at mail.threadscape.social amavisd-new-2.11.1 (20181009), Unicode aware, LC_CTYPE="C.UTF-8"
2023-11-21 12:48:21 Nov 21 12:48:20 mail amavis[499]: perl=5.032001, user=, EUID: 109 (109);  group=, EGID: 111 111 (111 111)
2023-11-21 12:48:21 Nov 21 12:48:20 mail amavis[499]: (!)Net::Server: 2023/11/21-12:48:20 Can't connect to UNIX socket at file /var/lib/amavis/amavisd.sock [Address already in use]\n  at line 66 in file /usr/share/perl5/Net/Server/Proto/UNIX.pm
2023-11-21 12:48:22 Nov 21 12:48:21 mail amavis[592]: starting. /usr/sbin/amavisd-new at mail.threadscape.social amavisd-new-2.11.1 (20181009), Unicode aware, LC_CTYPE="C.UTF-8"
2023-11-21 12:48:22 Nov 21 12:48:21 mail amavis[592]: perl=5.032001, user=, EUID: 109 (109);  group=, EGID: 111 111 (111 111)
2023-11-21 12:48:22 Nov 21 12:48:21 mail amavis[592]: (!)Net::Server: 2023/11/21-12:48:21 Can't connect to UNIX socket at file /var/lib/amavis/amavisd.sock [Address already in use]\n  at line 66 in file /usr/share/perl5/Net/Server/Proto/UNIX.pm
2023-11-21 12:48:23 Nov 21 12:48:22 mail amavis[599]: starting. /usr/sbin/amavisd-new at mail.threadscape.social amavisd-new-2.11.1 (20181009), Unicode aware, LC_CTYPE="C.UTF-8"
2023-11-21 12:48:23 Nov 21 12:48:22 mail amavis[599]: perl=5.032001, user=, EUID: 109 (109);  group=, EGID: 111 111 (111 111)
2023-11-21 12:48:23 Nov 21 12:48:22 mail amavis[599]: (!)Net::Server: 2023/11/21-12:48:22 Can't connect to UNIX socket at file /var/lib/amavis/amavisd.sock [Address already in use]\n  at line 66 in file /usr/share/perl5/Net/Server/Proto/UNIX.pm
2023-11-21 12:48:24 Nov 21 12:48:24 mail amavis[609]: starting. /usr/sbin/amavisd-new at mail.threadscape.social amavisd-new-2.11.1 (20181009), Unicode aware, LC_CTYPE="C.UTF-8"
2023-11-21 12:48:24 Nov 21 12:48:24 mail amavis[609]: perl=5.032001, user=, EUID: 109 (109);  group=, EGID: 111 111 (111 111)
2023-11-21 12:48:24 Nov 21 12:48:24 mail amavis[609]: (!)Net::Server: 2023/11/21-12:48:24 Can't connect to UNIX socket at file /var/lib/amavis/amavisd.sock [Address already in use]\n  at line 66 in file /usr/share/perl5/Net/Server/Proto/UNIX.pm
2023-11-21 12:48:25 Nov 21 12:48:25 mail amavis[616]: starting. /usr/sbin/amavisd-new at mail.threadscape.social amavisd-new-2.11.1 (20181009), Unicode aware, LC_CTYPE="C.UTF-8"
2023-11-21 12:48:25 Nov 21 12:48:25 mail amavis[616]: perl=5.032001, user=, EUID: 109 (109);  group=, EGID: 111 111 (111 111)

Improvements to this form?

No response

@patchthecode patchthecode added kind/bug/report A report about a bug meta/needs triage This issue / PR needs checks and verification from maintainers labels Nov 21, 2023
@polarathene
Copy link
Member

polarathene commented Nov 21, 2023

macOS woes with Docker in general

macOS is known to have problems with Docker support in general. IIRC:

  • There are issues with the volume driver support (Docker with macOS has several but each with different issues AFAIK)
  • There is something to do with host to volume ownership/permissions syncing. Since Docker is run in a VM guest on macOS and the volume binding has to handle:
    • host(macOS) => VM guest OS => Docker container OS where there is several different filesystem layers involved and between host + VM file sync.
    • Some file types like sockets, or their locations aren't well supported in that mix IIRC.
    • The owner is forced to a specific user (root perhaps?), and that prevents persisting some state correctly which causes permission issues within the container I think. Similar to problems users encounter with remote filesystems like NFS.

These are not things we have any influence over with DMS so we cannot assist you with that.

macOS workaround (use Docker via a VM guest yourself)

Generally anyone using DMS on macOS is doing so for local dev use, rather than production deployment. If you need this you are advised to instead:

  1. Use a proper VM guest (VirtualBox, VMware, etc).
  2. Install a Linux distro in that (very easy, try Ubuntu).
  3. Install Docker in that (Docker has official step-by-step guide in their docs, or you can try your luck with distro packages).

With software like VMware, you can:

  • Enjoy copy/paste support between host and guest.
  • Share host folders to the guest where it'll sync files (not advised to use this for frequently updated data, the Docker container volumes should stick to native Linux filesystems in the VM guest and not try to bind mount this shared folder to macOS).
  • You can also setup the network to be reachable by the host if you need software on the host to reach the container in the VM.

It's extra effort, and while that is inconvenient it does workaround the issues with Dockers support on macOS.


DMS has limited support for macOS

By the way, this worked perfectly on my older MacOs. I was able to send and receive emails etc.
Im just putting the same thing on this other Mac, and im getting these issues.

Just in case you didn't see it while filing a bug report:

image

Again, DMS has very little influence over the breakage you're experiencing. There's probably other differences in your environment such as versions of Docker and what storage driver they're using, or something in the newer OS fixes/breaks that support.

Volume workarounds

However, given the context that this is a throwaway container for local testing / experimenting:

  • You can avoid the errors with /var/mail-state, don't mount anything there as there is no value to persisting any of it if you're not running production.
  • You may do similar for other volumes, including /tmp/docker-mailserver depending on your needs.
    • For some persistence, so that you don't have to create a mail account each time you could use a named data volume instead of a bind mount volume. Instead of a local filepath on macOS just provide a name dms-config:/tmp/docker-mailserver.
    • You won't have local access to those files now, but can still do so via docker exec -it container_name bash to use the CLI within the container.

@polarathene polarathene added area/documentation os/macOS area/configuration (file) issue/limited support Due to a specific configuration on the user side only limited support is offered kind/upstream Related to, or resolved by, an upstream project - Not resolvable within DMS and removed meta/needs triage This issue / PR needs checks and verification from maintainers labels Nov 21, 2023
@patchthecode
Copy link
Author

This was meant to be a production server. MacOS.
So, I guess my best option is MacOS -> running VirtualBox -> Running Ubuntu -> Running Docker -> Running DMS?

@polarathene
Copy link
Member

This was meant to be a production server. MacOS.

That is honestly an odd choice to deploy production on. Most commonly you'd encounter Linux and sometimes Windows, at least I rarely hear of macOS being used for production beyond perhaps a homelab.

So, I guess my best option is MacOS -> running VirtualBox -> Running Ubuntu -> Running Docker -> Running DMS?

Yes. Any hypervisor + linux distro should be fine for the most part.

If you're new to linux, Ubuntu is often a good choice; for production you may want to upgrade to 24.04 LTS when released next year. I'd encourage installing Docker v24+, which is easily done by following Dockers documentation.

If you want the Ubuntu VM to run a full desktop environment instead of as a headless server, should VirtualBox not work well for you VMware can provide a smooth hardware accelerated experience.

@patchthecode
Copy link
Author

thanks. will try this and report back.

@patchthecode
Copy link
Author

patchthecode commented Nov 22, 2023

i came across this issue for Docker Desktop and Macos. docker/for-mac#6614

They babble for quite some time of stuff i dont understand. But they mention VirtioFS verses gRPC.
So i went to my Docker Desktop for Mac and changed it from VirtioFS to gRPC FUSE and now it seems the permissions work correctly.

Screenshot 2023-11-22 at 8 25 20鈥疉M

mailserver now works.
So maybe for MacOs users, this is your issue

@polarathene
Copy link
Member

VirtioFS verses gRPC

These are the options I was referring to as volume drivers.

Thanks for sharing your solution! 鉂わ笍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/configuration (file) area/documentation issue/limited support Due to a specific configuration on the user side only limited support is offered kind/bug/report A report about a bug kind/upstream Related to, or resolved by, an upstream project - Not resolvable within DMS os/macOS
Projects
None yet
Development

No branches or pull requests

2 participants