When testing this setup via thunderbird I get the error "Cannot get server configuration"
I am also using jwilders nginx proxy and let's encrypt companion. I used this to setup ssl according to your wiki.
I am getting issues when starting this container - here is my setup and log file:
Here is my docker-compose.yml file:
version: '3.3'
services:
mail-server:
image: tvial/docker-mailserver:latest
hostname: mail
domainname: aimatz.com
container_name: mail-server
ports:
- "25:25"
- "143:143"
- "587:587"
- "993:993"
volumes:
- maildata:/var/mail
- mailstate:/var/mail-state
- ./config:/tmp/docker-mailserver
environment:
- ENABLE_SPAMASSASSIN=1
- ENABLE_CLAMAV=1
- ENABLE_FAIL2BAN=1
- ENABLE_POSTGREY=1
- ONE_DIR=1
- DMS_DEBUG=0
- SSL_TYPE=letsencrypt
- [email protected]
- MAIL_PASS=*****
cap_add:
- NET_ADMIN
restart: always
networks:
- default
networks:
default:
external:
name: docker_default
volumes:
maildata:
driver: local
mailstate:
driver: local
root@digitalish-core:~/docker/mail-server# docker-compose up
Creating mail-server ...
Creating mail-server ... done
Attaching to mail-server
mail-server | 2018-02-26 04:59:20,923 CRIT Supervisor running as root (no user in config file)
mail-server | 2018-02-26 04:59:20,923 INFO Included extra file "/etc/supervisor/conf.d/saslauth.conf" during parsing
mail-server | 2018-02-26 04:59:20,923 INFO Included extra file "/etc/supervisor/conf.d/supervisor-app.conf" during parsing
mail-server | 2018-02-26 04:59:20,933 INFO RPC interface 'supervisor' initialized
mail-server | 2018-02-26 04:59:20,934 CRIT Server 'unix_http_server' running without any HTTP authentication checking
mail-server | 2018-02-26 04:59:20,934 INFO supervisord started with pid 5
mail-server | 2018-02-26 04:59:21,937 INFO spawned: 'postsrsd' with pid 8
mail-server | 2018-02-26 04:59:21,941 INFO spawned: 'mailserver' with pid 9
mail-server |
mail-server | 2018-02-26 04:59:21,959 INFO success: postsrsd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mail-server | 2018-02-26 04:59:21,959 INFO success: mailserver entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mail-server | #
mail-server | #
mail-server | # docker-mailserver
mail-server | #
mail-server | #
mail-server |
mail-server | Initializing setup
mail-server | Checking configuration
mail-server | Configuring mail server
mail-server | 2018-02-26 04:59:21,979 INFO exited: postsrsd (exit status 0; expected)
mail-server | Generating DH parameters, 2048 bit long safe prime, generator 2
mail-server | This is going to take a long time
mail-server | .....................................................................................................................................................+............................................+..............................................................................................................................................................................+...................................................................................................................................................................................................................................+............................+....+.........................................................................................................................................................................................................................................................................................................................+...................................................................+..............................................................................................................................................................................................................+..................................................................................................................................................................................................+........+.............................................................................................+...........................................................................................................................+........................................................................................................+..................................................................................................................+.................................+..........................................................................................................................+..................................................................................................................................................................+........................................................................................................................+...................................................................................................................................................................+.......................................+.............................................+..........+..................................................................................................................+..................+.................................................................................................................................+.+.................................................................................+................................................................................................................................+.................................................................+....+.............+.......................................................+........................................................................................................................................................................................................................................................................+.................................................................................................................................................................+............................................................................................................................................................................+.................................................................................................................................................+.....................+...+............................................................................................................................................................................................................................................................+..+......................................................................................................................................................+.....................................................................................................................+.................................+........................................................................................................+............................................................................................................................................................................................................................+.............+......+......................+..............................................................................................+.................+.........................+......................+...........................................................................................................................................................................+...............................................+........................................................................................................................................................................................+..........................................................+.........................................+......................................................................+..............+............................+...................................................+..............................................................................................................................................................................................................................+...............................................................................................................................+...............................+................................................................+........................................................+...............................................................................................................+......................+...................................................................+............................................................................................................+.............................................................................+.........+...........................................................................................................................................................................................................................................................................................+........................................................................................................................................................................................................+.................+............................................................+.....+.........................................+.............................................................................+...............................................................+..............................+...................................+.........................................................................................................................................................................................................................................................................................................................................................................+.............+.........................................+................................+........................+..........+....................................................................................................................................................................................................................................................................................................................................................................+............................+.....................+.........................................................................................................................................................................................................+.............................................................................................................................................................................................................................+.....................................................................................................+...........................................................+....+.........+.........................+..........................+.......................................................................................................................................................................................................................................................................+...............+.................................................+.....................................................................................................................................................................................+................................................................................................................................................................................................................................+........................+..........+............................+.......................................................+..................................................................................................+..............................................................................................+....................................+....................+......................................................++++
mail-server | find: '/var/mail-state/lib-amavis': No such file or directory
mail-server | Starting Misc
mail-server | Starting mail server
mail-server | 2018-02-26 05:01:42,043 INFO spawned: 'cron' with pid 166
mail-server | 2018-02-26 05:01:42,045 INFO success: cron entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mail-server | cron: started
mail-server | 2018-02-26 05:01:42,387 INFO spawned: 'rsyslog' with pid 168
mail-server | 2018-02-26 05:01:42,387 INFO success: rsyslog entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mail-server | rsyslog: started
mail-server | 2018-02-26 05:01:42,649 INFO spawned: 'dovecot' with pid 172
mail-server | 2018-02-26 05:01:42,650 INFO success: dovecot entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mail-server | dovecot: started
mail-server | 2018-02-26 05:01:43,039 INFO spawned: 'opendkim' with pid 181
mail-server | 2018-02-26 05:01:43,041 INFO success: opendkim entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mail-server | opendkim: started
mail-server | 2018-02-26 05:01:43,365 INFO spawned: 'opendmarc' with pid 189
mail-server | 2018-02-26 05:01:43,367 INFO success: opendmarc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mail-server | opendmarc: started
mail-server | 2018-02-26 05:01:43,648 INFO spawned: 'postgrey' with pid 197
mail-server | 2018-02-26 05:01:43,649 INFO success: postgrey entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mail-server | postgrey: started
mail-server | 2018-02-26 05:01:43,895 INFO spawned: 'postfix' with pid 199
mail-server | 2018-02-26 05:01:43,896 INFO success: postfix entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mail-server | postfix: started
mail-server | 2018-02-26 05:01:44,250 INFO spawned: 'fail2ban' with pid 237
mail-server | 2018-02-26 05:01:44,251 INFO success: fail2ban entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mail-server | fail2ban: started
mail-server | 2018-02-26 05:01:44,596 INFO spawned: 'clamav' with pid 263
mail-server | 2018-02-26 05:01:44,602 INFO success: clamav entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mail-server | clamav: started
mail-server | 2018-02-26 05:01:45,018 INFO spawned: 'changedetector' with pid 295
mail-server | 2018-02-26 05:01:45,020 INFO success: changedetector entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mail-server | changedetector: started
mail-server | 2018-02-26 05:01:45,544 INFO spawned: 'amavis' with pid 424
mail-server | 2018-02-26 05:01:45,545 INFO success: amavis entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mail-server | amavis: started
mail-server |
mail-server | #
mail-server | # mail.aimatz.com is up and running
mail-server | #
mail-server |
mail-server | Feb 26 05:01:46 mail amavis[424]: starting. /usr/sbin/amavisd-new at mail.aimatz.com amavisd-new-2.10.1 (20141025), Unicode aware
mail-server | Feb 26 05:01:46 mail amavis[424]: Net::Server: Group Not Defined. Defaulting to EGID '111 111'
mail-server | Feb 26 05:01:46 mail amavis[424]: Net::Server: User Not Defined. Defaulting to EUID '109'
mail-server | Feb 26 05:01:46 mail amavis[424]: Module Amavis::Conf 2.404
mail-server | Feb 26 05:01:46 mail amavis[424]: Module Archive::Zip 1.59
mail-server | Feb 26 05:01:46 mail amavis[424]: Module BerkeleyDB 0.55
mail-server | Feb 26 05:01:46 mail amavis[424]: Module Compress::Raw::Zlib 2.069
mail-server | Feb 26 05:01:46 mail amavis[424]: Module Compress::Zlib 2.069001
mail-server | Feb 26 05:01:46 mail amavis[424]: Module Crypt::OpenSSL::RSA 0.28
mail-server | Feb 26 05:01:46 mail amavis[424]: Module DB_File 1.835
mail-server | Feb 26 05:01:46 mail amavis[424]: Module Digest::MD5 2.54
mail-server | Feb 26 05:01:46 mail amavis[424]: Module Digest::SHA 5.95_01
mail-server | Feb 26 05:01:46 mail amavis[424]: Module Encode 2.80_01
mail-server | Feb 26 05:01:46 mail amavis[424]: Module File::Temp 0.2304
mail-server | Feb 26 05:01:46 mail amavis[424]: Module IO::Socket::INET6 2.72
mail-server | Feb 26 05:01:46 mail amavis[424]: Module IO::Socket::IP 0.37
mail-server | Feb 26 05:01:46 mail amavis[424]: Module MIME::Entity 5.508
mail-server | Feb 26 05:01:46 mail amavis[424]: Module MIME::Parser 5.508
mail-server | Feb 26 05:01:46 mail amavis[424]: Module MIME::Tools 5.508
mail-server | Feb 26 05:01:46 mail amavis[424]: Module Mail::DKIM::Verifier 0.4
mail-server | Feb 26 05:01:46 mail amavis[424]: Module Mail::Header 2.18
mail-server | Feb 26 05:01:46 mail amavis[424]: Module Mail::Internet 2.18
mail-server | Feb 26 05:01:46 mail amavis[424]: Module Mail::SPF v2.009
mail-server | Feb 26 05:01:46 mail amavis[424]: Module Mail::SpamAssassin 3.004001
mail-server | Feb 26 05:01:46 mail amavis[424]: Module Net::DNS 1.07
mail-server | Feb 26 05:01:46 mail amavis[424]: Module Net::LibIDN 0.12
mail-server | Feb 26 05:01:46 mail amavis[424]: Module Net::Server 2.008
mail-server | Feb 26 05:01:46 mail amavis[424]: Module NetAddr::IP 4.079
mail-server | Feb 26 05:01:46 mail amavis[424]: Module Razor2::Client::Version 2.84
mail-server | Feb 26 05:01:46 mail amavis[424]: Module Scalar::Util 1.4202
mail-server | Feb 26 05:01:46 mail amavis[424]: Module Socket 2.020_03
mail-server | Feb 26 05:01:46 mail amavis[424]: Module Socket6 0.27
mail-server | Feb 26 05:01:46 mail amavis[424]: Module Time::HiRes 1.9733
mail-server | Feb 26 05:01:46 mail amavis[424]: Module URI 1.71
mail-server | Feb 26 05:01:46 mail amavis[424]: Module Unix::Syslog 1.1
mail-server | Feb 26 05:01:46 mail amavis[424]: Amavis::ZMQ code NOT loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: Amavis::DB code loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: SQL base code NOT loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: SQL::Log code NOT loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: SQL::Quarantine NOT loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: Lookup::SQL code NOT loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: Lookup::LDAP code NOT loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: AM.PDP-in proto code loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: SMTP-in proto code loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: Courier proto code NOT loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: SMTP-out proto code loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: Pipe-out proto code NOT loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: BSMTP-out proto code NOT loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: Local-out proto code loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: OS_Fingerprint code NOT loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: ANTI-VIRUS code loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: ANTI-SPAM code loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: ANTI-SPAM-EXT code NOT loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: ANTI-SPAM-C code NOT loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: ANTI-SPAM-SA code loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: Unpackers code loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: DKIM code NOT loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: Tools code NOT loaded
mail-server | Feb 26 05:01:46 mail amavis[424]: Found $file at /usr/bin/file
mail-server | Feb 26 05:01:46 mail amavis[424]: No $altermime, not using it
mail-server | Feb 26 05:01:46 mail amavis[424]: Internal decoder for .mail
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .Z at /bin/uncompress
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .gz at /bin/gzip -d
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .bz2 at /bin/bzip2 -d
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .xz at /usr/bin/xz -dc
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .lzma at /usr/bin/xz -dc --format=lzma
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .lrz at /usr/bin/lrzip -q -k -d -o -
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .lzo at /usr/bin/lzop -d
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .lz4 at /usr/bin/lz4c -d
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .rpm at /usr/bin/rpm2cpio
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .cpio at /bin/pax
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .tar at /bin/pax
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .deb at /usr/bin/ar
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .rar at /usr/bin/unrar-free
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .arj at /usr/bin/arj
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .arc at /usr/bin/nomarch
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .zoo at /usr/bin/zoo
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .doc at /usr/bin/ripole
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .cab at /usr/bin/cabextract
mail-server | Feb 26 05:01:46 mail amavis[424]: Internal decoder for .tnef
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .zip at /usr/bin/7za
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .kmz at /usr/bin/7za
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .7z at /usr/bin/7zr
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .jar at /usr/bin/7z
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .swf at /usr/bin/7z
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .lha at /usr/bin/7z
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .iso at /usr/bin/7z
mail-server | Feb 26 05:01:46 mail amavis[424]: Found decoder for .exe at /usr/bin/unrar-free; /usr/bin/arj
mail-server | Feb 26 05:01:46 mail amavis[424]: No decoder for .F
mail-server | Feb 26 05:01:46 mail amavis[424]: Using primary internal av scanner code for ClamAV-clamd
mail-server | Feb 26 05:01:46 mail amavis[424]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
mail-server | Feb 26 05:01:46 mail amavis[424]: Deleting db files in /var/lib/amavis/db
mail-server | Feb 26 05:01:46 mail amavis[424]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.55, libdb 5.3
mail-server | Feb 26 05:01:50 mail postfix/master[1045]: daemon started -- version 3.1.6, configuration /etc/postfix
mail-server | Feb 26 05:01:50 mail dovecot: ssl-params: SSL parameters regeneration completed
mail-server | Feb 26 05:06:02 mail postfix/postscreen[2005]: cache btree:/var/lib/postfix/postscreen_cache full cleanup: retained=0 dropped=0 entries
mail-server | Feb 26 05:06:02 mail postfix/postscreen[2005]: CONNECT from [209.85.217.171]:33695 to [172.18.0.8]:25
mail-server | Feb 26 05:06:02 mail postfix/dnsblog[2010]: addr 209.85.217.171 listed by domain list.dnswl.org as 127.0.5.0
mail-server | Feb 26 05:06:03 mail postfix/postscreen[2005]: PASS NEW [209.85.217.171]:33695
mail-server | Feb 26 05:06:03 mail postfix/smtpd[2017]: error: open database /tmp/docker-mailserver/postfix-send-access.cf: No such file or directory
mail-server | Feb 26 05:06:03 mail postfix/smtpd[2017]: error: open database /tmp/docker-mailserver/postfix-receive-access.cf: No such file or directory
mail-server | Feb 26 05:06:03 mail postfix/smtpd[2017]: connect from mail-ua0-f171.google.com[209.85.217.171]
mail-server | Feb 26 05:06:04 mail postfix/smtpd[2017]: Anonymous TLS connection established from mail-ua0-f171.google.com[209.85.217.171]: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
mail-server | Feb 26 05:06:04 mail postfix/smtpd[2017]: warning: texthash:/tmp/docker-mailserver/postfix-send-access.cf is unavailable. open database /tmp/docker-mailserver/postfix-send-access.cf: No such file or directory
mail-server | Feb 26 05:06:04 mail postfix/smtpd[2017]: warning: texthash:/tmp/docker-mailserver/postfix-send-access.cf: table lookup problem
mail-server | Feb 26 05:06:04 mail postfix/smtpd[2017]: NOQUEUE: reject: RCPT from mail-ua0-f171.google.com[209.85.217.171]: 451 4.3.5 jamesbarlo@gmail.com: Sender address rejected: Server configuration error; from=jamesbarlo@gmail.com to=test@aimatz.com proto=ESMTP helo=
mail-server | Feb 26 05:06:05 mail postfix/smtpd[2017]: disconnect from mail-ua0-f171.google.com[209.85.217.171] ehlo=2 starttls=1 mail=1 rcpt=0/1 data=0/1 quit=1 commands=5/7
mail-server | Feb 26 05:08:06 mail postfix/postscreen[2489]: CONNECT from [163.44.91.17]:34152 to [172.18.0.8]:25
mail-server | Feb 26 05:08:06 mail postfix/dnsblog[2494]: addr 163.44.91.17 listed by domain list.dnswl.org as 127.0.5.1
mail-server | Feb 26 05:08:08 mail postfix/postscreen[2489]: PASS NEW [163.44.91.17]:34152
mail-server | Feb 26 05:08:08 mail postfix/smtpd[2504]: error: open database /tmp/docker-mailserver/postfix-send-access.cf: No such file or directory
mail-server | Feb 26 05:08:08 mail postfix/smtpd[2504]: error: open database /tmp/docker-mailserver/postfix-receive-access.cf: No such file or directory
mail-server | Feb 26 05:08:08 mail postfix/smtpd[2504]: connect from mta-a017.static.smisc.gmo.jp[163.44.91.17]
mail-server | Feb 26 05:08:08 mail postfix/smtpd[2504]: warning: texthash:/tmp/docker-mailserver/postfix-send-access.cf is unavailable. open database /tmp/docker-mailserver/postfix-send-access.cf: No such file or directory
mail-server | Feb 26 05:08:08 mail postfix/smtpd[2504]: warning: texthash:/tmp/docker-mailserver/postfix-send-access.cf: table lookup problem
mail-server | Feb 26 05:08:08 mail postfix/smtpd[2504]: NOQUEUE: reject: RCPT from mta-a017.static.smisc.gmo.jp[163.44.91.17]: 451 4.3.5 bounce-onamae@gmo.jp: Sender address rejected: Server configuration error; from=bounce-onamae@gmo.jp to=info@aimatz.com proto=ESMTP helo=
mail-server | Feb 26 05:08:08 mail postfix/smtpd[2504]: disconnect from mta-a017.static.smisc.gmo.jp[163.44.91.17] ehlo=1 mail=1 rcpt=0/1 data=0/1 rset=1 quit=1 commands=4/6
See #847
I added the two files and now I'm getting this:
mail-server | Feb 26 13:35:03 mail dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=69.136.219.106, lip=172.18.0.8, TLS handshaking: SSL_accept() failed: error:1408F10B:SSL routines:ssl3_get_record:wrong version number, session=
Now getting this:
mail-server | Feb 26 14:00:39 mail dovecot: imap-login: Error: Timeout waiting for handshake from auth server. my pid=191, input bytes=0
mail-server | Feb 26 14:00:39 mail dovecot: imap-login: Disconnected: Auth process broken (disconnected before auth was ready, waited 92 secs): user=<>, rip=69.136.219.1 06, lip=172.18.0.8, TLS handshaking: SSL_accept() failed: error:1417D18C:SSL routines: tls_process_client_hello:version too low, session=
Here is my updated config:
version: '3.3'
services:
mail-server:
image: tvial/docker-mailserver:latest
hostname: mail
domainname: aimatz.com
container_name: mail-server
ports:
- "25:25"
- "143:143"
- "587:587"
- "993:993"
volumes:
- maildata:/var/mail
- mailstate:/var/mail-state
- ./config:/tmp/docker-mailserver
- /docker/nginx/certs/mail.aimatz.com:/etc/letsencrypt/live/mail.aimatz.com
environment:
- ENABLE_SPAMASSASSIN=1
- ENABLE_CLAMAV=1
- ENABLE_FAIL2BAN=1
- ENABLE_POSTGREY=1
- ONE_DIR=1
- DMS_DEBUG=0
- SSL_TYPE=letsencrypt
- [email protected]
- MAIL_PASS=**************
cap_add:
- NET_ADMIN
restart: always
networks:
- default
networks:
default:
external:
name: docker_default
volumes:
maildata:
driver: local
mailstate:
driver: local
I also tested ssl/tls using docker exec mail-server openssl s_client -connect 0.0.0.0:25 -starttls smtp -CApath /etc/ssl/certs/
Verify Return Code 0 (OK)
So there doesn't seem to be an issue with the cert chain.
Docker logs mail-server output:
#
Feb 26 14:35:53 mail amavis[443]: starting. /usr/sbin/amavisd-new at mail.aimatz.com amavis d-new-2.10.1 (20141025), Unicode aware
Feb 26 14:35:53 mail amavis[443]: Net::Server: Group Not Defined. Defaulting to EGID '111 111'
Feb 26 14:35:53 mail amavis[443]: Net::Server: User Not Defined. Defaulting to EUID '109'
Feb 26 14:35:53 mail amavis[443]: Module Amavis::Conf 2.404
Feb 26 14:35:53 mail amavis[443]: Module Archive::Zip 1.59
Feb 26 14:35:53 mail amavis[443]: Module BerkeleyDB 0.55
Feb 26 14:35:53 mail amavis[443]: Module Compress::Raw::Zlib 2.069
Feb 26 14:35:53 mail amavis[443]: Module Compress::Zlib 2.069001
Feb 26 14:35:53 mail amavis[443]: Module Crypt::OpenSSL::RSA 0.28
Feb 26 14:35:53 mail amavis[443]: Module DB_File 1.835
Feb 26 14:35:53 mail amavis[443]: Module Digest::MD5 2.54
Feb 26 14:35:53 mail amavis[443]: Module Digest::SHA 5.95_01
Feb 26 14:35:53 mail amavis[443]: Module Encode 2.80_01
Feb 26 14:35:53 mail amavis[443]: Module File::Temp 0.2304
Feb 26 14:35:53 mail amavis[443]: Module IO::Socket::INET6 2.72
Feb 26 14:35:53 mail amavis[443]: Module IO::Socket::IP 0.37
Feb 26 14:35:53 mail amavis[443]: Module MIME::Entity 5.508
Feb 26 14:35:53 mail amavis[443]: Module MIME::Parser 5.508
Feb 26 14:35:53 mail amavis[443]: Module MIME::Tools 5.508
Feb 26 14:35:53 mail amavis[443]: Module Mail::DKIM::Verifier 0.4
Feb 26 14:35:53 mail amavis[443]: Module Mail::Header 2.18
Feb 26 14:35:53 mail amavis[443]: Module Mail::Internet 2.18
Feb 26 14:35:53 mail amavis[443]: Module Mail::SPF v2.009
Feb 26 14:35:53 mail amavis[443]: Module Mail::SpamAssassin 3.004001
Feb 26 14:35:53 mail amavis[443]: Module Net::DNS 1.07
Feb 26 14:35:53 mail amavis[443]: Module Net::LibIDN 0.12
Feb 26 14:35:53 mail amavis[443]: Module Net::Server 2.008
Feb 26 14:35:53 mail amavis[443]: Module NetAddr::IP 4.079
Feb 26 14:35:53 mail amavis[443]: Module Razor2::Client::Version 2.84
Feb 26 14:35:53 mail amavis[443]: Module Scalar::Util 1.4202
Feb 26 14:35:53 mail amavis[443]: Module Socket 2.020_03
Feb 26 14:35:53 mail amavis[443]: Module Socket6 0.27
Feb 26 14:35:53 mail amavis[443]: Module Time::HiRes 1.9733
Feb 26 14:35:53 mail amavis[443]: Module URI 1.71
Feb 26 14:35:53 mail amavis[443]: Module Unix::Syslog 1.1
Feb 26 14:35:53 mail amavis[443]: Amavis::ZMQ code NOT loaded
Feb 26 14:35:53 mail amavis[443]: Amavis::DB code loaded
Feb 26 14:35:53 mail amavis[443]: SQL base code NOT loaded
Feb 26 14:35:53 mail amavis[443]: SQL::Log code NOT loaded
Feb 26 14:35:53 mail amavis[443]: SQL::Quarantine NOT loaded
Feb 26 14:35:53 mail amavis[443]: Lookup::SQL code NOT loaded
Feb 26 14:35:53 mail amavis[443]: Lookup::LDAP code NOT loaded
Feb 26 14:35:53 mail amavis[443]: AM.PDP-in proto code loaded
Feb 26 14:35:53 mail amavis[443]: SMTP-in proto code loaded
Feb 26 14:35:53 mail amavis[443]: Courier proto code NOT loaded
Feb 26 14:35:53 mail amavis[443]: SMTP-out proto code loaded
Feb 26 14:35:53 mail amavis[443]: Pipe-out proto code NOT loaded
Feb 26 14:35:53 mail amavis[443]: BSMTP-out proto code NOT loaded
Feb 26 14:35:53 mail amavis[443]: Local-out proto code loaded
Feb 26 14:35:53 mail amavis[443]: OS_Fingerprint code NOT loaded
Feb 26 14:35:53 mail amavis[443]: ANTI-VIRUS code loaded
Feb 26 14:35:53 mail amavis[443]: ANTI-SPAM code loaded
Feb 26 14:35:53 mail amavis[443]: ANTI-SPAM-EXT code NOT loaded
Feb 26 14:35:53 mail amavis[443]: ANTI-SPAM-C code NOT loaded
Feb 26 14:35:53 mail amavis[443]: ANTI-SPAM-SA code loaded
Feb 26 14:35:53 mail amavis[443]: Unpackers code loaded
Feb 26 14:35:53 mail amavis[443]: DKIM code NOT loaded
Feb 26 14:35:53 mail amavis[443]: Tools code NOT loaded
Feb 26 14:35:53 mail amavis[443]: Found $file at /usr/bin/file
Feb 26 14:35:53 mail amavis[443]: No $altermime, not using it
Feb 26 14:35:53 mail amavis[443]: Internal decoder for .mail
Feb 26 14:35:53 mail amavis[443]: Found decoder for .Z at /bin/uncompress
Feb 26 14:35:53 mail amavis[443]: Found decoder for .gz at /bin/gzip -d
Feb 26 14:35:53 mail amavis[443]: Found decoder for .bz2 at /bin/bzip2 -d
Feb 26 14:35:53 mail amavis[443]: Found decoder for .xz at /usr/bin/xz -dc
Feb 26 14:35:53 mail amavis[443]: Found decoder for .lzma at /usr/bin/xz -dc --format=lz ma
Feb 26 14:35:53 mail amavis[443]: Found decoder for .lrz at /usr/bin/lrzip -q -k -d -o -
Feb 26 14:35:53 mail amavis[443]: Found decoder for .lzo at /usr/bin/lzop -d
Feb 26 14:35:53 mail amavis[443]: Found decoder for .lz4 at /usr/bin/lz4c -d
Feb 26 14:35:53 mail amavis[443]: Found decoder for .rpm at /usr/bin/rpm2cpio
Feb 26 14:35:53 mail amavis[443]: Found decoder for .cpio at /bin/pax
Feb 26 14:35:53 mail amavis[443]: Found decoder for .tar at /bin/pax
Feb 26 14:35:53 mail amavis[443]: Found decoder for .deb at /usr/bin/ar
Feb 26 14:35:53 mail amavis[443]: Found decoder for .rar at /usr/bin/unrar-free
Feb 26 14:35:53 mail amavis[443]: Found decoder for .arj at /usr/bin/arj
Feb 26 14:35:53 mail amavis[443]: Found decoder for .arc at /usr/bin/nomarch
Feb 26 14:35:53 mail amavis[443]: Found decoder for .zoo at /usr/bin/zoo
Feb 26 14:35:53 mail amavis[443]: Found decoder for .doc at /usr/bin/ripole
Feb 26 14:35:53 mail amavis[443]: Found decoder for .cab at /usr/bin/cabextract
Feb 26 14:35:53 mail amavis[443]: Internal decoder for .tnef
Feb 26 14:35:53 mail amavis[443]: Found decoder for .zip at /usr/bin/7za
Feb 26 14:35:53 mail amavis[443]: Found decoder for .kmz at /usr/bin/7za
Feb 26 14:35:53 mail amavis[443]: Found decoder for .7z at /usr/bin/7zr
Feb 26 14:35:53 mail amavis[443]: Found decoder for .jar at /usr/bin/7z
Feb 26 14:35:53 mail amavis[443]: Found decoder for .swf at /usr/bin/7z
Feb 26 14:35:53 mail amavis[443]: Found decoder for .lha at /usr/bin/7z
Feb 26 14:35:53 mail amavis[443]: Found decoder for .iso at /usr/bin/7z
Feb 26 14:35:53 mail amavis[443]: Found decoder for .exe at /usr/bin/unrar-free; /usr/b in/arj
Feb 26 14:35:53 mail amavis[443]: No decoder for .F
Feb 26 14:35:53 mail amavis[443]: Using primary internal av scanner code for ClamAV-clamd
Feb 26 14:35:53 mail amavis[443]: Found secondary av scanner ClamAV-clamscan at /usr/bin/cl amscan
Feb 26 14:35:53 mail amavis[443]: Deleting db files __db.002,snmp.db,__db.003,nanny.db,__db .001 in /var/lib/amavis/db
Feb 26 14:35:53 mail amavis[443]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.55, libd b 5.3
Feb 26 14:35:56 mail postfix/master[1035]: daemon started -- version 3.1.6, configuration / etc/postfix
Feb 26 14:36:19 mail dovecot: ssl-params: SSL parameters regeneration completed
Feb 26 14:36:30 mail postfix/postscreen[1181]: CONNECT from [127.0.0.1]:53076 to [127.0.0.1 ]:25
Feb 26 14:36:30 mail postfix/postscreen[1181]: WHITELISTED [127.0.0.1]:53076
Feb 26 14:36:30 mail postfix/smtpd[1182]: connect from localhost[127.0.0.1]
Feb 26 14:36:30 mail opendmarc[180]: ignoring connection from localhost
Feb 26 14:36:30 mail postfix/smtpd[1182]: Anonymous TLS connection established from localho st[127.0.0.1]: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Feb 26 14:36:30 mail postfix/smtpd[1182]: lost connection after STARTTLS from localhost[127 .0.0.1]
Feb 26 14:36:30 mail postfix/smtpd[1182]: disconnect from localhost[127.0.0.1] ehlo=1 start tls=1 commands=2
Feb 26 14:45:36 mail postfix/postscreen[3253]: CONNECT from [167.89.15.5]:25031 to [172.18. 0.8]:25
Feb 26 14:45:42 mail postfix/postscreen[3253]: PASS NEW [167.89.15.5]:25031
Feb 26 14:45:43 mail postfix/smtpd[3286]: connect from o4.email.angel.co[167.89.15.5]
Feb 26 14:45:44 mail postfix/smtpd[3286]: Anonymous TLS connection established from o4.emai l.angel.co[167.89.15.5]: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Feb 26 14:45:45 mail policyd-spf[3298]: prepend Received-SPF: Pass (mailfrom) identity=mail from; client-ip=167.89.15.5; helo=o4.email.angel.co; envelope-from=bounces+949885-7170-info =aimatz.[email protected]; receiver=
Feb 26 14:45:45 mail postfix/smtpd[3286]: NOQUEUE: reject: RCPT from o4.email.angel.co[167. 89.15.5]: 450 4.2.0 info@aimatz.com: Recipient address rejected: Delayed by postgrey; fro m=
action=greylist, reason=new, client_name=o4.email.angel.co, client_address=167.89.15.5, sen der=bounces+949885-7170-info=aimatz.[email protected], [email protected]
Feb 26 14:45:45 mail postfix/smtpd[3286]: lost connection after RCPT from o4.email.angel.co [167.89.15.5]
Feb 26 14:45:45 mail postfix/smtpd[3286]: disconnect from o4.email.angel.co[167.89.15.5] eh lo=2 starttls=1 mail=1 rcpt=0/1 commands=4/5
Feb 26 14:49:05 mail postfix/anvil[3288]: statistics: max connection rate 1/60s for (smtpd: 167.89.15.5) at Feb 26 14:45:43
Feb 26 14:49:05 mail postfix/anvil[3288]: statistics: max connection count 1 for (smtpd:167 .89.15.5) at Feb 26 14:45:43
Feb 26 14:49:05 mail postfix/anvil[3288]: statistics: max cache size 1 at Feb 26 14:45:43
Feb 26 15:05:44 mail postfix/postscreen[7838]: CONNECT from [168.245.13.125]:18356 to [172. 18.0.8]:25
Feb 26 15:05:50 mail postfix/postscreen[7838]: PASS NEW [168.245.13.125]:18356
Feb 26 15:05:50 mail postfix/smtpd[7869]: connect from o3.ml.paiza.jp[168.245.13.125]
Feb 26 15:05:53 mail postfix/smtpd[7869]: Anonymous TLS connection established from o3.ml.p aiza.jp[168.245.13.125]: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Feb 26 15:05:55 mail policyd-spf[7891]: prepend Received-SPF: Pass (mailfrom) identity=mail from; client-ip=168.245.13.125; helo=o3.ml.paiza.jp; envelope-from=bounces+731017-d2ab-info =aimatz.[email protected]; receiver=
action=greylist, reason=new, client_name=o3.ml.paiza.jp, client_address=168.245.13.125, sen der=bounces+731017-d2ab-info=aimatz.[email protected], [email protected]
Feb 26 15:05:55 mail postfix/smtpd[7869]: NOQUEUE: reject: RCPT from o3.ml.paiza.jp[168.245 .13.125]: 450 4.2.0 info@aimatz.com: Recipient address rejected: Delayed by postgrey; fro m=
Feb 26 15:05:55 mail postfix/smtpd[7869]: lost connection after RCPT from o3.ml.paiza.jp[16 8.245.13.125]
Feb 26 15:05:55 mail postfix/smtpd[7869]: disconnect from o3.ml.paiza.jp[168.245.13.125] eh lo=2 starttls=1 mail=1 rcpt=0/1 commands=4/5
Feb 26 15:09:15 mail postfix/anvil[7874]: statistics: max connection rate 1/60s for (smtpd: 168.245.13.125) at Feb 26 15:05:50
Feb 26 15:09:15 mail postfix/anvil[7874]: statistics: max connection count 1 for (smtpd:168 .245.13.125) at Feb 26 15:05:50
Feb 26 15:09:15 mail postfix/anvil[7874]: statistics: max cache size 1 at Feb 26 15:05:50
Feb 26 15:18:08 mail postfix/pickup[1037]: 185821F90A1: uid=109 from=
Feb 26 15:18:08 mail postfix/cleanup[10681]: 185821F90A1: message-id=<20180226151808.185821 [email protected]>
Feb 26 15:18:08 mail opendkim[174]: 185821F90A1: no signing table match for '[email protected] tz.com'
Feb 26 15:18:08 mail opendkim[174]: 185821F90A1: no signature data
Feb 26 15:18:08 mail postfix/qmgr[1038]: 185821F90A1: from=
Feb 26 15:18:38 mail postfix/smtp[10685]: connect to mail.aimatz.com[104.27.138.230]:25: Co nnection timed out
Feb 26 15:19:08 mail postfix/smtp[10685]: connect to mail.aimatz.com[104.27.139.230]:25: Co nnection timed out
Feb 26 15:19:08 mail postfix/smtp[10685]: connect to mail.aimatz.com[2400:cb00:2048:1::681b :8ae6]:25: Cannot assign requested address
Feb 26 15:19:08 mail postfix/smtp[10685]: connect to mail.aimatz.com[2400:cb00:2048:1::681b :8be6]:25: Cannot assign requested address
Feb 26 15:19:08 mail postfix/smtp[10685]: 185821F90A1: to=amavis@mail.aimatz.com, orig_to =
Feb 26 15:25:56 mail postfix/qmgr[1038]: 185821F90A1: from=
Feb 26 15:25:56 mail postfix/smtp[12460]: connect to mail.aimatz.com[2400:cb00:2048:1::681b :8be6]:25: Cannot assign requested address
Feb 26 15:26:26 mail postfix/smtp[12460]: connect to mail.aimatz.com[104.27.139.230]:25: Co nnection timed out
Feb 26 15:26:56 mail postfix/smtp[12460]: connect to mail.aimatz.com[104.27.138.230]:25: Co nnection timed out
Feb 26 15:26:56 mail postfix/smtp[12460]: connect to mail.aimatz.com[2400:cb00:2048:1::681b :8ae6]:25: Cannot assign requested address
Feb 26 15:26:56 mail postfix/smtp[12460]: 185821F90A1: to=amavis@mail.aimatz.com, orig_to =
```
What is the message from thunderbird now? is it still not getting a server config?
What is the thunderbird version?( tls_process_client_hello:version too low)
What port are you using to connect to the mail server?
I don't know if this will help
I did same setup in docker-compose.yml as above but I created my email with the ./setup.sh not inside docker compose.
After trying to configure Thunderbird a few times I noticed connection refused so I checked the fail2ban log and found out I was banned.
For testing Thunderbird I deleted the docker container, disabled fail2ban in the docker-compose.yml

Looks like you blocked your IP.
See debug fail2ban section
You should be able to get a list of blocked IP-Addresses. And you can unblock them with that script as well.
Please report back if it's working now
17Hable I hope you are not replying to me, Jdesk needs to report back. I posted the configuration that works with Thunderbird. I was suggesting to JDesk he might have banned his own IP. I have been using Thunderbird with the docker mail-server container with no problems.
Ah, right you are! So nevermind! ;)
I will try this and report back - just curious as I am new to this - what do I run to unblock ip addresses with that script? Specifically what is the command
nevermind I see it - however will fail2ban block all ip addresses? will I need to manually run the script for every ip that will try to use this mailserver?
I have disabled all security environmental variables and still am getting this:
mail-server | # docker-mailserver
mail-server | #
mail-server | #
mail-server |
mail-server | Initializing setup
mail-server | Registering check,setup,fix,misc and start-daemons functions
mail-server | * _check_environment_variables() registered
mail-server | * _check_hostname() registered
mail-server | * _setup_default_vars() registered
mail-server | * _setup_dovecot() registered
mail-server | * _setup_dovecot_local_user() registered
mail-server | * _setup_dkim() registered
mail-server | * _setup_ssl() registered
mail-server | * _setup_docker_permit() registered
mail-server | * _setup_mailname() registered
mail-server | * _setup_amavis() registered
mail-server | * _setup_dmarc_hostname() registered
mail-server | * _setup_postfix_hostname() registered
mail-server | * _setup_dovecot_hostname() registered
mail-server | * _setup_postfix_sasl() registered
mail-server | * _setup_postfix_override_configuration() registered
mail-server | * _setup_postfix_sasl_password() registered
mail-server | * _setup_security_stack() registered
mail-server | * _setup_postfix_aliases() registered
mail-server | * _setup_postfix_vhost() registered
mail-server | * _setup_postfix_dhparam() registered
mail-server | * _setup_postfix_postscreen() registered
mail-server | * _setup_environment() registered
mail-server | * _fix_var_mail_permissions() registered
mail-server | * _fix_var_amavis_permissions() registered
mail-server | * _fix_cleanup_clamav() registered
mail-server | * _misc_save_states() registered
mail-server | * _start_daemons_cron() registered
mail-server | * _start_daemons_rsyslog() registered
mail-server | * _start_daemons_dovecot() registered
mail-server | * _start_daemons_opendkim() registered
mail-server | * _start_daemons_opendmarc() registered
mail-server | * _start_daemons_postfix() registered
mail-server | * _start_changedetector() registered
mail-server | * _start_daemons_amavis() registered
mail-server | Checking configuration
mail-server | Check that there are no conflicts with env variables [_check_environment_variables]
mail-server | Check that hostname/domainname is provided or overidden (no default docker hostname/kubernetes) [_check_hostname]
mail-server | * Domain has been set to aimatz.com
mail-server | * Hostname has been set to mail.aimatz.com
mail-server | Configuring mail server
mail-server | Setting up default variables [_setup_default_vars]
mail-server | * Set ENABLE_LDAP=0
mail-server | * Set OVERRIDE_HOSTNAME=
mail-server | * Set DMS_DEBUG=1
mail-server | * Set ENABLE_CLAMAV=0
mail-server | * Set ENABLE_FAIL2BAN=0
mail-server | * Set FETCHMAIL_POLL=300
mail-server | * Set ENABLE_SPAMASSASSIN=0
mail-server | * Set POSTGREY_DELAY=300
mail-server | * Set POSTGREY_TEXT=Delayed by postgrey
mail-server | * Set ENABLE_POSTGREY=0
mail-server | * Set POSTGREY_MAX_AGE=35
mail-server | * Set ENABLE_FETCHMAIL=0
mail-server | * Set ENABLE_MANAGESIEVE=0
mail-server | * Set POSTSCREEN_ACTION=enforce
mail-server | * Set ENABLE_POP3=0
mail-server | * Set ENABLE_SASLAUTHD=0
mail-server | * Set SMTP_ONLY=0
mail-server | Setting up Dovecot
mail-server | Setting up Dovecot Local User
mail-server | * Checking file line endings
mail-server | * Regenerating postfix user list
mail-server | * user 'imanaga' for domain 'digitalish.co.jp' with password '********'
mail-server | * user 'test' for domain 'aimatz.com' with password '********'
mail-server | * user 'webmaster' for domain 'aimatz.com' with password '********'
mail-server | Setting up DKIM
mail-server | * DKIM keys added for: aimatz.com digitalish.co.jp
mail-server | * Changing permissions on /etc/opendkim
mail-server | Setting up SSL
mail-server | Setting up PERMIT_DOCKER Option
mail-server | * Adding container ip in my networks
mail-server | Setting up Mailname
mail-server | * Creating /etc/mailname
mail-server | Setting up Amavis
mail-server | * Applying hostname to /etc/amavis/conf.d/05-node_id
mail-server | Setting up dmarc
mail-server | * Applying hostname to /etc/opendmarc.conf
mail-server | Applying hostname and domainname to Postfix
mail-server | * Applying hostname to /etc/postfix/main.cf
mail-server | Applying hostname to Dovecot
mail-server | * Applying hostname to /etc/dovecot/conf.d/15-lda.conf
mail-server | Setting up Postfix Override configuration
mail-server | * Loaded 'config/postfix-main.cf'
mail-server | * No extra postfix settings loaded because optional '/tmp/docker-mailserver/postfix-master.cf' not provided.
mail-server | * set the compatibility level to 2
mail-server | Setting up Postfix SASL Password
mail-server | * Warning: 'SASL_PASSWD' is not provided. /etc/postfix/sasl_passwd not created.
mail-server | Setting up Security Stack
mail-server | * Spamassassin is disabled. You can enable it with 'ENABLE_SPAMASSASSIN=1'
mail-server | * Clamav is disabled. You can enable it with 'ENABLE_CLAMAV=1'
mail-server | Setting up Postfix Aliases
mail-server | * Warning 'config/postfix-virtual.cf' is not provided. No mail alias/forward created.
mail-server | Setting up Postfix vhost
mail-server | Setting up Postfix dhparam
mail-server | * Use dhparams that was generated previously
mail-server | * Configuring postscreen
mail-server | Setting up /etc/environment
mail-server | Checking /var/mail permissions
mail-server | * Fixing /var/mail permissions
mail-server | Checking $amavis_state_dir permissions
mail-server | * Permissions in /var/mail-state/lib-amavis look OK
mail-server | Cleaning up disabled Clamav
mail-server | Starting Misc
mail-server | * Consolidating all state onto /var/mail-state
mail-server | * Destination /var/mail-state/spool-postfix exists, linking /var/spool/postfix to it
mail-server | * Destination /var/mail-state/lib-postfix exists, linking /var/lib/postfix to it
mail-server | * Destination /var/mail-state/lib-amavis exists, linking /var/lib/amavis to it
mail-server | * Destination /var/mail-state/lib-clamav exists, linking /var/lib/clamav to it
mail-server | * Destination /var/mail-state/lib-spamassassin exists, linking /var/lib/spamassassin to it
mail-server | * Destination /var/mail-state/lib-fail2ban exists, linking /var/lib/fail2ban to it
mail-server | * Destination /var/mail-state/lib-postgrey exists, linking /var/lib/postgrey to it
mail-server | * Fixing /var/mail-state/* permissions
mail-server | Starting mail server
mail-server | Starting cron2018-03-05 19:25:28,326 INFO spawned: 'cron' with pid 154
mail-server | 2018-03-05 19:25:28,328 INFO success: cron entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mail-server | cron: started
mail-server | Starting rsyslog 2018-03-05 19:25:28,553 INFO spawned: 'rsyslog' with pid 156
mail-server | 2018-03-05 19:25:28,553 INFO success: rsyslog entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mail-server | rsyslog: started
mail-server | Starting dovecot services2018-03-05 19:25:28,802 INFO spawned: 'dovecot' with pid 160
mail-server | 2018-03-05 19:25:28,803 INFO success: dovecot entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mail-server | dovecot: started
mail-server | Starting opendkim 2018-03-05 19:25:29,178 INFO spawned: 'opendkim' with pid 169
mail-server | 2018-03-05 19:25:29,179 INFO success: opendkim entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mail-server | opendkim: started
mail-server | Starting opendmarc 2018-03-05 19:25:29,513 INFO spawned: 'opendmarc' with pid 177
mail-server | 2018-03-05 19:25:29,514 INFO success: opendmarc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mail-server | opendmarc: started
mail-server | Starting postfix2018-03-05 19:25:29,873 INFO spawned: 'postfix' with pid 184
mail-server | 2018-03-05 19:25:29,874 INFO success: postfix entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mail-server | postfix: started
mail-server | Starting changedetector2018-03-05 19:25:30,201 INFO spawned: 'changedetector' with pid 193
mail-server | 2018-03-05 19:25:30,203 INFO success: changedetector entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mail-server | changedetector: started
mail-server | Starting amavis2018-03-05 19:25:30,501 INFO spawned: 'amavis' with pid 200
mail-server | 2018-03-05 19:25:30,503 INFO success: amavis entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
mail-server | amavis: started
mail-server |
mail-server | #
mail-server | # mail.aimatz.com is up and running
mail-server | #
mail-server |
mail-server | Mar 5 19:25:31 mail amavis[200]: starting. /usr/sbin/amavisd-new at mail.aimatz.com amavisd-new-2.10.1 (20141025), Unicode aware
mail-server | Mar 5 19:25:31 mail amavis[200]: Net::Server: Group Not Defined. Defaulting to EGID '111 111'
mail-server | Mar 5 19:25:31 mail amavis[200]: Net::Server: User Not Defined. Defaulting to EUID '109'
mail-server | Mar 5 19:25:31 mail amavis[200]: Module Amavis::Conf 2.404
mail-server | Mar 5 19:25:31 mail amavis[200]: Module Archive::Zip 1.59
mail-server | Mar 5 19:25:31 mail amavis[200]: Module BerkeleyDB 0.55
mail-server | Mar 5 19:25:31 mail amavis[200]: Module Compress::Raw::Zlib 2.069
mail-server | Mar 5 19:25:31 mail amavis[200]: Module Compress::Zlib 2.069001
mail-server | Mar 5 19:25:31 mail amavis[200]: Module Digest::MD5 2.54
mail-server | Mar 5 19:25:31 mail amavis[200]: Module Encode 2.80_01
mail-server | Mar 5 19:25:31 mail amavis[200]: Module File::Temp 0.2304
mail-server | Mar 5 19:25:31 mail amavis[200]: Module IO::Socket::IP 0.37
mail-server | Mar 5 19:25:31 mail amavis[200]: Module MIME::Entity 5.508
mail-server | Mar 5 19:25:31 mail amavis[200]: Module MIME::Parser 5.508
mail-server | Mar 5 19:25:31 mail amavis[200]: Module MIME::Tools 5.508
mail-server | Mar 5 19:25:31 mail amavis[200]: Module Mail::Header 2.18
mail-server | Mar 5 19:25:31 mail amavis[200]: Module Mail::Internet 2.18
mail-server | Mar 5 19:25:31 mail amavis[200]: Module Net::LibIDN 0.12
mail-server | Mar 5 19:25:31 mail amavis[200]: Module Net::Server 2.008
mail-server | Mar 5 19:25:31 mail amavis[200]: Module Scalar::Util 1.4202
mail-server | Mar 5 19:25:31 mail amavis[200]: Module Socket 2.020_03
mail-server | Mar 5 19:25:31 mail amavis[200]: Module Time::HiRes 1.9733
mail-server | Mar 5 19:25:31 mail amavis[200]: Module Unix::Syslog 1.1
mail-server | Mar 5 19:25:31 mail amavis[200]: Amavis::ZMQ code NOT loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: Amavis::DB code loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: SQL base code NOT loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: SQL::Log code NOT loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: SQL::Quarantine NOT loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: Lookup::SQL code NOT loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: Lookup::LDAP code NOT loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: AM.PDP-in proto code loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: SMTP-in proto code loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: Courier proto code NOT loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: SMTP-out proto code loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: Pipe-out proto code NOT loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: BSMTP-out proto code NOT loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: Local-out proto code loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: OS_Fingerprint code NOT loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: ANTI-VIRUS code NOT loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: ANTI-SPAM code NOT loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: ANTI-SPAM-EXT code NOT loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: ANTI-SPAM-C code NOT loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: ANTI-SPAM-SA code NOT loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: Unpackers code loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: DKIM code NOT loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: Tools code NOT loaded
mail-server | Mar 5 19:25:31 mail amavis[200]: Found $file at /usr/bin/file
mail-server | Mar 5 19:25:31 mail amavis[200]: No $altermime, not using it
mail-server | Mar 5 19:25:31 mail amavis[200]: Internal decoder for .mail
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .Z at /bin/uncompress
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .gz at /bin/gzip -d
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .bz2 at /bin/bzip2 -d
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .xz at /usr/bin/xz -dc
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .lzma at /usr/bin/xz -dc --format=lzma
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .lrz at /usr/bin/lrzip -q -k -d -o -
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .lzo at /usr/bin/lzop -d
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .lz4 at /usr/bin/lz4c -d
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .rpm at /usr/bin/rpm2cpio
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .cpio at /bin/pax
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .tar at /bin/pax
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .deb at /usr/bin/ar
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .rar at /usr/bin/unrar-free
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .arj at /usr/bin/arj
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .arc at /usr/bin/nomarch
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .zoo at /usr/bin/zoo
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .doc at /usr/bin/ripole
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .cab at /usr/bin/cabextract
mail-server | Mar 5 19:25:31 mail amavis[200]: Internal decoder for .tnef
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .zip at /usr/bin/7za
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .kmz at /usr/bin/7za
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .7z at /usr/bin/7zr
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .jar at /usr/bin/7z
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .swf at /usr/bin/7z
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .lha at /usr/bin/7z
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .iso at /usr/bin/7z
mail-server | Mar 5 19:25:31 mail amavis[200]: Found decoder for .exe at /usr/bin/unrar-free; /usr/bin/arj
mail-server | Mar 5 19:25:31 mail amavis[200]: No decoder for .F
mail-server | Mar 5 19:25:31 mail amavis[200]: Deleting db files __db.002,snmp.db,__db.003,nanny.db,__db.001 in /var/lib/amavis/db
mail-server | Mar 5 19:25:31 mail amavis[200]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.55, libdb 5.3
mail-server | Mar 5 19:25:32 mail postfix/master[991]: daemon started -- version 3.1.6, configuration /etc/postfix
mail-server | Mar 5 19:25:32 mail postfix/qmgr[994]: 37F8A1F8FAA: from=<[email protected]>, size=793, nrcpt=1 (queue active)
mail-server | Mar 5 19:25:32 mail postfix/smtp[996]: connect to mail.aimatz.com[2400:cb00:2048:1::681b:8ae6]:25: Cannot assign requested address
mail-server | Mar 5 19:26:02 mail postfix/smtp[996]: connect to mail.aimatz.com[104.27.138.230]:25: Connection timed out
mail-server | Mar 5 19:26:12 mail dovecot: ssl-params: SSL parameters regeneration completed
mail-server | Mar 5 19:26:32 mail postfix/smtp[996]: connect to mail.aimatz.com[104.27.139.230]:25: Connection timed out
mail-server | Mar 5 19:26:32 mail postfix/smtp[996]: connect to mail.aimatz.com[2400:cb00:2048:1::681b:8be6]:25: Cannot assign requested address
mail-server | Mar 5 19:26:32 mail postfix/smtp[996]: 37F8A1F8FAA: to=<[email protected]>, orig_to=<root>, relay=none, delay=389105, delays=389045/0.02/60/0, dsn=4.4.1, status=deferred (connect to mail.aimatz.com[2400:cb00:2048:1::681b:8be6]:25: Cannot assign requested address)
here is my docker-compose file:
version: '3.3'
services:
mail-server:
image: tvial/docker-mailserver:latest
hostname: mail
domainname: aimatz.com
container_name: mail-server
ports:
- "25:25"
- "143:143"
- "587:587"
- "993:993"
volumes:
- maildata:/var/mail
- mailstate:/var/mail-state
- ./config:/tmp/docker-mailserver
- /docker/nginx/certs/mail.aimatz.com:/etc/letsencrypt/live/mail.aimatz.c$
environment:
- ENABLE_SPAMASSASSIN=0
- ENABLE_CLAMAV=0
- ENABLE_FAIL2BAN=0
- ENABLE_POSTGREY=0
- SSL_TYPE=letsencrypt
- ONE_DIR=1
- DMS_DEBUG=1
- [email protected]
- MAIL_PASS=*****************
cap_add:
- NET_ADMIN
restart: always
networks:
- default
networks:
default:
external:
name: docker_default
volumes:
maildata:
driver: local
mailstate:
driver: local
At this point I'm at a complete loss - I am using apple mail now. I am getting the error "unable to verify username and password" .
I mean I disabled every single security setting and still am getting errors... I can't think of anything I've done wrong at this point.
You should not have to set any security settings to 0 .
The only time you have to unban an ip is if you test your connection more than three times and you get yourself banned for incorrect sign in.
Test your email with this site
http://www.checktls.com/perl/live/TestReceiver.pl
looks like its trying to run through amazons smtp then a second time to your server named
dc-0b636d042a9a.aimatz.com
The mail server you need to connect to is the hostname in your docker container which is mail.aimatz.com
MX Server | Pref | Answer | Connect | HELO | TLS | Cert | Secure | From | To
-- | -- | -- | -- | -- | -- | -- | -- | -- | --
inbound-smtp.us-east-1.amazonaws.com [205.251.243.46] | 10 | OK (13ms) | OK (151ms) | OK (11ms) | OK (13ms) | OK (880ms) | OK (13ms) | OK (12ms) | FAIL
dc-0b636d042a9a.aimatz.com [45.32.49.145] | 10 | FAIL | FAIL | FAIL | FAIL | FAIL | FAIL | FAIL | FAIL
If you get a failure just testing your email on this site you will not be able to connect with any client.
I am sure your DNS settings are wrong, I would change the mx to use mail.aimatz.com not dc-0b636d042a9a.aimatz.com after that is done wait for the changes to take
and the retry the email site http://www.checktls.com/perl/live/TestReceiver.pl. Keep at it until you eliminate all FAILS before you configure your mail client.
Also you might have to eliminate any mx records to aws smtp since its going through that address first.
I believe the first issue I am having is with the SSL config. My certs were generated per your instructions on the wiki using nginx-proxy and letsencrypt. Their relative path is as follows:
/docker/nginx/certs/mail.aimatz.com
Here is my latest config. I have disabled all security plugins to tackle this one issue at a time:
`version: '3.3'
services:
mail-server:
image: tvial/docker-mailserver:latest
hostname: mail
domainname: aimatz.com
container_name: mail-server
ports:
- "25:25"
- "143:143"
- "587:587"
- "993:993"
volumes:
- maildata:/var/mail
- mailstate:/var/mail-state
- ./config:/tmp/docker-mailserver
- /docker/nginx/certs/mail.aimatz.com:/etc/letsencrypt/live/mail.aimatz.com
environment:
- ENABLE_SPAMASSASSIN=0
- ENABLE_CLAMAV=0
- ENABLE_FAIL2BAN=0
- ENABLE_POSTGREY=0
- ONE_DIR=0
- DMS_DEBUG=0
- SSL_TYPE=letsencrypt
- TLS_LEVEL=modern
- [email protected]
- MAIL_PASS=v9vXVvmNZD7fBef
restart: always
networks:
- default
networks:
default:
external:
name: docker_default
volumes:
# MailServer
maildata:
mailstate:
`
Furthermore my postfix-main.cf:
`# increase maximum message size
message_size_limit = 52428800
smtpd_use_tls = yes
smtpd_tls_auth_only = yes
smtpd_tls_received_header = yes
smtpd_tls_cert_file = /etc/letsencrypt/live/mail.aimatz.com/cert.pem
smtpd_tls_key_file = /etc/letsencrypt/live/mail.aimatz.com/key.pem
smtpd_tls_session_cache_timeout = 3600s
smtpd_tls_loglevel = 3
tls_random_source = dev:/dev/urandom`
I have created the postfix-receive-access.cf and postfix-send-access.cf as you told me to do above. I have used the setup.sh script to add email accounts and setup dkim keys.
Did I mount the ssl cert volume correctly in the above docker-compose.yml file? Furthermore did I set the correct environmental variables for SSL_TYPE and TLS_LEVEL?
Lastly here is the most recently log output:
``
Combined
Standard Out
Standard Error
3/6/2018 3:40:21 PM#
3/6/2018 3:40:21 PM
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: starting. /usr/sbin/amavisd-new at mail.aimatz.com amavisd-new-2.10.1 (20141025), Unicode aware
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Net::Server: Group Not Defined. Defaulting to EGID '111 111'
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Net::Server: User Not Defined. Defaulting to EUID '109'
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Module Amavis::Conf 2.404
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Module Archive::Zip 1.59
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Module BerkeleyDB 0.55
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Module Compress::Raw::Zlib 2.069
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Module Compress::Zlib 2.069001
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Module Digest::MD5 2.54
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Module Encode 2.80_01
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Module File::Temp 0.2304
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Module IO::Socket::IP 0.37
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Module MIME::Entity 5.508
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Module MIME::Parser 5.508
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Module MIME::Tools 5.508
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Module Mail::Header 2.18
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Module Mail::Internet 2.18
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Module Net::LibIDN 0.12
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Module Net::Server 2.008
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Module Scalar::Util 1.4202
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Module Socket 2.020_03
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Module Time::HiRes 1.9733
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Module Unix::Syslog 1.1
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Amavis::ZMQ code NOT loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Amavis::DB code loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: SQL base code NOT loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: SQL::Log code NOT loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: SQL::Quarantine NOT loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Lookup::SQL code NOT loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Lookup::LDAP code NOT loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: AM.PDP-in proto code loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: SMTP-in proto code loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Courier proto code NOT loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: SMTP-out proto code loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Pipe-out proto code NOT loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: BSMTP-out proto code NOT loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Local-out proto code loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: OS_Fingerprint code NOT loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: ANTI-VIRUS code NOT loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: ANTI-SPAM code NOT loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: ANTI-SPAM-EXT code NOT loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: ANTI-SPAM-C code NOT loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: ANTI-SPAM-SA code NOT loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Unpackers code loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: DKIM code NOT loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Tools code NOT loaded
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found $file at /usr/bin/file
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: No $altermime, not using it
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Internal decoder for .mail
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .Z at /bin/uncompress
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .gz at /bin/gzip -d
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .bz2 at /bin/bzip2 -d
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .xz at /usr/bin/xz -dc
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .lzma at /usr/bin/xz -dc --format=lzma
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .lrz at /usr/bin/lrzip -q -k -d -o -
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .lzo at /usr/bin/lzop -d
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .lz4 at /usr/bin/lz4c -d
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .rpm at /usr/bin/rpm2cpio
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .cpio at /bin/pax
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .tar at /bin/pax
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .deb at /usr/bin/ar
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .rar at /usr/bin/unrar-free
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .arj at /usr/bin/arj
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .arc at /usr/bin/nomarch
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .zoo at /usr/bin/zoo
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .doc at /usr/bin/ripole
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .cab at /usr/bin/cabextract
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Internal decoder for .tnef
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .zip at /usr/bin/7za
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .kmz at /usr/bin/7za
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .7z at /usr/bin/7zr
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .jar at /usr/bin/7z
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .swf at /usr/bin/7z
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .lha at /usr/bin/7z
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .iso at /usr/bin/7z
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Found decoder for .exe at /usr/bin/unrar-free; /usr/bin/arj
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: No decoder for .F
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Deleting db files in /var/lib/amavis/db
3/6/2018 3:40:22 PMMar 6 20:40:22 mail amavis[251]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.55, libdb 5.3
3/6/2018 3:40:24 PMMar 6 20:40:24 mail postfix/master[972]: daemon started -- version 3.1.6, configuration /etc/postfix
3/6/2018 3:40:27 PMMar 6 20:40:27 mail postfix/postscreen[983]: cache btree:/var/lib/postfix/postscreen_cache full cleanup: retained=0 dropped=0 entries
3/6/2018 3:40:27 PMMar 6 20:40:27 mail postfix/postscreen[983]: CONNECT from [159.89.187.50]:60444 to [172.18.0.9]:25
3/6/2018 3:40:27 PMMar 6 20:40:27 mail postfix/dnsblog[988]: addr 159.89.187.50 listed by domain list.dnswl.org as 127.0.0.255
3/6/2018 3:40:33 PMMar 6 20:40:33 mail postfix/postscreen[983]: PASS NEW [159.89.187.50]:60444
3/6/2018 3:40:33 PMMar 6 20:40:33 mail postfix/smtpd[1009]: initializing the server-side TLS engine
3/6/2018 3:40:33 PMMar 6 20:40:33 mail postfix/smtpd[1009]: warning: cannot get RSA certificate from file "/etc/letsencrypt/live/mail.aimatz.com/cert.pem": disabling TLS support
3/6/2018 3:40:33 PMMar 6 20:40:33 mail postfix/smtpd[1009]: warning: TLS library problem: error:02001002:system library:fopen:No such file or directory:../crypto/bio/bss_file.c:292:fopen('/etc/letsencrypt/live/mail.aimatz.com/cert.pem','r'):
3/6/2018 3:40:33 PMMar 6 20:40:33 mail postfix/smtpd[1009]: warning: TLS library problem: error:20074002:BIO routines:file_ctrl:system lib:../crypto/bio/bss_file.c:294:
3/6/2018 3:40:33 PMMar 6 20:40:33 mail postfix/smtpd[1009]: warning: TLS library problem: error:140DC002:SSL routines:use_certificate_chain_file:system lib:../ssl/ssl_rsa.c:609:
3/6/2018 3:40:33 PMMar 6 20:40:33 mail postfix/smtpd[1009]: connect from www6.checktls.com[159.89.187.50]
3/6/2018 3:40:34 PMMar 6 20:40:33 mail postfix/cleanup[1017]: F0A9E2371F7: message-id=20180306204033.F0A9E2371F7@mail.aimatz.com
3/6/2018 3:40:34 PMMar 6 20:40:33 mail postfix/qmgr[975]: F0A9E2371F7: from=
3/6/2018 3:40:34 PMMar 6 20:40:33 mail postfix/smtpd[1009]: disconnect from www6.checktls.com[159.89.187.50] ehlo=1 starttls=0/1 mail=1 quit=1 commands=3/4
3/6/2018 3:41:04 PMMar 6 20:41:04 mail postfix/smtp[1020]: connect to mail.aimatz.com[104.27.138.230]:25: Connection timed out
3/6/2018 3:41:04 PMMar 6 20:41:04 mail postfix/smtp[1020]: connect to mail.aimatz.com[2400:cb00:2048:1::681b:8ae6]:25: Cannot assign requested address
3/6/2018 3:41:34 PMMar 6 20:41:34 mail postfix/smtp[1020]: connect to mail.aimatz.com[104.27.139.230]:25: Connection timed out
3/6/2018 3:41:34 PMMar 6 20:41:34 mail postfix/smtp[1020]: connect to mail.aimatz.com[2400:cb00:2048:1::681b:8be6]:25: Cannot assign requested address
3/6/2018 3:41:34 PMMar 6 20:41:34 mail postfix/smtp[1020]: F0A9E2371F7: to=postmaster@mail.aimatz.com, orig_to=
3/6/2018 3:42:33 PMMar 6 20:42:32 mail postfix/postscreen[1424]: CONNECT from [159.89.187.50]:33596 to [172.18.0.9]:25
3/6/2018 3:42:33 PMMar 6 20:42:32 mail postfix/dnsblog[1429]: addr 159.89.187.50 listed by domain list.dnswl.org as 127.0.0.255
3/6/2018 3:42:33 PMMar 6 20:42:32 mail postfix/postscreen[1424]: PASS OLD [159.89.187.50]:33596
3/6/2018 3:42:34 PMMar 6 20:42:33 mail postfix/smtpd[1433]: initializing the server-side TLS engine
3/6/2018 3:42:34 PMMar 6 20:42:33 mail postfix/smtpd[1433]: warning: cannot get RSA certificate from file "/etc/letsencrypt/live/mail.aimatz.com/cert.pem": disabling TLS support
3/6/2018 3:42:34 PMMar 6 20:42:33 mail postfix/smtpd[1433]: warning: TLS library problem: error:02001002:system library:fopen:No such file or directory:../crypto/bio/bss_file.c:292:fopen('/etc/letsencrypt/live/mail.aimatz.com/cert.pem','r'):
3/6/2018 3:42:34 PMMar 6 20:42:33 mail postfix/smtpd[1433]: warning: TLS library problem: error:20074002:BIO routines:file_ctrl:system lib:../crypto/bio/bss_file.c:294:
3/6/2018 3:42:34 PMMar 6 20:42:33 mail postfix/smtpd[1433]: warning: TLS library problem: error:140DC002:SSL routines:use_certificate_chain_file:system lib:../ssl/ssl_rsa.c:609:
3/6/2018 3:42:34 PMMar 6 20:42:33 mail postfix/smtpd[1433]: connect from www6.checktls.com[159.89.187.50]
3/6/2018 3:42:34 PMMar 6 20:42:33 mail postfix/cleanup[1439]: CD29E237200: message-id=20180306204233.CD29E237200@mail.aimatz.com
3/6/2018 3:42:34 PMMar 6 20:42:33 mail postfix/qmgr[975]: CD29E237200: from=
3/6/2018 3:42:34 PMMar 6 20:42:33 mail postfix/smtpd[1433]: disconnect from www6.checktls.com[159.89.187.50] ehlo=1 starttls=0/1 mail=1 quit=1 commands=3/4
3/6/2018 3:42:34 PMMar 6 20:42:33 mail postfix/smtp[1020]: connect to mail.aimatz.com[2400:cb00:2048:1::681b:8ae6]:25: Cannot assign requested address
````
I am not the author of the container or the wiki, just someone who uses the container.
dc-0b636d042a9a.aimatz.com is this your A record in your DNS setup?
http://www.checktls.com/perl/live/TestReceiver.pl
test email site again shows the server is looking for Host "dc-0b636d042a9a" which has a FQDN of dc-0b636d042a9a.aimatz.com
your docker mail container host is "mail" which has a FQDN mail.aimatz.com
test email site is looking for email certs on dc-0b636d042a9a.aimatz.com which is not the mail server
the mail server is the docker container mail.aimatz.com and the certs are in the docker container
1st
IMPORTANT ADD :ro to the end of this line
2nd
MX Server | Pref | Answer | Connect | HELO | TLS | Cert | Secure | From | To
-- | -- | -- | -- | -- | -- | -- | -- | -- | --
dc-0b636d042a9a.aimatz.com [45.32.49.145] | 10 | OK (168ms) | OK (772ms) | OK (165ms) | FAIL | FAIL | FAIL | OK (1,447ms) | OK (1,834ms)
Average | 聽 | 100% | 100% | 100% | 0% | 0% | 0% | 100% | 100%
LINUX command dig run this command:
dig dc-0b636d042a9a.aimatz.com mx
OUTPUT
dc-0b636d042a9a.aimatz.com. IN MX
you are telling the world your mail server is dc-0b636d042a9a.aimatz.com
In my setup I have:
DNS RECS
A | YOURDOMAINNAME.com | 1xx.xxx.xx.x0
A | mail.YOURDOMAINNAME.com | 1xx.xxx.xx.x0
MX | YOURDOMAINNAME.com | mail.YOURDOMAINNAME.com
MX | mail.YOURDOMAINNAME.com.YOURDOMAINNAME.com | 1xx.xxx.xx.x0
I updated my DNS to match your record setup above - Also to answer your question as to why dc-0b636d042a9a.aimatz.com is showing up as the MX record in DIG, I was attempting to setup amazon SES and updated my DNS config yesterday with that record. I have changed the DNS today and I guess it has been slow to update. I'm using cloudflare for this project.
Furthermore I added ~/docker/nginx/certs/mail.aimatz.com:/etc/letsencrypt/live/mail.aimatz.com:ro to the volume and now tls is working
Your site should be aimatz.com or www.aimatz.com
You can add :
CNAME rec of www.aimatz.com
THEN
dig aimatz.com ANY +noall +answer
and you should see DNS recs when the server is propagated
Again test
http://www.checktls.com/perl/live/TestReceiver.pl
Once DNS propagates, I should be able to use my mail client and connect - I'm hoping this is what happens. Logs are not showing any errors at this point in the container -
just curious for your second mx record you have:
MX | mail.YOURDOMAINNAME.com.YOURDOMAINNAME.com | 1xx.xxx.xx.x0
How can you setup a dns record like that with your host ip within an MX record? Im using cloudflare - this is not allowed nor have I ever seen this before.
So I can send and receive emails - only issue is - when sending an email to a free email account through yahoo or gmail this is the error I get -
3/6/2018 11:53:01 PMMar 7 04:53:01 mail postfix/qmgr[1028]: E8D6E237223: from=<[email protected]>, size=1051, nrcpt=1 (queue active)
3/6/2018 11:53:27 PMMar 7 04:53:27 mail postfix/anvil[1341]: statistics: max connection rate 3/60s for (submission:69.136.219.106) at Mar 7 04:50:05
3/6/2018 11:53:27 PMMar 7 04:53:27 mail postfix/anvil[1341]: statistics: max connection count 2 for (submission:69.136.219.106) at Mar 7 04:49:20
3/6/2018 11:53:27 PMMar 7 04:53:27 mail postfix/anvil[1341]: statistics: max cache size 1 at Mar 7 04:49:20
3/6/2018 11:53:31 PMMar 7 04:53:31 mail postfix/smtp[2193]: connect to mta5.am0.yahoodns.net[98.137.159.28]:25: Connection timed out
3/6/2018 11:54:01 PMMar 7 04:54:01 mail postfix/smtp[2193]: connect to mta5.am0.yahoodns.net[98.137.159.27]:25: Connection timed out
For gmail this is what I get:
3/6/2018 11:55:09 PMMar 7 04:55:09 mail postfix/cleanup[2692]: 59EBA23722F: message-id=<[email protected]>
3/6/2018 11:55:09 PMMar 7 04:55:09 mail postfix/qmgr[1028]: 59EBA23722F: from=<[email protected]>, size=1065, nrcpt=1 (queue active)
3/6/2018 11:55:09 PMMar 7 04:55:09 mail amavis[835]: (00835-01) Passed CLEAN {RelayedOpenRelay}, [69.136.219.106]:49850 [69.136.219.106] <[email protected]> -> <[email protected]>, Queue-ID: B445C237229, Message-ID: <[email protected]>, mail_id: U5_GkepWiKFO, Hits: 2.093, size: 831, queued_as: 59EBA23722F, 2207 ms
3/6/2018 11:55:09 PMMar 7 04:55:09 mail postfix/smtp[2679]: B445C237229: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=2.9, delays=0.63/0.01/0.02/2.2, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 59EBA23722F)
3/6/2018 11:55:09 PMMar 7 04:55:09 mail postfix/qmgr[1028]: B445C237229: removed
3/6/2018 11:55:31 PMMar 7 04:55:30 mail postfix/postscreen[2778]: CONNECT from [37.49.224.109]:53584 to [172.18.0.9]:25
3/6/2018 11:55:31 PMMar 7 04:55:31 mail postfix/dnsblog[2785]: addr 37.49.224.109 listed by domain dnsbl.sorbs.net as 127.0.0.7
3/6/2018 11:55:31 PMMar 7 04:55:31 mail postfix/dnsblog[2780]: addr 37.49.224.109 listed by domain b.barracudacentral.org as 127.0.0.2
3/6/2018 11:55:31 PMMar 7 04:55:31 mail postfix/postscreen[2778]: PREGREET 11 after 0.25 from [37.49.224.109]:53584: EHLO User\r\n
3/6/2018 11:55:31 PMMar 7 04:55:31 mail postfix/smtp[2193]: connect to mta6.am0.yahoodns.net[66.218.85.52]:25: Connection timed out
3/6/2018 11:55:31 PMMar 7 04:55:31 mail postfix/smtp[2193]: E8D6E237223: to=<[email protected]>, relay=none, delay=740, delays=590/0.03/150/0, dsn=4.4.1, status=deferred (connect to mta6.am0.yahoodns.net[66.218.85.52]:25: Connection timed out)
3/6/2018 11:55:31 PMMar 7 04:55:31 mail postfix/dnsblog[2783]: warning: dnsblog_query: lookup error for DNS query 109.224.49.37.list.dnswl.org: Host or domain name not found. Name service error for name=109.224.49.37.list.dnswl.org type=A: Host not found, try again
3/6/2018 11:55:31 PMMar 7 04:55:31 mail postfix/postscreen[2778]: DNSBL rank 3 for [37.49.224.109]:53584
3/6/2018 11:55:32 PMMar 7 04:55:32 mail postfix/postscreen[2778]: DISCONNECT [37.49.224.109]:53584
3/6/2018 11:55:40 PMMar 7 04:55:39 mail postfix/smtp[2695]: connect to gmail-smtp-in.l.google.com[108.177.125.27]:25: Connection timed out
3/6/2018 11:55:40 PMMar 7 04:55:39 mail postfix/smtp[2695]: connect to gmail-smtp-in.l.google.com[2404:6800:4008:c01::1b]:25: Cannot assign requested address
I can receive emails from gmail and yahoo mail accounts however.
This looks like your firewall (provider) is blocking port 25 outgoing.
Try to telnet gmail-smtp-in.l.google.com 25 to the server
You should see this:
telnet gmail-smtp-in.l.google.com 25
Trying 2a00:1450:4013:c00::1b...
Connected to gmail-smtp-in.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP h13si5915418edi.303 - gsmtp
I guess you will get a timeout. And this is not image related.
If you run dig on your fqdn www.aimatz.com it looks like you created it as an MX record that should be a CNAME
Your mx record is www.aimatz.com which is wrong it is not the mail exchange.
dig www.aimatz.com mx
; <<>> DiG 9.10.3-P4-Ubuntu <<>> www.aimatz.com mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3503
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;www.aimatz.com. IN MX
You should be able to use dig to see your dns config for aimatz.com
when I run the following command I get nothing
dig aimatz.com ANY +noall +answer
; <<>> DiG 9.10.3-P4-Ubuntu <<>> aimatz.com ANY +noall +answer
;; global options: +cmd
aimatz.com. 3789 IN HINFO "ANY obsoleted" "See draft-ietf-dnsop-refuse-any"
Read this:
https://www.howtoforge.com/troubleshooting-common-dns-misconfiguration-errors
I actually updated firewall rules "ufw allow 25" and I'm still getting a timeout. I updated cloudflare dns so it's not running through their proxy. The DNS is correct at this point. I still cannot send any emails to free email servers - Any other thoughts?
Sidenote - telnet to gmails server on port 25 from my home computer times out as well.
Any other ideas here?
My advice is to get the site https://aimatz.com or https://www.aimatz.com working with a cert first then worry about the docker mail container.
The DNS is not set up correctly.
Ngnix is not setup correctly for a secured site. Did you even configure ngnix for your secured site?
Your site has a 503 error, and is UNSECURED for aimatz.com is this port 80?, fix this Ngnix issue.
I use apache and the conf file default_ssl.conf redirects traffic through secure port 443 and verifies the certs to connect securely to https://www.mydomain.com I am positive ngnix works similar and has a config for traffic on 443
DIG is still not showing any records????
Again I do not know how cloudfare is setup look into that on their website but I would assume I should be able to see the DNS records.
This issue is not related to the mail container and changing the firewall is not going to help until you can actually connect securely to your site.
There is no site at the moment - it's just being used for the mail-server. Therefore we don't need anything on port 80 or 443.
What do you mean for the moment are you going to configure multiple instances with cloudfare? Are you going to have separate running instances for each service, mail and https? or are you going to run all on one instance. Are all your services going to be in docker containers? This is way beyond the scope of your initial question about the configuration of Thunderbird.
Good to see this activity on the issue!
Just to inform there is also a chat possibility: Gitter
What it looks like is DNS + firewall issues indeed.
You can also use openssl to verify: openssl s_client -starttls smtp -crlf -connect MAIL.EXAMPLE.com:587
All services are docker based and running on a single vps at the moment. There are actually several other domains and apps running on the VPS. Everything is in Docker containers.
In regards to the mail container - the initial question has actually been answered through our dialogue here . The steps taken thus far, have led me to a 90% working mail-server. I will say 100% once Vultr opens up traffic to port 25 on their end.
Now I will have other domains using this mail.aimatz.com as their mailserver - however I have no intention of running multiple containers to accomplish this. I am able to do this correct? I'm relatively new to setting up a mail-server and the dns requirements / dkim settings etc so this has helped me out greatly. What would be the best way to allow multiple domains to use the container for mail.aimatz.com? DKIM config etc.
what I have already done is added the hosts that are trusted in the TrustedHosts file for the dkim config.
I've also generated DKIM settings using the setup.sh script for each domain. Other than DNS configuration for each domain, mails for each should be able to function on a single container since this setup uses OpenDKIM.
This issue was closed due to one or more of the following reasons:
If you think this happened by accident, or feel like this issue was not actually resolved, please feel free to re-open it. If there is an issue you could resolve in the meantime, please open a PR based on the current master branch so we can review it.
Most helpful comment
I don't know if this will help
I did same setup in docker-compose.yml as above but I created my email with the ./setup.sh not inside docker compose.
After trying to configure Thunderbird a few times I noticed connection refused so I checked the fail2ban log and found out I was banned.
For testing Thunderbird I deleted the docker container, disabled fail2ban in the docker-compose.yml
I was able to get Thunderbird to work