I'm on the newest version (2.1) and everything is broken... Trying to login from any local email client just gives me an error about either the email server being unreachable or the username and password being incorrect (depends on the client). I could use some assistance ASAP @tomav - just let me know what will be helpful for you so you can diagnose...
I had the same issue and after removing --cap-add=NET_ADMIN it works with my desktop client (apple mail). On iOS i cannot send anything for now.
@thiesschneider Yep removing --cap-add=NET_ADMIN fixed it for me too... I also disabled Fail2Ban for the time being. Would like a permanent solution though!
I'm going to propose tagging this as a bug @tomav
~Would be nice to have this working on an iPhone... It seems the default ports and everything don't work (I'm guessing it has to do with the new STARTTLS requirement)?~
Update: got it working on the iPhone now...
can you give an update how you get it working?
Hi guys, could you give me steps to reproduce? (full config, log startup with DMS_DEBUG=1, server log on client authentication).
It will help me to confirm there's a bug and give a lead to resolve it, otherwise, I'm blind.
I personally use 2.1 in production with OSX and iOS clients and it works.
Are you sure you have not been banned by fail2ban?
Thanks.
@tomav here's my docker-compose.yml (undid the changes I mentioned above):
version: '2'
services:
mail:
image: tvial/docker-mailserver:latest
hostname: mail
domainname: dominion-designs.com
container_name: mail
restart: always
ports:
- "25:25"
- "143:143"
- "587:587"
- "993:993"
volumes:
- maildata:/var/mail
- mailstate:/var/mail-state
- ./config/:/tmp/docker-mailserver/
- /etc/letsencrypt:/etc/letsencrypt
environment:
- SSL_TYPE=letsencrypt
- 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
Attempted to start the Docker container so I could get you log files and now it all works. 馃檮 Weird... Must have been a one-time kink. Or maybe I fixed the bug without knowing it. I seriously spent all afternoon trying to get this working and only opened the issue when I couldn't think of anything else to try and debug, so I'm not sure what happened.
I'm going to close this for now since I'm not experiencing the issue right now. Will open if I ever experience it again. Thanks for your assistance and sorry to bother.
@thiesschneider Not sure how I fixed it...
Maybe double check the following (these are some of the things that I was playing with this afternoon so maybe one of them is the "golden key"):
One of those things may prove helpful...
Here are my logs:
#
#
# ENV
#
#
HOSTNAME=mail.domain.de
LETSENCRYPT_HOST=mail.domain.de
ENABLE_MANAGESIEVE=1
DMS_DEBUG=1
ENABLE_CLAMAV=1
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENABLE_FAIL2BAN=1
ENABLE_SPAMASSASSIN=1
PWD=/
[email protected]
SHLVL=1
HOME=/root
ONE_DIR=0
SSL_TYPE=letsencrypt
_=/usr/bin/printenv
#
#
# docker-mailserver
#
#
Initializing setup
Registering check,setup,fix,misc and start-daemons functions
* _check_environment_variables() registered
* _check_hostname() registered
* _setup_default_vars() registered
* _setup_dovecot() registered
* _setup_dovecot_local_user() registered
* _setup_dkim() registered
* _setup_ssl() registered
* _setup_docker_permit() registered
* _setup_mailname() registered
* _setup_postfix_override_configuration() registered
* _setup_postfix_sasl_password() registered
* _setup_security_stack() registered
* _setup_postfix_aliases() registered
* _setup_postfix_vhost() registered
* _fix_var_mail_permissions() registered
* _misc_save_states() registered
* _start_daemons_cron() registered
* _start_daemons_rsyslog() registered
* _start_daemons_dovecot() registered
* _start_daemons_opendkim() registered
* _start_daemons_opendmarc() registered
* _start_daemons_postfix() registered
* _start_daemons_fail2ban() registered
* _start_daemons_clamav() registered
* _start_daemons_amavis() registered
Checking configuration
Check that there are no conflicts with env variables [_check_environment_variables]
Check that hostname/domainname is provided (no default docker hostname) [_check_hostname]
* Hostname has been set to mail.domain.de
Configuring mail server
Setting up default variables [_setup_default_vars]
* Set ENABLE_LDAP=0
* Set ENABLE_FETCHMAIL=0
* Set ENABLE_MANAGESIEVE=1
* Set DMS_DEBUG=1
* Set VIRUSMAILS_DELETE_DELAY=7
* Set ENABLE_POP3=0
* Set ENABLE_SASLAUTHD=0
* Set ENABLE_CLAMAV=1
* Set SMTP_ONLY=0
* Set ENABLE_FAIL2BAN=1
* Set ENABLE_SPAMASSASSIN=1
Setting up Dovecot
* Sieve management enabled
Setting up Dovecot Local User
* Checking file line endings
* Regenerating postfix user list
* user 'mail' for domain '1_domain.de' with password '********'
* user 'mail' for domain '2_domain.de' with password '********'
* user 'name' for domain '3_domain.de' with password '********'
* user 'service' for domain '3_domain.de' with password '********'
Setting up DKIM
* DKIM keys added for: domain.de
* Changing permissions on /etc/opendkim
Setting up SSL
* Adding mail.domain.de SSL certificate
* SSL configured with 'letsencrypt' certificates
Setting up PERMIT_DOCKER Option
* Adding container ip in my networks
Setting up Mailname
* Creating /etc/mailname
Setting up Postfix Override configuration
* No extra postfix settings loaded because optional '/tmp/docker-mailserver/postfix-main.cf' not provided.
Setting up Postfix SASL Password
* Warning: 'SASL_PASSWD' is not provided. /etc/postfix/sasl_passwd not created.
Setting up Security Stack
* Enabling and configuring spamassassin
* Enabling clamav
* Fail2ban enabled
Setting up Postfix Aliases
* Warning 'config/postfix-virtual.cf' is not provided. No mail alias/forward created.
Setting up Postfix vhost
Fixing /var/mail permissions
* Fixing /var/mail permissions
Starting Misc
Starting mail server
Starting cron [ OK ]
Starting rsyslog [ OK ]
Starting dovecot services [ OK ]
Starting opendkim [ OK ]
Starting opendmarc [ OK ]
Starting postfix [ OK ]
Starting fail2ban [ OK ]
Starting clamav [ OK ]
Starting amavis [ OK ]
#
# mail.domain.de is up and running
#
tail: unrecognized file system type 0x794c7630 for '/var/log/mail/mail.log'. please report this to [email protected]. reverting to polling
Jan 17 23:26:59 mail amavis[1356]: Module Amavis::Conf 2.303
Jan 17 23:26:59 mail amavis[1356]: Module Archive::Zip 1.30
Jan 17 23:26:59 mail amavis[1356]: Module BerkeleyDB 0.54
Jan 17 23:26:59 mail amavis[1356]: Module Compress::Zlib 2.06
Jan 17 23:26:59 mail amavis[1356]: Module Convert::TNEF 0.18
Jan 17 23:26:59 mail amavis[1356]: Module Convert::UUlib 1.4
Jan 17 23:26:59 mail amavis[1356]: Module Crypt::OpenSSL::RSA 0.28
Jan 17 23:26:59 mail amavis[1356]: Module DB_File 1.827
Jan 17 23:26:59 mail amavis[1356]: Module Digest::MD5 2.52
Jan 17 23:26:59 mail amavis[1356]: Module Digest::SHA 5.84_01
Jan 17 23:26:59 mail amavis[1356]: Module File::Temp 0.23
Jan 17 23:26:59 mail amavis[1356]: Module IO::Socket::INET6 2.71
Jan 17 23:26:59 mail amavis[1356]: Module MIME::Entity 5.505
Jan 17 23:26:59 mail amavis[1356]: Module MIME::Parser 5.505
Jan 17 23:26:59 mail amavis[1356]: Module MIME::Tools 5.505
Jan 17 23:26:59 mail amavis[1356]: Module Mail::DKIM::Signer 0.4
Jan 17 23:26:59 mail amavis[1356]: Module Mail::DKIM::Verifier 0.4
Jan 17 23:26:59 mail amavis[1356]: Module Mail::Header 2.12
Jan 17 23:26:59 mail amavis[1356]: Module Mail::Internet 2.12
Jan 17 23:26:59 mail amavis[1356]: Module Mail::SPF v2.009
Jan 17 23:26:59 mail amavis[1356]: Module Mail::SpamAssassin 3.004000
Jan 17 23:26:59 mail amavis[1356]: Module Net::DNS 0.68
Jan 17 23:26:59 mail amavis[1356]: Module Net::Server 2.007
Jan 17 23:26:59 mail amavis[1356]: Module NetAddr::IP 4.071
Jan 17 23:26:59 mail amavis[1356]: Module Razor2::Client::Version 2.84
Jan 17 23:26:59 mail amavis[1356]: Module Socket6 0.25
Jan 17 23:26:59 mail amavis[1356]: Module Time::HiRes 1.9725
Jan 17 23:26:59 mail amavis[1356]: Module URI 1.60
Jan 17 23:26:59 mail amavis[1356]: Module Unix::Syslog 1.1
Jan 17 23:26:59 mail amavis[1356]: Amavis::DB code loaded
Jan 17 23:26:59 mail amavis[1356]: SQL base code NOT loaded
Jan 17 23:26:59 mail amavis[1356]: SQL::Log code NOT loaded
Jan 17 23:26:59 mail amavis[1356]: SQL::Quarantine NOT loaded
Jan 17 23:26:59 mail amavis[1356]: Lookup::SQL code NOT loaded
Jan 17 23:26:59 mail amavis[1356]: Lookup::LDAP code NOT loaded
Jan 17 23:26:59 mail amavis[1356]: AM.PDP-in proto code loaded
Jan 17 23:26:59 mail amavis[1356]: SMTP-in proto code loaded
Jan 17 23:26:59 mail amavis[1356]: Courier proto code NOT loaded
Jan 17 23:26:59 mail amavis[1356]: SMTP-out proto code loaded
Jan 17 23:26:59 mail amavis[1356]: Pipe-out proto code NOT loaded
Jan 17 23:26:59 mail amavis[1356]: BSMTP-out proto code NOT loaded
Jan 17 23:26:59 mail amavis[1356]: Local-out proto code loaded
Jan 17 23:26:59 mail amavis[1356]: OS_Fingerprint code NOT loaded
Jan 17 23:26:59 mail amavis[1356]: ANTI-VIRUS code loaded
Jan 17 23:26:59 mail amavis[1356]: ANTI-SPAM code loaded
Jan 17 23:26:59 mail amavis[1356]: ANTI-SPAM-EXT code NOT loaded
Jan 17 23:26:59 mail amavis[1356]: ANTI-SPAM-C code NOT loaded
Jan 17 23:26:59 mail amavis[1356]: ANTI-SPAM-SA code loaded
Jan 17 23:26:59 mail amavis[1356]: Unpackers code loaded
Jan 17 23:26:59 mail amavis[1356]: DKIM code loaded
Jan 17 23:26:59 mail amavis[1356]: Tools code NOT loaded
Jan 17 23:26:59 mail amavis[1356]: Found $file at /usr/bin/file
Jan 17 23:26:59 mail amavis[1356]: No $altermime, not using it
Jan 17 23:26:59 mail amavis[1356]: Internal decoder for .mail
Jan 17 23:26:59 mail amavis[1356]: No decoder for .F
Jan 17 23:26:59 mail amavis[1356]: Found decoder for .Z at /bin/uncompress
Jan 17 23:26:59 mail amavis[1356]: Internal decoder for .gz
Jan 17 23:26:59 mail amavis[1356]: Found decoder for .bz2 at /bin/bzip2 -d
Jan 17 23:26:59 mail amavis[1356]: No decoder for .xz tried: xzdec, xz -dc, unxz -c, xzcat
Jan 17 23:26:59 mail amavis[1356]: No decoder for .lzma tried: lzmadec, xz -dc --format=lzma, lzma -dc, unlzma -c, lzcat, lzmadec
Jan 17 23:26:59 mail amavis[1356]: No decoder for .lzo tried: lzop -d
Jan 17 23:26:59 mail amavis[1356]: No decoder for .rpm tried: rpm2cpio.pl, rpm2cpio
Jan 17 23:26:59 mail amavis[1356]: Found decoder for .cpio at /bin/pax
Jan 17 23:26:59 mail amavis[1356]: Found decoder for .tar at /bin/pax
Jan 17 23:26:59 mail amavis[1356]: No decoder for .deb tried: ar
Jan 17 23:26:59 mail amavis[1356]: Internal decoder for .zip
Jan 17 23:26:59 mail amavis[1356]: Internal decoder for .kmz
Jan 17 23:26:59 mail amavis[1356]: Found decoder for .7z at /usr/bin/7zr
Jan 17 23:26:59 mail amavis[1356]: No decoder for .rar tried: unrar-free
Jan 17 23:26:59 mail amavis[1356]: Found decoder for .arj at /usr/bin/arj
Jan 17 23:26:59 mail amavis[1356]: No decoder for .arc tried: nomarch, arc
Jan 17 23:26:59 mail amavis[1356]: No decoder for .zoo tried: zoo
Jan 17 23:26:59 mail amavis[1356]: No decoder for .doc tried: ripole
Jan 17 23:26:59 mail amavis[1356]: No decoder for .cab tried: cabextract
Jan 17 23:26:59 mail amavis[1356]: No decoder for .tnef
Jan 17 23:26:59 mail amavis[1356]: Internal decoder for .tnef
Jan 17 23:26:59 mail amavis[1356]: Found decoder for .exe at /usr/bin/arj
Jan 17 23:26:59 mail amavis[1356]: Using primary internal av scanner code for ClamAV-clamd
Jan 17 23:26:59 mail amavis[1356]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
Jan 17 23:26:59 mail amavis[1356]: Deleting db files in /var/lib/amavis/db
Jan 17 23:26:59 mail amavis[1356]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.54, libdb 5.3
Forgot to mention: I am running the service via systemd on coreos with an automatic letsencrypt companion
[Unit]
Description=Mail
Requires=docker.service
After=docker.service
[Service]
EnvironmentFile=/etc/environment
User=core
KillMode=none
Restart=always
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker kill Mail
ExecStartPre=-/usr/bin/docker rm Mail
ExecStartPre=-/usr/bin/docker pull tvial/docker-mailserver:2.1
ExecStart=/usr/bin/docker run --name Mail \
--hostname=mail.domain.de \
-p ${COREOS_PUBLIC_IP}:25:25 \
-p ${COREOS_PUBLIC_IP}:143:143 \
-p ${COREOS_PUBLIC_IP}:587:587 \
-p ${COREOS_PUBLIC_IP}:993:993 \
-p ${COREOS_PUBLIC_IP}:4190:4190 \
-v /container/certs:/etc/letsencrypt/live \
-v MailData:/var/mail \
-v /container/mail/config:/tmp/docker-mailserver/ \
-e "ENABLE_SPAMASSASSIN=1" \
-e "ENABLE_CLAMAV=1" \
-e "ENABLE_FAIL2BAN=1" \
-e "ONE_DIR=0" \
-e "DMS_DEBUG=0" \
-e "SSL_TYPE=letsencrypt" \
-e "ENABLE_MANAGESIEVE=1" \
-e "VIRTUAL_HOST=mail.domain.de" \
-e "LETSENCRYPT_HOST=mail.domain.de" \
-e "[email protected]" \
tvial/docker-mailserver:2.1 \
ExecStop=-/usr/bin/docker kill Mail
ExecStop=-/usr/bin/docker rm Mail
[Install]
WantedBy=multi-user.target
[X-Fleet]
Global=true
@thiesschneider Can you post your docker-compose.yml?
@jalenconner I've seen some users having one service not started. Perhaps this was also your issue.
Don't worry, you don't bother me.
But check /var/log/mail/mail.log, the answer is often explicit. You can paste them here too.
@jalenconner I am using systemd, so there is no docker-compose.yml
@tomav do you see anything which is not configured the right way?
@thiesschneider it looks good. What about log when you try to auth?
@thiesschneider Ah gotcha. 馃憤
@tomav Yeah I was looking into the mail.log a bit yesterday. Problem is that during the whole process of debugging I removed the Docker container several times so I have no copy of the mail.log file when it was giving me problems 馃槵
No worries, let's see if @thiesschneider has some logs to provide.
i think i messed something up with the different domains i have...
I have 2 domains in this container
Jan 18 15:25:06 mail postfix/submission/smtpd[2604]: disconnect from IP
Jan 18 15:25:06 mail dovecot: imap([email protected]): Disconnected: Logged out in=377 out=1450
Jan 18 15:25:06 mail dovecot: imap([email protected]): Disconnected: Logged out in=330 out=1147
Jan 18 15:25:06 mail postfix/submission/smtpd[2604]: connect from IP
Jan 18 15:25:10 mail dovecot: auth: passwd-file([email protected],IP): Password mismatch (SHA1 of given password: 712c344)
Jan 18 15:25:12 mail postfix/submission/smtpd[2604]: warning: IP: SASL PLAIN authentication failed:
Jan 18 15:25:12 mail postfix/submission/smtpd[2604]: lost connection after AUTH from IP
Jan 18 15:25:12 mail postfix/submission/smtpd[2604]: disconnect from IP
Jan 18 15:25:12 mail postfix/submission/smtpd[2604]: connect from IP
Jan 18 15:25:19 mail postfix/submission/smtpd[2604]: warning: IP: SASL PLAIN authentication failed:
Jan 18 15:25:19 mail postfix/submission/smtpd[2604]: lost connection after AUTH from IP
Jan 18 15:25:19 mail postfix/submission/smtpd[2604]: disconnect from IP
Jan 18 15:30:47 mail postfix/submission/smtpd[2620]: lost connection after UNKNOWN from IP
Jan 18 15:30:47 mail postfix/submission/smtpd[2620]: disconnect from IP
Jan 18 15:30:47 mail postfix/smtpd[2629]: connect from IP
Jan 18 15:31:10 mail dovecot: auth: passwd-file([email protected],IP,<J9gvG2BGewA+YdasdJQi>): unknown user (SHA1 of given password: 20fs2ddb)
Jan 18 15:31:12 mail dovecot: imap-login: Disconnected (auth failed, 1 attempts in 2 secs): user=<[email protected]>, method=PLAIN, rip=IP, lip=anotherIP, TLS: Disconnected, session=<J9gvG2ewBGewA+YJQi>
Jan 18 15:31:17 mail postfix/smtpd[2629]: lost connection after UNKNOWN from IP
Jan 18 15:31:17 mail postfix/smtpd[2629]: disconnect from IP
Jan 18 15:31:17 mail postfix/smtpd[2629]: connect from IP
Jan 18 15:31:21 mail dovecot: auth: passwd-file(name@domain,IP): Password mismatch (SHA1 of given password: 72fsec344)
Jan 18 15:31:23 mail postfix/smtpd[2629]: warning: IP: SASL PLAIN authentication failed:
Jan 18 15:31:23 mail postfix/smtpd[2629]: lost connection after AUTH from IP
Jan 18 15:31:23 mail postfix/smtpd[2629]: disconnect from IP
Jan 18 15:31:23 mail postfix/smtpd[2629]: connect from IP
but it does not work for both domains
@thiesschneider msg me on Gitter. I'll try to help you.
Thank you so much for your help!
@tomav I'm running into this as well. Was there a solution found other than to remove the fail2ban functionality? That did not work for me.
Here is my output from DMS_DEBUG:
Starting mail
Attaching to mail
mail |
mail | #
mail | #
mail | # ENV
mail | #
mail | #
mail |
mail | HOSTNAME=mail.domain.io
mail | ENABLE_MANAGESIEVE=1
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 | SSL_TYPE=letsencrypt
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_amavis() 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 or overidden (no default docker hostname/kubernetes) [_check_hostname]
mail | * Domain has been set to domain.io
mail | * Hostname has been set to mail.domain.io
mail | Configuring mail server
mail | Setting up default variables [_setup_default_vars]
mail | * Set ENABLE_LDAP=0
mail | * Set ENABLE_FETCHMAIL=0
mail | * Set OVERRIDE_HOSTNAME=
mail | * Set ENABLE_MANAGESIEVE=1
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 | * Sieve management enabled
mail | Setting up Dovecot Local User
mail | * Checking file line endings
mail | * Regenerating postfix user list
mail | * user 'user' for domain 'domain.io' with password '********'
mail | Setting up DKIM
mail | * DKIM keys added for: domain.io
mail | * Changing permissions on /etc/opendkim
mail | Setting up SSL
mail | * Adding mail.domain.io SSL certificate
mail | * SSL configured with 'letsencrypt' certificates
mail | Setting up PERMIT_DOCKER Option
mail | * Adding container ip in my networks
mail | Setting up Mailname
mail | * Creating /etc/mailname
mail | Setting up Amavis
mail | * Applying hostname to /etc/amavis/conf.d/05-node_id
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 | * Permissions in /var/mail look OK
mail | Starting Misc
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.io is up and running
mail | #
mail |
mail | Jan 24 05:16:24 mail amavis[1347]: Module Convert::TNEF 0.18
mail | Jan 24 05:16:24 mail amavis[1347]: Module Convert::UUlib 1.4
mail | Jan 24 05:16:24 mail amavis[1347]: Module Crypt::OpenSSL::RSA 0.28
mail | Jan 24 05:16:24 mail amavis[1347]: Module DB_File 1.827
mail | Jan 24 05:16:24 mail amavis[1347]: Module Digest::MD5 2.52
mail | Jan 24 05:16:24 mail amavis[1347]: Module Digest::SHA 5.84_01
mail | Jan 24 05:16:24 mail amavis[1347]: Module File::Temp 0.23
mail | Jan 24 05:16:24 mail amavis[1347]: Module IO::Socket::INET6 2.71
mail | Jan 24 05:16:24 mail amavis[1347]: Module MIME::Entity 5.505
mail | Jan 24 05:16:24 mail amavis[1347]: Module MIME::Parser 5.505
mail | Jan 24 05:16:24 mail amavis[1347]: Module MIME::Tools 5.505
mail | Jan 24 05:16:24 mail amavis[1347]: Module Mail::DKIM::Signer 0.4
mail | Jan 24 05:16:24 mail amavis[1347]: Module Mail::DKIM::Verifier 0.4
mail | Jan 24 05:16:24 mail amavis[1347]: Module Mail::Header 2.12
mail | Jan 24 05:16:24 mail amavis[1347]: Module Mail::Internet 2.12
mail | Jan 24 05:16:24 mail amavis[1347]: Module Mail::SPF v2.009
mail | Jan 24 05:16:24 mail amavis[1347]: Module Mail::SpamAssassin 3.004000
mail | Jan 24 05:16:24 mail amavis[1347]: Module Net::DNS 0.68
mail | Jan 24 05:16:24 mail amavis[1347]: Module Net::Server 2.007
mail | Jan 24 05:16:24 mail amavis[1347]: Module NetAddr::IP 4.071
mail | Jan 24 05:16:24 mail amavis[1347]: Module Razor2::Client::Version 2.84
mail | Jan 24 05:16:24 mail amavis[1347]: Module Socket6 0.25
mail | Jan 24 05:16:24 mail amavis[1347]: Module Time::HiRes 1.9725
mail | Jan 24 05:16:24 mail amavis[1347]: Module URI 1.60
mail | Jan 24 05:16:24 mail amavis[1347]: Module Unix::Syslog 1.1
mail | Jan 24 05:16:24 mail amavis[1347]: Amavis::DB code loaded
mail | Jan 24 05:16:24 mail amavis[1347]: SQL base code NOT loaded
mail | Jan 24 05:16:24 mail amavis[1347]: SQL::Log code NOT loaded
mail | Jan 24 05:16:24 mail amavis[1347]: SQL::Quarantine NOT loaded
mail | Jan 24 05:16:24 mail amavis[1347]: Lookup::SQL code NOT loaded
mail | Jan 24 05:16:24 mail amavis[1347]: Lookup::LDAP code NOT loaded
mail | Jan 24 05:16:24 mail amavis[1347]: AM.PDP-in proto code loaded
mail | Jan 24 05:16:24 mail amavis[1347]: SMTP-in proto code loaded
mail | Jan 24 05:16:24 mail amavis[1347]: Courier proto code NOT loaded
mail | Jan 24 05:16:24 mail amavis[1347]: SMTP-out proto code loaded
mail | Jan 24 05:16:24 mail amavis[1347]: Pipe-out proto code NOT loaded
mail | Jan 24 05:16:24 mail amavis[1347]: BSMTP-out proto code NOT loaded
mail | Jan 24 05:16:24 mail amavis[1347]: Local-out proto code loaded
mail | Jan 24 05:16:24 mail amavis[1347]: OS_Fingerprint code NOT loaded
mail | Jan 24 05:16:24 mail amavis[1347]: ANTI-VIRUS code loaded
mail | Jan 24 05:16:24 mail amavis[1347]: ANTI-SPAM code loaded
mail | Jan 24 05:16:24 mail amavis[1347]: ANTI-SPAM-EXT code NOT loaded
mail | Jan 24 05:16:24 mail amavis[1347]: ANTI-SPAM-C code NOT loaded
mail | Jan 24 05:16:24 mail amavis[1347]: ANTI-SPAM-SA code loaded
mail | Jan 24 05:16:24 mail amavis[1347]: Unpackers code loaded
mail | Jan 24 05:16:24 mail amavis[1347]: DKIM code loaded
mail | Jan 24 05:16:24 mail amavis[1347]: Tools code NOT loaded
mail | Jan 24 05:16:24 mail amavis[1347]: Found $file at /usr/bin/file
mail | Jan 24 05:16:24 mail amavis[1347]: No $altermime, not using it
mail | Jan 24 05:16:24 mail amavis[1347]: Internal decoder for .mail
mail | Jan 24 05:16:24 mail amavis[1347]: No decoder for .F
mail | Jan 24 05:16:24 mail amavis[1347]: Found decoder for .Z at /bin/uncompress
mail | Jan 24 05:16:24 mail amavis[1347]: Internal decoder for .gz
mail | Jan 24 05:16:24 mail amavis[1347]: Found decoder for .bz2 at /bin/bzip2 -d
mail | Jan 24 05:16:24 mail amavis[1347]: No decoder for .xz tried: xzdec, xz -dc, unxz -c, xzcat
mail | Jan 24 05:16:24 mail amavis[1347]: No decoder for .lzma tried: lzmadec, xz -dc --format=lzma, lzma -dc, unlzma -c, lzcat, lzmadec
mail | Jan 24 05:16:24 mail amavis[1347]: No decoder for .lzo tried: lzop -d
mail | Jan 24 05:16:24 mail amavis[1347]: No decoder for .rpm tried: rpm2cpio.pl, rpm2cpio
mail | Jan 24 05:16:24 mail amavis[1347]: Found decoder for .cpio at /bin/pax
mail | Jan 24 05:16:24 mail amavis[1347]: Found decoder for .tar at /bin/pax
mail | Jan 24 05:16:24 mail amavis[1347]: No decoder for .deb tried: ar
mail | Jan 24 05:16:24 mail amavis[1347]: Internal decoder for .zip
mail | Jan 24 05:16:24 mail amavis[1347]: Internal decoder for .kmz
mail | Jan 24 05:16:24 mail amavis[1347]: Found decoder for .7z at /usr/bin/7zr
mail | Jan 24 05:16:24 mail amavis[1347]: No decoder for .rar tried: unrar-free
mail | Jan 24 05:16:24 mail amavis[1347]: Found decoder for .arj at /usr/bin/arj
mail | Jan 24 05:16:24 mail amavis[1347]: No decoder for .arc tried: nomarch, arc
mail | Jan 24 05:16:24 mail amavis[1347]: No decoder for .zoo tried: zoo
mail | Jan 24 05:16:24 mail amavis[1347]: No decoder for .doc tried: ripole
mail | Jan 24 05:16:24 mail amavis[1347]: No decoder for .cab tried: cabextract
mail | Jan 24 05:16:24 mail amavis[1347]: No decoder for .tnef
mail | Jan 24 05:16:24 mail amavis[1347]: Internal decoder for .tnef
mail | Jan 24 05:16:24 mail amavis[1347]: Found decoder for .exe at /usr/bin/arj
mail | Jan 24 05:16:24 mail amavis[1347]: Using primary internal av scanner code for ClamAV-clamd
mail | Jan 24 05:16:24 mail amavis[1347]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
mail | Jan 24 05:16:24 mail amavis[1347]: Deleting db files nanny.db,__db.003,__db.001,snmp.db,__db.002 in /var/lib/amavis/db
mail | Jan 24 05:16:24 mail amavis[1347]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.54, libdb 5.3
mail | Jan 24 05:16:57 mail dovecot: auth: passwd-file([email protected],134.226.61.167,<WAemOdBGaQBo7ELF>): Password mismatch (SHA1 of given password: 3261b7)
mail | Jan 24 05:16:59 mail dovecot: imap-login: Disconnected (auth failed, 1 attempts in 2 secs): user=<[email protected]>, method=PLAIN, rip=134.226.61.167, lip=162.17.0.2, TLS, session=<WAemOdBGaQBo7ELF>
I am wondering if it has something to do with the setup.sh script that hashes your password. I have tried this using both the manual script as such:
sudo docker run --rm -e [email protected] -e MAIL_PASS=bEp*X2k3PJ*HFmaRPZBz@#5 -ti tvial/docker-mailserver:latest /bin/sh -c 'echo "$MAIL_USER|$(doveadm pw -s SHA512-CRYPT -u $MAIL_USER -p $MAIL_PASS)"' >> /srv/mailserver/config/postfix-accounts.cf
as well as the setup.sh script as such:
./setup.sh email add [email protected] bEp*X2k3PJ*HFmaRPZBz@#5
For completeness, here is my docker-compose.yml:
version: '2'
services:
mail:
restart: always
image: tvial/docker-mailserver:latest
hostname: mail
domainname: domain.io
container_name: mail
ports:
- "25:25"
- "143:143"
- "587:587"
- "993:993"
- "4190:4190"
volumes:
- /srv/mailserver/maildata:/var/mail
- /srv/mailserver/config/:/tmp/docker-mailserver/
- /srv/mailserver/mailstate:/var/mail-state
- /etc/letsencrypt/:/etc/letsencrypt/
environment:
- ENABLE_FAIL2BAN=1
- SSL_TYPE=letsencrypt
- ENABLE_MANAGESIEVE=1
- ENABLE_SPAMASSASSIN=1
- ENABLE_CLAMAV=1
- DMS_DEBUG=1
cap_add:
- NET_ADMIN
volumes:
maildata:
driver: local
mailstate:
driver: local
Look forward to hearing if anyone had any similar experiences or solutions that fit this problem.
There was no issue, just a password mismatch.
There's nothing to do with fail2ban.
First thing to do is to try from another device.
If it doesn't work, we'll discuss on Gitter. Ok?
I've tried from multiple devices. I've messaged you in the DMS lobby
I've solved the issue. It is that certain characters in the password were causing the password mismatch.
By replacing:
./setup.sh email add [email protected] bEp*X2k3PJ*HFm%RPZBz@#5
with
./setup.sh email add [email protected] bEp*X2k3PJ*HFm@RPZBz@*5
I was able to successfully authenticate.
The characters in question are at the least, # and %. Any ideas what would cause this?
I think you can use 'PASS#%WORD' to generate these passwords
Most helpful comment
I had the same issue and after removing
--cap-add=NET_ADMINit works with my desktop client (apple mail). On iOS i cannot send anything for now.