Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect from external network (e.g. telnet, local email client,...) #602

Closed
mastix opened this issue May 11, 2017 · 9 comments
Closed

Comments

@mastix
Copy link

mastix commented May 11, 2017

Hi @tomav,

first of all: Thank you for that great docker container!!! That was exactly what I was looking for!

Unfortunately, it seems like I'm having the same issue as many others (already checked the closed tickets).

I can easily connect from my docker host (also tried other ports like 993):

mastix@localhost:~$ telnet mail.mycooldomain.com 25
Trying xxx.xxx.xxx.xxx…
Connected to mail.mycooldomain.com.
Escape character is '^]'.
220 mail.mycooldomain.com ESMTP Postfix (Ubuntu)

But I can't connect from my local machine:

mastixmc$ telnet mail.mycooldomain.com 25
Trying xxx.xxx.xxx.xxx…
telnet: connect to address xxx.xxx.xxx.xxx: Operation timed out
telnet: Unable to connect to remote host

Firewall (enabled and disabled it -> doesn't make a difference) looks fine:

sudo ufw show added
Added user rules (see 'ufw status' for running firewall):
ufw allow 80/tcp
ufw allow 443/tcp
ufw allow 25/tcp
ufw allow 587/tcp
ufw allow 143/tcp
ufw allow 993/tcp

This is my docker-compose (I already disabled fail2ban, postgrey and added permit_docker -> nothing helped):

mail:
    image: tvial/docker-mailserver:latest
    hostname: mail
    domainname: mycooldomain.com
    container_name: mail
    ports:
      - "25:25"
      - "143:143"
      - "587:587"
      - "993:993"
    volumes:
      - ./mailserver/maildata:/var/mail
      - ./mailserver/mailstate:/var/mail-state
      - ./mailserver/config/:/tmp/docker-mailserver/
    environment:
      - ENABLE_SPAMASSASSIN=1
      - ENABLE_CLAMAV=1
      - ENABLE_FAIL2BAN=0
      - ENABLE_POSTGREY=0
      - ONE_DIR=1
      - DMS_DEBUG=1
      - PERMIT_DOCKER=host

Mail container is up and running:

mail                                /bin/sh -c /usr/local/bin/ ...      Up                                  110/tcp, 0.0.0.0:143-143/tcp,    
                                                                                                             0.0.0.0:25->25/tcp, 4190/tcp,     
                                                                                                             0.0.0.0:587->587/tcp,             
                                                                                                             0.0.0.0:993->993/tcp, 995/tcp

Here's the debug log from the server:

mail                       | 2017-05-11T10:55:08.992337341Z 
mail                       | 2017-05-11T10:55:08.992361922Z #
mail                       | 2017-05-11T10:55:08.992487522Z #
mail                       | 2017-05-11T10:55:08.992502810Z # ENV
mail                       | 2017-05-11T10:55:08.992507033Z #
mail                       | 2017-05-11T10:55:08.992675731Z #
mail                       | 2017-05-11T10:55:08.992687041Z 
mail                       | 2017-05-11T10:55:08.993584685Z HOSTNAME=mail.mycooldomain.com
mail                       | 2017-05-11T10:55:08.993594506Z DMS_DEBUG=1
mail                       | 2017-05-11T10:55:08.993597386Z VIRUSMAILS_DELETE_DELAY=7
mail                       | 2017-05-11T10:55:08.993600076Z ENABLE_CLAMAV=1
mail                       | 2017-05-11T10:55:08.993610070Z PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
mail                       | 2017-05-11T10:55:08.993613201Z ENABLE_FAIL2BAN=0
mail                       | 2017-05-11T10:55:08.993615695Z PERMIT_DOCKER=host
mail                       | 2017-05-11T10:55:08.993617978Z ENABLE_SPAMASSASSIN=1
mail                       | 2017-05-11T10:55:08.993620384Z PWD=/
mail                       | 2017-05-11T10:55:08.993622626Z SHLVL=1
mail                       | 2017-05-11T10:55:08.993624968Z HOME=/root
mail                       | 2017-05-11T10:55:08.993627264Z ONE_DIR=1
mail                       | 2017-05-11T10:55:08.993629602Z DEBIAN_FRONTEND=noninteractive
mail                       | 2017-05-11T10:55:08.993631893Z ENABLE_POSTGREY=0
mail                       | 2017-05-11T10:55:08.993634301Z _=/usr/bin/printenv
mail                       | 2017-05-11T10:55:08.993755341Z 
mail                       | 2017-05-11T10:55:08.993761128Z #
mail                       | 2017-05-11T10:55:08.993874307Z #
mail                       | 2017-05-11T10:55:08.993879630Z # docker-mailserver
mail                       | 2017-05-11T10:55:08.993990548Z #
mail                       | 2017-05-11T10:55:08.993995986Z #
mail                       | 2017-05-11T10:55:08.994101054Z 
mail                       | 2017-05-11T10:55:08.994242132Z Initializing setup
mail                       | 2017-05-11T10:55:08.994247706Z   Registering check,setup,fix,misc and start-daemons functions
mail                       | 2017-05-11T10:55:08.994400303Z   * _check_environment_variables() registered
mail                       | 2017-05-11T10:55:08.994486379Z   * _check_hostname() registered
mail                       | 2017-05-11T10:55:08.994566913Z   * _setup_default_vars() registered
mail                       | 2017-05-11T10:55:08.994682040Z   * _setup_dovecot() registered
mail                       | 2017-05-11T10:55:08.994814047Z   * _setup_dovecot_local_user() registered
mail                       | 2017-05-11T10:55:08.994822270Z   * _setup_dkim() registered
mail                       | 2017-05-11T10:55:08.994937664Z   * _setup_ssl() registered
mail                       | 2017-05-11T10:55:08.994943484Z   * _setup_docker_permit() registered
mail                       | 2017-05-11T10:55:08.995080062Z   * _setup_mailname() registered
mail                       | 2017-05-11T10:55:08.995085417Z   * _setup_amavis() registered
mail                       | 2017-05-11T10:55:08.995222843Z   * _setup_dmarc_hostname() registered
mail                       | 2017-05-11T10:55:08.995228157Z   * _setup_postfix_hostname() registered
mail                       | 2017-05-11T10:55:08.995364576Z   * _setup_dovecot_hostname() registered
mail                       | 2017-05-11T10:55:08.995370161Z   * _setup_postfix_sasl() registered
mail                       | 2017-05-11T10:55:08.995546505Z   * _setup_postfix_override_configuration() registered
mail                       | 2017-05-11T10:55:08.995555568Z   * _setup_postfix_sasl_password() registered
mail                       | 2017-05-11T10:55:08.995688903Z   * _setup_security_stack() registered
mail                       | 2017-05-11T10:55:08.995708836Z   * _setup_postfix_aliases() registered
mail                       | 2017-05-11T10:55:08.995801694Z   * _setup_postfix_vhost() registered
mail                       | 2017-05-11T10:55:08.995914315Z   * _setup_environment() registered
mail                       | 2017-05-11T10:55:08.995922559Z   * _fix_var_mail_permissions() registered
mail                       | 2017-05-11T10:55:08.996064208Z   * _fix_var_amavis_permissions() registered
mail                       | 2017-05-11T10:55:08.996072975Z   * _misc_save_states() registered
mail                       | 2017-05-11T10:55:08.996176717Z   * _start_daemons_cron() registered
mail                       | 2017-05-11T10:55:08.996183892Z   * _start_daemons_rsyslog() registered
mail                       | 2017-05-11T10:55:08.996345519Z   * _start_daemons_dovecot() registered
mail                       | 2017-05-11T10:55:08.996443780Z   * _start_daemons_opendkim() registered
mail                       | 2017-05-11T10:55:08.996451020Z   * _start_daemons_opendmarc() registered
mail                       | 2017-05-11T10:55:08.996672825Z   * _start_daemons_postfix() registered
mail                       | 2017-05-11T10:55:08.996686866Z   * _start_daemons_clamav() registered
mail                       | 2017-05-11T10:55:08.996690799Z   * _start_daemons_amavis() registered
mail                       | 2017-05-11T10:55:08.996852550Z Checking configuration
mail                       | 2017-05-11T10:55:08.996860133Z   Check that there are no conflicts with env variables [_check_environment_variables]
mail                       | 2017-05-11T10:55:08.997523809Z   Check that hostname/domainname is provided or overidden (no default docker hostname/kubernetes) [_check_hostname]
mail                       | 2017-05-11T10:55:08.999125238Z   * Domain has been set to mycooldomain.com
mail                       | 2017-05-11T10:55:08.999137455Z   * Hostname has been set to mail.mycooldomain.com
mail                       | 2017-05-11T10:55:08.999255989Z Configuring mail server
mail                       | 2017-05-11T10:55:08.999376360Z   Setting up default variables [_setup_default_vars]
mail                       | 2017-05-11T10:55:08.999557843Z   * Set ENABLE_LDAP=0
mail                       | 2017-05-11T10:55:08.999673261Z   * Set ENABLE_FETCHMAIL=0
mail                       | 2017-05-11T10:55:08.999792692Z   * Set OVERRIDE_HOSTNAME=
mail                       | 2017-05-11T10:55:08.999896915Z   * Set ENABLE_MANAGESIEVE=0
mail                       | 2017-05-11T10:55:09.000007813Z   * Set DMS_DEBUG=1
mail                       | 2017-05-11T10:55:09.000116763Z   * Set ENABLE_POP3=0
mail                       | 2017-05-11T10:55:09.000222344Z   * Set ENABLE_SASLAUTHD=0
mail                       | 2017-05-11T10:55:09.000322166Z   * Set ENABLE_CLAMAV=1
mail                       | 2017-05-11T10:55:09.000422293Z   * Set SMTP_ONLY=0
mail                       | 2017-05-11T10:55:09.000487069Z   * Set ENABLE_FAIL2BAN=0
mail                       | 2017-05-11T10:55:09.000850551Z   * Set ENABLE_SPAMASSASSIN=1
mail                       | 2017-05-11T10:55:09.000956661Z   * Set POSTGREY_DELAY=300
mail                       | 2017-05-11T10:55:09.001061126Z   * Set POSTGREY_TEXT=Delayed by postgrey
mail                       | 2017-05-11T10:55:09.001158540Z   * Set ENABLE_POSTGREY=0
mail                       | 2017-05-11T10:55:09.001294125Z   * Set POSTGREY_MAX_AGE=35
mail                       | 2017-05-11T10:55:09.001442035Z   Setting up Dovecot
mail                       | 2017-05-11T10:55:09.015190107Z   Setting up Dovecot Local User
mail                       | 2017-05-11T10:55:09.015208221Z   * Checking file line endings
mail                       | 2017-05-11T10:55:09.016305204Z   * Regenerating postfix user list
mail                       | 2017-05-11T10:55:09.029469377Z   * user 'noreply' for domain 'mycooldomain.com' with password '********'
mail                       | 2017-05-11T10:55:09.031027201Z   Setting up DKIM
mail                       | 2017-05-11T10:55:09.037619148Z   * DKIM keys added for: mycooldomain.com
mail                       | 2017-05-11T10:55:09.037786321Z   * Changing permissions on /etc/opendkim
mail                       | 2017-05-11T10:55:09.040311911Z   Setting up SSL
mail                       | 2017-05-11T10:55:09.040487469Z   Setting up PERMIT_DOCKER Option
mail                       | 2017-05-11T10:55:09.045494214Z   * Adding 172.19.0.0/16 to my networks
mail                       | 2017-05-11T10:55:09.065737390Z   Setting up Mailname
mail                       | 2017-05-11T10:55:09.065863865Z   * Creating /etc/mailname
mail                       | 2017-05-11T10:55:09.066148050Z   Setting up Amavis
mail                       | 2017-05-11T10:55:09.066247964Z   * Applying hostname to /etc/amavis/conf.d/05-node_id
mail                       | 2017-05-11T10:55:09.067820153Z   Setting up dmarc
mail                       | 2017-05-11T10:55:09.067975798Z   * Applying hostname to /etc/opendmarc.conf
mail                       | 2017-05-11T10:55:09.069751453Z   Applying hostname and domainname to Postfix
mail                       | 2017-05-11T10:55:09.069952288Z   * Applying hostname to /etc/postfix/main.cf
mail                       | 2017-05-11T10:55:09.082168740Z   Applying hostname to Dovecot
mail                       | 2017-05-11T10:55:09.082392600Z   * Applying hostname to /etc/dovecot/conf.d/15-lda.conf
mail                       | 2017-05-11T10:55:09.085949314Z   Setting up Postfix Override configuration
mail                       | 2017-05-11T10:55:09.086182121Z   * No extra postfix settings loaded because optional '/tmp/docker-mailserver/postfix-main.cf' not provided.
mail                       | 2017-05-11T10:55:09.086375059Z   Setting up Postfix SASL Password
mail                       | 2017-05-11T10:55:09.087361605Z   * Warning: 'SASL_PASSWD' is not provided. /etc/postfix/sasl_passwd not created.
mail                       | 2017-05-11T10:55:09.087603858Z   Setting up Security Stack
mail                       | 2017-05-11T10:55:09.087947076Z   * Enabling and configuring spamassassin
mail                       | 2017-05-11T10:55:09.094246074Z   * Enabling clamav
mail                       | 2017-05-11T10:55:09.096907089Z   Setting up Postfix Aliases
mail                       | 2017-05-11T10:55:09.097198844Z   * Warning 'config/postfix-virtual.cf' is not provided. No mail alias/forward created.
mail                       | 2017-05-11T10:55:09.097404991Z   Setting up Postfix vhost
mail                       | 2017-05-11T10:55:09.099720376Z   Setting up /etc/environment
mail                       | 2017-05-11T10:55:09.101285350Z   Checking /var/mail permissions
mail                       | 2017-05-11T10:55:09.104154349Z   * Permissions in /var/mail look OK
mail                       | 2017-05-11T10:55:09.104355228Z   Checking $amavis_state_dir permissions
mail                       | 2017-05-11T10:55:09.107632489Z   * Permissions in /var/mail-state/lib-amavis look OK
mail                       | 2017-05-11T10:55:09.107830630Z Starting Misc
mail                       | 2017-05-11T10:55:09.108035860Z   * Consolidating all state onto /var/mail-state
mail                       | 2017-05-11T10:55:09.110039802Z   *   Destination /var/mail-state/spool-postfix exists, linking /var/spool/postfix to it
mail                       | 2017-05-11T10:55:09.113664122Z   *   Destination /var/mail-state/lib-postfix exists, linking /var/lib/postfix to it
mail                       | 2017-05-11T10:55:09.117296698Z   *   Destination /var/mail-state/lib-amavis exists, linking /var/lib/amavis to it
mail                       | 2017-05-11T10:55:09.120854301Z   *   Destination /var/mail-state/lib-clamav exists, linking /var/lib/clamav to it
mail                       | 2017-05-11T10:55:09.124338972Z   *   Destination /var/mail-state/lib-spamassasin exists, linking /var/lib/spamassasin to it
mail                       | 2017-05-11T10:55:09.127785307Z   *   Destination /var/mail-state/lib-fail2ban exists, linking /var/lib/fail2ban to it
mail                       | 2017-05-11T10:55:09.131902444Z   *   Destination /var/mail-state/lib-postgrey exists, linking /var/lib/postgrey to it
mail                       | 2017-05-11T10:55:09.133959982Z Starting mail server
mail                       | 2017-05-11T10:55:09.135831825Z   Starting cron  [ OK ]
mail                       | 2017-05-11T10:55:09.277202878Z   Starting rsyslog  [ OK ]
mail                       | 2017-05-11T10:55:09.301830479Z   Starting dovecot services  [ OK ]
mail                       | 2017-05-11T10:55:09.321709408Z   Starting opendkim  [ OK ]
mail                       | 2017-05-11T10:55:09.335360573Z   Starting opendmarc  [ OK ]
mail                       | 2017-05-11T10:55:13.114574814Z   Starting postfix  [ OK ]
mail                       | 2017-05-11T10:55:24.793945656Z   Starting clamav  [ OK ]
mail                       | 2017-05-11T10:55:25.845003516Z   Starting amavis  [ OK ]
mail                       | 2017-05-11T10:55:25.845205809Z 
mail                       | 2017-05-11T10:55:25.845227569Z #
mail                       | 2017-05-11T10:55:25.845446919Z # mail.mycooldomain.com is up and running
mail                       | 2017-05-11T10:55:25.845458441Z #
mail                       | 2017-05-11T10:55:25.845588375Z 
mail                       | 2017-05-11T10:55:26.847128887Z May 11 10:55:25 mail amavis[1359]: Module Amavis::Conf        2.404
mail                       | 2017-05-11T10:55:26.847174714Z May 11 10:55:25 mail amavis[1359]: Module Archive::Zip        1.56
mail                       | 2017-05-11T10:55:26.847179977Z May 11 10:55:25 mail amavis[1359]: Module BerkeleyDB          0.55
mail                       | 2017-05-11T10:55:26.847182904Z May 11 10:55:25 mail amavis[1359]: Module Compress::Raw::Zlib 2.068
mail                       | 2017-05-11T10:55:26.847185657Z May 11 10:55:25 mail amavis[1359]: Module Compress::Zlib      2.068
mail                       | 2017-05-11T10:55:26.847188568Z May 11 10:55:25 mail amavis[1359]: Module Crypt::OpenSSL::RSA 0.28
mail                       | 2017-05-11T10:55:26.847191276Z May 11 10:55:25 mail amavis[1359]: Module DB_File             1.835
mail                       | 2017-05-11T10:55:26.847193939Z May 11 10:55:25 mail amavis[1359]: Module Digest::MD5         2.54
mail                       | 2017-05-11T10:55:26.847196552Z May 11 10:55:25 mail amavis[1359]: Module Digest::SHA         5.95
mail                       | 2017-05-11T10:55:26.847199207Z May 11 10:55:25 mail amavis[1359]: Module Encode              2.72
mail                       | 2017-05-11T10:55:26.847201776Z May 11 10:55:25 mail amavis[1359]: Module File::Temp          0.2304
mail                       | 2017-05-11T10:55:26.847204497Z May 11 10:55:25 mail amavis[1359]: Module IO::Socket::INET6   2.72
mail                       | 2017-05-11T10:55:26.847207078Z May 11 10:55:25 mail amavis[1359]: Module IO::Socket::IP      0.37
mail                       | 2017-05-11T10:55:26.847209733Z May 11 10:55:25 mail amavis[1359]: Module MIME::Entity        5.507
mail                       | 2017-05-11T10:55:26.847212295Z May 11 10:55:25 mail amavis[1359]: Module MIME::Parser        5.507
mail                       | 2017-05-11T10:55:26.847215254Z May 11 10:55:25 mail amavis[1359]: Module MIME::Tools         5.507
mail                       | 2017-05-11T10:55:26.847218067Z May 11 10:55:25 mail amavis[1359]: Module Mail::DKIM::Signer  0.4
mail                       | 2017-05-11T10:55:26.847220694Z May 11 10:55:25 mail amavis[1359]: Module Mail::DKIM::Verifier 0.4
mail                       | 2017-05-11T10:55:26.847223326Z May 11 10:55:25 mail amavis[1359]: Module Mail::Header        2.13
mail                       | 2017-05-11T10:55:26.847225959Z May 11 10:55:25 mail amavis[1359]: Module Mail::Internet      2.13
mail                       | 2017-05-11T10:55:26.847228999Z May 11 10:55:25 mail amavis[1359]: Module Mail::SPF           v2.009
mail                       | 2017-05-11T10:55:26.847232033Z May 11 10:55:25 mail amavis[1359]: Module Mail::SpamAssassin  3.004001
mail                       | 2017-05-11T10:55:26.847234724Z May 11 10:55:25 mail amavis[1359]: Module Net::DNS            0.81
mail                       | 2017-05-11T10:55:26.847237592Z May 11 10:55:25 mail amavis[1359]: Module Net::LibIDN         0.12
mail                       | 2017-05-11T10:55:26.847241759Z May 11 10:55:25 mail amavis[1359]: Module Net::Server         2.008
mail                       | 2017-05-11T10:55:26.847244323Z May 11 10:55:25 mail amavis[1359]: Module NetAddr::IP         4.078
mail                       | 2017-05-11T10:55:26.847246995Z May 11 10:55:25 mail amavis[1359]: Module Razor2::Client::Version 2.84
mail                       | 2017-05-11T10:55:26.847249544Z May 11 10:55:25 mail amavis[1359]: Module Scalar::Util        1.41
mail                       | 2017-05-11T10:55:26.847252151Z May 11 10:55:25 mail amavis[1359]: Module Socket              2.018
mail                       | 2017-05-11T10:55:26.847254730Z May 11 10:55:25 mail amavis[1359]: Module Socket6             0.25
mail                       | 2017-05-11T10:55:26.847258609Z May 11 10:55:25 mail amavis[1359]: Module Time::HiRes         1.9726
mail                       | 2017-05-11T10:55:26.847267290Z May 11 10:55:25 mail amavis[1359]: Module URI                 1.71
mail                       | 2017-05-11T10:55:26.847270202Z May 11 10:55:25 mail amavis[1359]: Module Unix::Syslog        1.1
mail                       | 2017-05-11T10:55:26.847272762Z May 11 10:55:25 mail amavis[1359]: Amavis::ZMQ code     NOT loaded
mail                       | 2017-05-11T10:55:26.847275334Z May 11 10:55:25 mail amavis[1359]: Amavis::DB code      loaded
mail                       | 2017-05-11T10:55:26.847277923Z May 11 10:55:25 mail amavis[1359]: SQL base code        NOT loaded
mail                       | 2017-05-11T10:55:26.847280453Z May 11 10:55:25 mail amavis[1359]: SQL::Log code        NOT loaded
mail                       | 2017-05-11T10:55:26.847282964Z May 11 10:55:25 mail amavis[1359]: SQL::Quarantine      NOT loaded
mail                       | 2017-05-11T10:55:26.847285462Z May 11 10:55:25 mail amavis[1359]: Lookup::SQL code     NOT loaded
mail                       | 2017-05-11T10:55:26.847288005Z May 11 10:55:25 mail amavis[1359]: Lookup::LDAP code    NOT loaded
mail                       | 2017-05-11T10:55:26.847290627Z May 11 10:55:25 mail amavis[1359]: AM.PDP-in proto code loaded
mail                       | 2017-05-11T10:55:26.847293271Z May 11 10:55:25 mail amavis[1359]: SMTP-in proto code   loaded
mail                       | 2017-05-11T10:55:26.847295932Z May 11 10:55:25 mail amavis[1359]: Courier proto code   NOT loaded
mail                       | 2017-05-11T10:55:26.847298471Z May 11 10:55:25 mail amavis[1359]: SMTP-out proto code  loaded
mail                       | 2017-05-11T10:55:26.847301046Z May 11 10:55:25 mail amavis[1359]: Pipe-out proto code  NOT loaded
mail                       | 2017-05-11T10:55:26.847303743Z May 11 10:55:25 mail amavis[1359]: BSMTP-out proto code NOT loaded
mail                       | 2017-05-11T10:55:26.847306276Z May 11 10:55:25 mail amavis[1359]: Local-out proto code loaded
mail                       | 2017-05-11T10:55:26.847308868Z May 11 10:55:25 mail amavis[1359]: OS_Fingerprint code  NOT loaded
mail                       | 2017-05-11T10:55:26.847311382Z May 11 10:55:25 mail amavis[1359]: ANTI-VIRUS code      loaded
mail                       | 2017-05-11T10:55:26.847313931Z May 11 10:55:25 mail amavis[1359]: ANTI-SPAM code       loaded
mail                       | 2017-05-11T10:55:26.847316487Z May 11 10:55:25 mail amavis[1359]: ANTI-SPAM-EXT code   NOT loaded
mail                       | 2017-05-11T10:55:26.847319053Z May 11 10:55:25 mail amavis[1359]: ANTI-SPAM-C code     NOT loaded
mail                       | 2017-05-11T10:55:26.847321567Z May 11 10:55:25 mail amavis[1359]: ANTI-SPAM-SA code    loaded
mail                       | 2017-05-11T10:55:26.847324147Z May 11 10:55:25 mail amavis[1359]: Unpackers code       loaded
mail                       | 2017-05-11T10:55:26.847326799Z May 11 10:55:25 mail amavis[1359]: DKIM code            loaded
mail                       | 2017-05-11T10:55:26.847329329Z May 11 10:55:25 mail amavis[1359]: Tools code           NOT loaded
mail                       | 2017-05-11T10:55:26.847331965Z May 11 10:55:25 mail amavis[1359]: Found $file            at /usr/bin/file
mail                       | 2017-05-11T10:55:26.847334556Z May 11 10:55:25 mail amavis[1359]: No $altermime,         not using it
mail                       | 2017-05-11T10:55:26.847337219Z May 11 10:55:25 mail amavis[1359]: Internal decoder for .mail
mail                       | 2017-05-11T10:55:26.847339800Z May 11 10:55:25 mail amavis[1359]: Found decoder for    .Z    at /bin/uncompress
mail                       | 2017-05-11T10:55:26.847343074Z May 11 10:55:25 mail amavis[1359]: Found decoder for    .gz   at /bin/gzip -d
mail                       | 2017-05-11T10:55:26.847348143Z May 11 10:55:25 mail amavis[1359]: Found decoder for    .bz2  at /bin/bzip2 -d
mail                       | 2017-05-11T10:55:26.847351107Z May 11 10:55:25 mail amavis[1359]: No ext program for   .xz, tried: xzdec, xz -dc, unxz -c, xzcat
mail                       | 2017-05-11T10:55:26.847353864Z May 11 10:55:25 mail amavis[1359]: No ext program for   .lzma, tried: lzmadec, xz -dc --format=lzma, lzma -dc, unlzma -c, lzcat, lzmadec
mail                       | 2017-05-11T10:55:26.847356737Z May 11 10:55:25 mail amavis[1359]: No ext program for   .lrz, tried: lrzip -q -k -d -o -, lrzcat -q -k
mail                       | 2017-05-11T10:55:26.847359374Z May 11 10:55:25 mail amavis[1359]: No ext program for   .lzo, tried: lzop -d
mail                       | 2017-05-11T10:55:26.847361925Z May 11 10:55:25 mail amavis[1359]: No ext program for   .lz4, tried: lz4c -d
mail                       | 2017-05-11T10:55:26.847364512Z May 11 10:55:25 mail amavis[1359]: No ext program for   .rpm, tried: rpm2cpio.pl, rpm2cpio
mail                       | 2017-05-11T10:55:26.847367127Z May 11 10:55:25 mail amavis[1359]: Found decoder for    .cpio at /bin/pax
mail                       | 2017-05-11T10:55:26.847369677Z May 11 10:55:25 mail amavis[1359]: Found decoder for    .tar  at /bin/pax
mail                       | 2017-05-11T10:55:26.847372200Z May 11 10:55:25 mail amavis[1359]: No ext program for   .deb, tried: ar
mail                       | 2017-05-11T10:55:26.847374782Z May 11 10:55:25 mail amavis[1359]: No ext program for   .rar, tried: unrar-free
mail                       | 2017-05-11T10:55:26.847377421Z May 11 10:55:25 mail amavis[1359]: Found decoder for    .arj  at /usr/bin/arj
mail                       | 2017-05-11T10:55:26.847380043Z May 11 10:55:25 mail amavis[1359]: No ext program for   .arc, tried: nomarch, arc
mail                       | 2017-05-11T10:55:26.847382613Z May 11 10:55:25 mail amavis[1359]: No ext program for   .zoo, tried: zoo
mail                       | 2017-05-11T10:55:26.847385156Z May 11 10:55:25 mail amavis[1359]: No ext program for   .doc, tried: ripole
mail                       | 2017-05-11T10:55:26.847387745Z May 11 10:55:25 mail amavis[1359]: No ext program for   .cab, tried: cabextract
mail                       | 2017-05-11T10:55:26.847390298Z May 11 10:55:25 mail amavis[1359]: Internal decoder for .tnef
mail                       | 2017-05-11T10:55:26.847392844Z May 11 10:55:25 mail amavis[1359]: No ext program for   .zip, tried: 7za, 7z
mail                       | 2017-05-11T10:55:26.847395423Z May 11 10:55:25 mail amavis[1359]: No ext program for   .kmz, tried: 7za, 7z
mail                       | 2017-05-11T10:55:26.847397976Z May 11 10:55:25 mail amavis[1359]: Internal decoder for .zip 
mail                       | 2017-05-11T10:55:26.847400519Z May 11 10:55:25 mail amavis[1359]: Internal decoder for .kmz 
mail                       | 2017-05-11T10:55:26.847403050Z May 11 10:55:25 mail amavis[1359]: Found decoder for    .7z   at /usr/bin/7zr
mail                       | 2017-05-11T10:55:26.847405701Z May 11 10:55:25 mail amavis[1359]: No ext program for   .xz, tried: 7z
mail                       | 2017-05-11T10:55:26.847408259Z May 11 10:55:25 mail amavis[1359]: No ext program for   .lzma, tried: 7z
mail                       | 2017-05-11T10:55:26.847410801Z May 11 10:55:25 mail amavis[1359]: No ext program for   .jar, tried: 7z
mail                       | 2017-05-11T10:55:26.847413902Z May 11 10:55:25 mail amavis[1359]: No ext program for   .rar, tried: 7z
mail                       | 2017-05-11T10:55:26.847416575Z May 11 10:55:25 mail amavis[1359]: No ext program for   .swf, tried: 7z
mail                       | 2017-05-11T10:55:26.847419214Z May 11 10:55:25 mail amavis[1359]: No ext program for   .lha, tried: 7z
mail                       | 2017-05-11T10:55:26.847424465Z May 11 10:55:25 mail amavis[1359]: No ext program for   .iso, tried: 7z
mail                       | 2017-05-11T10:55:26.847427264Z May 11 10:55:25 mail amavis[1359]: No ext program for   .cab, tried: 7z
mail                       | 2017-05-11T10:55:26.847429823Z May 11 10:55:25 mail amavis[1359]: No ext program for   .deb, tried: 7z
mail                       | 2017-05-11T10:55:26.847432363Z May 11 10:55:25 mail amavis[1359]: No ext program for   .rpm, tried: 7z
mail                       | 2017-05-11T10:55:26.847434952Z May 11 10:55:25 mail amavis[1359]: Found decoder for    .exe  at /usr/bin/arj
mail                       | 2017-05-11T10:55:26.847437507Z May 11 10:55:25 mail amavis[1359]: No decoder for       .F   
mail                       | 2017-05-11T10:55:26.847440087Z May 11 10:55:25 mail amavis[1359]: No decoder for       .arc 
mail                       | 2017-05-11T10:55:26.847442640Z May 11 10:55:25 mail amavis[1359]: No decoder for       .cab 
mail                       | 2017-05-11T10:55:26.847445170Z May 11 10:55:25 mail amavis[1359]: No decoder for       .deb 
mail                       | 2017-05-11T10:55:26.847447697Z May 11 10:55:25 mail amavis[1359]: No decoder for       .doc 
mail                       | 2017-05-11T10:55:26.847450253Z May 11 10:55:25 mail amavis[1359]: No decoder for       .iso 
mail                       | 2017-05-11T10:55:26.847452792Z May 11 10:55:25 mail amavis[1359]: No decoder for       .jar 
mail                       | 2017-05-11T10:55:26.847455336Z May 11 10:55:25 mail amavis[1359]: No decoder for       .lha 
mail                       | 2017-05-11T10:55:26.847457831Z May 11 10:55:25 mail amavis[1359]: No decoder for       .lrz 
mail                       | 2017-05-11T10:55:26.847460334Z May 11 10:55:25 mail amavis[1359]: No decoder for       .lz4 
mail                       | 2017-05-11T10:55:26.847462835Z May 11 10:55:25 mail amavis[1359]: No decoder for       .lzma
mail                       | 2017-05-11T10:55:26.847465305Z May 11 10:55:25 mail amavis[1359]: No decoder for       .lzo 
mail                       | 2017-05-11T10:55:26.847467802Z May 11 10:55:25 mail amavis[1359]: No decoder for       .rar 
mail                       | 2017-05-11T10:55:26.847470287Z May 11 10:55:25 mail amavis[1359]: No decoder for       .rpm 
mail                       | 2017-05-11T10:55:26.847472790Z May 11 10:55:25 mail amavis[1359]: No decoder for       .swf 
mail                       | 2017-05-11T10:55:26.847475373Z May 11 10:55:25 mail amavis[1359]: No decoder for       .xz  
mail                       | 2017-05-11T10:55:26.847477934Z May 11 10:55:25 mail amavis[1359]: No decoder for       .zoo 
mail                       | 2017-05-11T10:55:26.847480470Z May 11 10:55:25 mail amavis[1359]: Using primary internal av scanner code for ClamAV-clamd
mail                       | 2017-05-11T10:55:26.847483128Z May 11 10:55:25 mail amavis[1359]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
mail                       | 2017-05-11T10:55:26.847485826Z May 11 10:55:25 mail amavis[1359]: Deleting db files nanny.db,snmp.db,__db.003,__db.001,__db.002 in /var/lib/amavis/db
mail                       | 2017-05-11T10:55:26.847488564Z May 11 10:55:25 mail amavis[1359]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.55, libdb 5.3
@tomav
Copy link
Contributor

tomav commented May 11, 2017

Thanks for using this image, a lot of users contributed to its success!
Regarding your issue, are you sure your ISP does not block your :25 connections?

@tomav tomav added the question label May 11, 2017
@mastix
Copy link
Author

mastix commented May 11, 2017

Hi @tomav,

It's a root server 1&1 and my ISP is "unitymedia" a common German ISP. Also, all other ports in the container don't work either: 993, 143, 587.

mastixmc$ telnet mail.mycooldomain.com 587
Trying xxx.xxx.xxx.xxx…
telnet: connect to address xxx.xxx.xxx.xxx: Operation timed out
telnet: Unable to connect to remote host

DNS config for mail.mycooldomain.com is also there (incl. MX and TXT).

... and the server listens correctly:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode       PID/Program name      
tcp6       0      0 :::587                  :::*                    LISTEN      0          164822      46450/docker-proxy
tcp6       0      0 :::143                  :::*                    LISTEN      0          159214      46462/docker-proxy
tcp6       0      0 :::80                   :::*                    LISTEN      0          157742      44501/docker-proxy
tcp6       0      0 :::25                   :::*                    LISTEN      0          164838      46474/docker-proxy
tcp6       0      0 :::443                  :::*                    LISTEN      0          156824      44487/docker-proxy      
tcp6       0      0 :::993                  :::*                    LISTEN      0          164815      46439/docker-proxy

Maybe I'm just missing something very obvious here... :(

I'm not sure whether it's the mail server (e.g. postfix) that is blocking the request. Unfortunately, I can't see anything in the logs. :( That's why I was playing around with PERMIT_DOCKER. I also tried to overwrite the allowed networks with my own postfix-main.cf - no luck.

@Berndinox
Copy link

Hade same Problem, causing the Issue was ONE_DIR=1
Solution: ONE_DIR=0

May give em a try

@mastix
Copy link
Author

mastix commented May 12, 2017

@Berndinox, thanks for the hint. Unfortunately, that did not help.

I also tried to telnet into my web server (just to test) and this works fine. It's only related to the ports that are exposed by the docker image. :(

Kind of stuck here...

@mastix
Copy link
Author

mastix commented May 12, 2017

Dovecot seems to work as Port 143 is accessible (Port 993 is not).

Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS LOGINDISABLED] Dovecot ready.

