docker-mailserver: Unable to connect via email client
I’ve added a user, verified it by using the setup.sh script (setup.sh email list).
I’m trying to use Thunderbird and add the account but get a “Thunderbird failed to find the settings for your email account”.
Perhaps there is a console email client I could potentially use to test this and get a more informative error message?
I’ve set it up as stated in the wiki here: https://github.com/tomav/docker-mailserver/wiki/FAQ-and-Tips
I’ve also added the following to my hosts file:
127.0.0.1 domain.com
127.0.0.1 mail.domain.com
I’m using docker-compose with the following configuration:
mail:
image: tvial/docker-mailserver:2.1
hostname: mail
domainname: domain.com
container_name: mail
ports:
- "25:25"
- "143:143"
- "587:587"
- "993:993"
volumes:
- maildata:/var/mail
- mailstate:/var/mail-state
- ./config-mail/:/tmp/docker-mailserver/
environment:
- ENABLE_SPAMASSASSIN=1
- ENABLE_CLAMAV=1
- ENABLE_FAIL2BAN=1
- ONE_DIR=1
- DMS_DEBUG=1
cap_add:
- NET_ADMIN
volumes:
maildata:
driver: local
mailstate:
driver: local
Telnet seems to only work on port 25: $ telnet localhost 25
Connected to localhost.
Escape character is '^]'.
220 mail.domain.com ESMTP Postfix (Ubuntu)
telnet localhost 143 telnet localhost 993 telnet localhost 587 (same result for three commands):
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
Recreating mail
Attaching to mail
mail |
mail | #
mail | #
mail | # ENV
mail | #
mail | #
mail |
mail | HOSTNAME=mail
mail | DMS_DEBUG=1
mail | ENABLE_CLAMAV=1
mail | PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
mail | ENABLE_FAIL2BAN=1
mail | ENABLE_SPAMASSASSIN=1
mail | PWD=/
mail | SHLVL=1
mail | HOME=/root
mail | ONE_DIR=1
mail | _=/usr/bin/printenv
mail |
mail | #
mail | #
mail | # docker-mailserver
mail | #
mail | #
mail |
mail | Initializing setup
mail | Registering check,setup,fix,misc and start-daemons functions
mail | * _check_environment_variables() registered
mail | * _check_hostname() registered
mail | * _setup_default_vars() registered
mail | * _setup_dovecot() registered
mail | * _setup_dovecot_local_user() registered
mail | * _setup_dkim() registered
mail | * _setup_ssl() registered
mail | * _setup_docker_permit() registered
mail | * _setup_mailname() registered
mail | * _setup_postfix_override_configuration() registered
mail | * _setup_postfix_sasl_password() registered
mail | * _setup_security_stack() registered
mail | * _setup_postfix_aliases() registered
mail | * _setup_postfix_vhost() registered
mail | * _fix_var_mail_permissions() registered
mail | * _misc_save_states() registered
mail | * _start_daemons_cron() registered
mail | * _start_daemons_rsyslog() registered
mail | * _start_daemons_dovecot() registered
mail | * _start_daemons_opendkim() registered
mail | * _start_daemons_opendmarc() registered
mail | * _start_daemons_postfix() registered
mail | * _start_daemons_fail2ban() registered
mail | * _start_daemons_clamav() registered
mail | * _start_daemons_amavis() registered
mail | Checking configuration
mail | Check that there are no conflicts with env variables [_check_environment_variables]
mail | Check that hostname/domainname is provided (no default docker hostname) [_check_hostname]
mail | * Hostname has been set to mail.domain.com
mail | Configuring mail server
mail | Setting up default variables [_setup_default_vars]
mail | * Set ENABLE_LDAP=0
mail | * Set ENABLE_FETCHMAIL=0
mail | * Set ENABLE_MANAGESIEVE=0
mail | * Set DMS_DEBUG=1
mail | * Set VIRUSMAILS_DELETE_DELAY=7
mail | * Set ENABLE_POP3=0
mail | * Set ENABLE_SASLAUTHD=0
mail | * Set ENABLE_CLAMAV=1
mail | * Set SMTP_ONLY=0
mail | * Set ENABLE_FAIL2BAN=1
mail | * Set ENABLE_SPAMASSASSIN=1
mail | Setting up Dovecot
mail | Setting up Dovecot Local User
mail | * Checking file line endings
mail | * Regenerating postfix user list
mail | * user 'chris' for domain 'chris' with password '********'
mail | Setting up DKIM
mail | * No DKIM key provided. Check the documentation to find how to get your keys.
mail | Setting up SSL
mail | Setting up PERMIT_DOCKER Option
mail | * Adding container ip in my networks
mail | Setting up Mailname
mail | * Creating /etc/mailname
mail | Setting up Postfix Override configuration
mail | * No extra postfix settings loaded because optional '/tmp/docker-mailserver/postfix-main.cf' not provided.
mail | Setting up Postfix SASL Password
mail | * Warning: 'SASL_PASSWD' is not provided. /etc/postfix/sasl_passwd not created.
mail | Setting up Security Stack
mail | * Enabling and configuring spamassassin
mail | * Enabling clamav
mail | * Fail2ban enabled
mail | Setting up Postfix Aliases
mail | * Warning 'config/postfix-virtual.cf' is not provided. No mail alias/forward created.
mail | Setting up Postfix vhost
mail | Fixing /var/mail permissions
mail | * Fixing /var/mail permissions
mail | Starting Misc
mail | * Consolidating all state onto /var/mail-state
mail | * Destination /var/mail-state/spool-postfix exists, linking /var/spool/postfix to it
mail | * Destination /var/mail-state/lib-postfix exists, linking /var/lib/postfix to it
mail | * Destination /var/mail-state/lib-amavis exists, linking /var/lib/amavis to it
mail | * Destination /var/mail-state/lib-clamav exists, linking /var/lib/clamav to it
mail | * Destination /var/mail-state/lib-spamassasin exists, linking /var/lib/spamassasin to it
mail | * Destination /var/mail-state/lib-fail2ban exists, linking /var/lib/fail2ban to it
mail | Starting mail server
mail | Starting cron [ OK ]
mail | Starting rsyslog [ OK ]
mail | Starting dovecot services [ OK ]
mail | Starting opendkim [ OK ]
mail | Starting opendmarc [ OK ]
mail | Starting postfix [ OK ]
mail | Starting fail2ban [ OK ]
mail | Starting clamav [ OK ]
mail | Starting amavis [ OK ]
mail |
mail | #
mail | # mail.domain.com is up and running
mail | #
mail |
mail | Jan 9 12:42:48 mail amavis[1355]: Module Amavis::Conf 2.303
mail | Jan 9 12:42:48 mail amavis[1355]: Module Archive::Zip 1.30
mail | Jan 9 12:42:48 mail amavis[1355]: Module BerkeleyDB 0.54
mail | Jan 9 12:42:48 mail amavis[1355]: Module Compress::Zlib 2.06
mail | Jan 9 12:42:48 mail amavis[1355]: Module Convert::TNEF 0.18
mail | Jan 9 12:42:48 mail amavis[1355]: Module Convert::UUlib 1.4
mail | Jan 9 12:42:48 mail amavis[1355]: Module Crypt::OpenSSL::RSA 0.28
mail | Jan 9 12:42:48 mail amavis[1355]: Module DB_File 1.827
mail | Jan 9 12:42:48 mail amavis[1355]: Module Digest::MD5 2.52
mail | Jan 9 12:42:48 mail amavis[1355]: Module Digest::SHA 5.84_01
mail | Jan 9 12:42:48 mail amavis[1355]: Module File::Temp 0.23
mail | Jan 9 12:42:48 mail amavis[1355]: Module IO::Socket::INET6 2.71
mail | Jan 9 12:42:48 mail amavis[1355]: Module MIME::Entity 5.505
mail | Jan 9 12:42:48 mail amavis[1355]: Module MIME::Parser 5.505
mail | Jan 9 12:42:48 mail amavis[1355]: Module MIME::Tools 5.505
mail | Jan 9 12:42:48 mail amavis[1355]: Module Mail::DKIM::Signer 0.4
mail | Jan 9 12:42:48 mail amavis[1355]: Module Mail::DKIM::Verifier 0.4
mail | Jan 9 12:42:48 mail amavis[1355]: Module Mail::Header 2.12
mail | Jan 9 12:42:48 mail amavis[1355]: Module Mail::Internet 2.12
mail | Jan 9 12:42:48 mail amavis[1355]: Module Mail::SPF v2.009
mail | Jan 9 12:42:48 mail amavis[1355]: Module Mail::SpamAssassin 3.004000
mail | Jan 9 12:42:48 mail amavis[1355]: Module Net::DNS 0.68
mail | Jan 9 12:42:48 mail amavis[1355]: Module Net::Server 2.007
mail | Jan 9 12:42:48 mail amavis[1355]: Module NetAddr::IP 4.071
mail | Jan 9 12:42:48 mail amavis[1355]: Module Razor2::Client::Version 2.84
mail | Jan 9 12:42:48 mail amavis[1355]: Module Socket6 0.25
mail | Jan 9 12:42:48 mail amavis[1355]: Module Time::HiRes 1.9725
mail | Jan 9 12:42:48 mail amavis[1355]: Module URI 1.60
mail | Jan 9 12:42:48 mail amavis[1355]: Module Unix::Syslog 1.1
mail | Jan 9 12:42:48 mail amavis[1355]: Amavis::DB code loaded
mail | Jan 9 12:42:48 mail amavis[1355]: SQL base code NOT loaded
mail | Jan 9 12:42:48 mail amavis[1355]: SQL::Log code NOT loaded
mail | Jan 9 12:42:48 mail amavis[1355]: SQL::Quarantine NOT loaded
mail | Jan 9 12:42:48 mail amavis[1355]: Lookup::SQL code NOT loaded
mail | Jan 9 12:42:48 mail amavis[1355]: Lookup::LDAP code NOT loaded
mail | Jan 9 12:42:48 mail amavis[1355]: AM.PDP-in proto code loaded
mail | Jan 9 12:42:48 mail amavis[1355]: SMTP-in proto code loaded
mail | Jan 9 12:42:48 mail amavis[1355]: Courier proto code NOT loaded
mail | Jan 9 12:42:48 mail amavis[1355]: SMTP-out proto code loaded
mail | Jan 9 12:42:48 mail amavis[1355]: Pipe-out proto code NOT loaded
mail | Jan 9 12:42:48 mail amavis[1355]: BSMTP-out proto code NOT loaded
mail | Jan 9 12:42:48 mail amavis[1355]: Local-out proto code loaded
mail | Jan 9 12:42:48 mail amavis[1355]: OS_Fingerprint code NOT loaded
mail | Jan 9 12:42:48 mail amavis[1355]: ANTI-VIRUS code loaded
mail | Jan 9 12:42:48 mail amavis[1355]: ANTI-SPAM code loaded
mail | Jan 9 12:42:48 mail amavis[1355]: ANTI-SPAM-EXT code NOT loaded
mail | Jan 9 12:42:48 mail amavis[1355]: ANTI-SPAM-C code NOT loaded
mail | Jan 9 12:42:48 mail amavis[1355]: ANTI-SPAM-SA code loaded
mail | Jan 9 12:42:48 mail amavis[1355]: Unpackers code loaded
mail | Jan 9 12:42:48 mail amavis[1355]: DKIM code loaded
mail | Jan 9 12:42:48 mail amavis[1355]: Tools code NOT loaded
mail | Jan 9 12:42:48 mail amavis[1355]: Found $file at /usr/bin/file
mail | Jan 9 12:42:48 mail amavis[1355]: No $altermime, not using it
mail | Jan 9 12:42:48 mail amavis[1355]: Internal decoder for .mail
mail | Jan 9 12:42:48 mail amavis[1355]: No decoder for .F
mail | Jan 9 12:42:48 mail amavis[1355]: Found decoder for .Z at /bin/uncompress
mail | Jan 9 12:42:48 mail amavis[1355]: Internal decoder for .gz
mail | Jan 9 12:42:48 mail amavis[1355]: Found decoder for .bz2 at /bin/bzip2 -d
mail | Jan 9 12:42:48 mail amavis[1355]: No decoder for .xz tried: xzdec, xz -dc, unxz -c, xzcat
mail | Jan 9 12:42:48 mail amavis[1355]: No decoder for .lzma tried: lzmadec, xz -dc --format=lzma, lzma -dc, unlzma -c, lzcat, lzmadec
mail | Jan 9 12:42:48 mail amavis[1355]: No decoder for .lzo tried: lzop -d
mail | Jan 9 12:42:48 mail amavis[1355]: No decoder for .rpm tried: rpm2cpio.pl, rpm2cpio
mail | Jan 9 12:42:48 mail amavis[1355]: Found decoder for .cpio at /bin/pax
mail | Jan 9 12:42:48 mail amavis[1355]: Found decoder for .tar at /bin/pax
mail | Jan 9 12:42:48 mail amavis[1355]: No decoder for .deb tried: ar
mail | Jan 9 12:42:48 mail amavis[1355]: Internal decoder for .zip
mail | Jan 9 12:42:48 mail amavis[1355]: Internal decoder for .kmz
mail | Jan 9 12:42:48 mail amavis[1355]: Found decoder for .7z at /usr/bin/7zr
mail | Jan 9 12:42:48 mail amavis[1355]: No decoder for .rar tried: unrar-free
mail | Jan 9 12:42:48 mail amavis[1355]: Found decoder for .arj at /usr/bin/arj
mail | Jan 9 12:42:48 mail amavis[1355]: No decoder for .arc tried: nomarch, arc
mail | Jan 9 12:42:48 mail amavis[1355]: No decoder for .zoo tried: zoo
mail | Jan 9 12:42:48 mail amavis[1355]: No decoder for .doc tried: ripole
mail | Jan 9 12:42:48 mail amavis[1355]: No decoder for .cab tried: cabextract
mail | Jan 9 12:42:48 mail amavis[1355]: No decoder for .tnef
mail | Jan 9 12:42:48 mail amavis[1355]: Internal decoder for .tnef
mail | Jan 9 12:42:48 mail amavis[1355]: Found decoder for .exe at /usr/bin/arj
mail | Jan 9 12:42:48 mail amavis[1355]: Using primary internal av scanner code for ClamAV-clamd
mail | Jan 9 12:42:48 mail amavis[1355]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
mail | Jan 9 12:42:48 mail amavis[1355]: Deleting db files snmp.db,__db.002,__db.001,__db.003,nanny.db in /var/lib/amavis/db
mail | Jan 9 12:42:48 mail amavis[1355]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.54, libdb 5.3
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 31 (16 by maintainers)
This line is useful! 😃 Port
8891is for DKIM. Service is running? You have provided/generated keys?Not too sure which logs I should be looking at? The one in the docker stdout / stderror has no output when trying to connect via the mail client.
The only output occurs when I try port 25: