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

msmtp: account default not found: no configuration file available #41

Closed
stoically opened this issue Mar 5, 2022 · 4 comments · Fixed by #42 or #43
Closed

msmtp: account default not found: no configuration file available #41

stoically opened this issue Mar 5, 2022 · 4 comments · Fixed by #42 or #43
Labels

Comments

@stoically
Copy link

stoically commented Mar 5, 2022

Behaviour

Steps to reproduce this issue

  1. Start docker container
  2. Try to send an email

Expected behaviour

Sending E-Mail works.

Actual behaviour

Sending E-Mail fails and the log reports

msmtp: account default not found: no configuration file available

Checking msmtp --version reports

msmtp version 1.8.19
Platform: x86_64-alpine-linux-musl
System configuration file name: /usr/etc/msmtprc
User configuration file name: /root/.msmtprc

But the docker-msmtpd init files create the config at /etc/msmtprc.

Workaround: docker exec <container-name> bash -c "ln -s /etc/msmtprc /usr/etc/msmtprc"

Configuration

  • docker hub tag: 1.8.19
  • Docker version (type docker --version) : 20.10.12
  • Platform (Debian 9, Ubuntu 18.04, ...) : Ubuntu 20.10
  • System info (type uname -a) : 5.4.0-100-generic #113-Ubuntu SMP Thu Feb 3 18:43:29 UTC 2022 x86_64 GNU/Linux
  • Include all necessary configuration files : Only ENV variable configuration:
        env:
          TZ: "Europe/Berlin"
          SMTP_HOST: "{{ mailcow_smtp_host }}"
          SMTP_PORT: "{{ mailcow_smtp_port | string }}"
          SMTP_STARTTLS: "on"
          SMTP_TLS: "on"
          SMTP_AUTH: "on"
          SMTP_USER: "{{ mailcow_username }}"
          SMTP_PASSWORD: "{{ mailcow_password }}"
          SMTP_FROM: "noreply@{{ main_domain }}"
          SMTP_TLS_CHECKCERT: "off"

Logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-fix-logs.sh: executing... 
[cont-init.d] 00-fix-logs.sh: exited 0.
[cont-init.d] 01-fix-uidgid.sh: executing... 
[cont-init.d] 01-fix-uidgid.sh: exited 0.
[cont-init.d] 02-config.sh: executing... 
Setting timezone to Europe/Berlin...
Creating configuration...
[cont-init.d] 02-config.sh: exited 0.
[cont-init.d] 03-create-service.sh: executing... 
[cont-init.d] 03-create-service.sh: exited 0.
[cont-init.d] ~-socklog: executing... 
[cont-init.d] ~-socklog: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
msmtp: account default not found: no configuration file available

Thanks for your work on this!

@crazy-max
Copy link
Owner

@stoically Should be fixed now

@stoically
Copy link
Author

@crazy-max Still broken. mstmp does not read the configuration from /etc/msmtprc in my case, but from /usr/etc/msmtprc, where no configuration is available.

@crazy-max
Copy link
Owner

@stoically What's the output of msmtp --version inside the container? Should show:

msmtp version 1.8.19
Platform: x86_64-alpine-linux-musl
TLS/SSL library: GnuTLS
Authentication library: GNU SASL; oauthbearer and xoauth2: built-in
Supported authentication methods:
plain scram-sha-1 external gssapi cram-md5 digest-md5 login oauthbearer xoauth2 
IDN support: enabled
NLS: enabled, LOCALEDIR is /usr/share/locale
Keyring support: Gnome 
System configuration file name: /etc/msmtprc
User configuration file name: /root/.msmtprc

Copyright (C) 2021 Martin Lambers and others.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

@stoically
Copy link
Author

Huh, interesting. Seems to work fine now. Maybe I didn't pull the container properly. Thanks!

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

Successfully merging a pull request may close this issue.

2 participants