@mastix
Copy link
Author

mastix commented May 15, 2017

I played around with ipTables and Docker today... didn't fix anything. Same issue. Only port 143 is accessible from outside the host system. 993, 465 or 587 are not... although docker opened the ports for me. Now I'm totally stuck.

@tomav
Copy link
Contributor

tomav commented May 16, 2017

To be sure, use 2.2 image.
If you can telnet port 25 from the host or container itself, then you can have 3 types of issue:

  • firewall issue
  • fail2ban issue (check that you're not banned)
  • ISP re-routing / blocking configuration

@mastix
Copy link
Author

mastix commented May 16, 2017

Hi @tomav,

thanks for the hint, I will try image 2.2.

Btw: I've parallelly opened a ticket on StackOverflow: http://stackoverflow.com/questions/43993925/some-exposed-docker-ports-are-not-accessible-from-outside-dovecot-postfix

Firewall seems fine (Docker opens the ports correctly)
Fail2Ban has been disabled.
Connections to other services (Gmail) work fine from my local computer

I'll try everything! :)

@mastix
Copy link
Author

mastix commented May 18, 2017

I fixed it... or at least my hoster did. There was another hardware firewall blocking certain ports. They had to enable a certain "Mail server" firewall ruleset, which allows to run a mailserver.

Thanks for your help and hints!!!

@mastix mastix closed this as completed May 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants