I configured exim4 using dpkg-reconfigure exim4-config. I can execute mail -s 'Test Message' adress@domain.com by different users.
I need sendmail to accept Emails from docker containers, which is not working. Namely I am trying to configure keycloak to send emails from host. By exim4-config my update-exim4.conf.conf is this:
dc_eximconfig_configtype='internet'
dc_other_hostnames='mydomain.de'
dc_local_interfaces='127.0.0.1 ; ::1'
dc_readhost=''
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets='172.17.0.1/16'
dc_smarthost=''
CFILEMODE='644'
dc_use_split_config='false'
dc_hide_mailname=''
dc_mailname_in_oh='true'
dc_localdelivery='mail_spool'
How can I manage to send emails from docker containers?
I configured relay-nets for the docker network 172.17.0.1/16 and created a user "keycloak". The user can send mails, but in keycloak this message is shown when I click "Test connection": Error! Logged in user does not have an e-mail.
I set the host 172.17.0.1 which should be the docker host. I tried with and without authentication.