Dovecot docker auto-responder - delegate to external SMTP
Hi all,
I have dockerized my dovecot setup. Everything works fine besides auto-responder using sieve.
Issue is that the my dovecot docker image does NOT come with a SMTP which could be used for outgoing mail.
My SMTP setup (postfix) is in another image/container.
I want to keep it that way, so that dovecot and postfix have separate images.
So basically I have 2 containers running in the same internal network: a) dovecot IP 192.168.10.11 b) postfix IP 192.168.10.22
How do I have to configure dovecot so that it delegates all outgoing (autoresponder) mails to the SMTP on IP 192.168.10.22.
The postfix image is configured in a way that certain IPs are allowed to send mails without authentication. So on postfix side I am set.
Currently I did a quickfix: I added postfix to dovecot image and configured postfix to use the relayhost 192.168.10.22 for mailing. This works, still I would prefer having the dovecot image not containing an postfix SMTP.
Thanks
Tom
Hi Thomas,
Did you try to use submission_host configuration parameter in your Dovecot container ?
Source : https://doc.dovecot.org/configuration_manual/sieve/sieve_and_smtp_submission...
Regards.
Fabien
Le 19/10/2020 à 12:28, Thomas Pronold a écrit :
Hi all,
I have dockerized my dovecot setup. Everything works fine besides auto-responder using sieve.
Issue is that the my dovecot docker image does NOT come with a SMTP which could be used for outgoing mail.
My SMTP setup (postfix) is in another image/container.
I want to keep it that way, so that dovecot and postfix have separate images.
So basically I have 2 containers running in the same internal network: a) dovecot IP 192.168.10.11 b) postfix IP 192.168.10.22
How do I have to configure dovecot so that it delegates all outgoing (autoresponder) mails to the SMTP on IP 192.168.10.22.
The postfix image is configured in a way that certain IPs are allowed to send mails without authentication. So on postfix side I am set.
Currently I did a quickfix: I added postfix to dovecot image and configured postfix to use the relayhost 192.168.10.22 for mailing. This works, still I would prefer having the dovecot image not containing an postfix SMTP.
Thanks
Tom
On 19 Oct 2020, at 04:28, Thomas Pronold mail@tomgrill.de wrote:
The postfix image is configured in a way that certain IPs are allowed to send mails without authentication. So on postfix side I am set.
This is a *terrible* idea. ALL submissions outside of localhost (of the mail server) to localdomains should be authenticated, you should never whitelist your Eps as that just opens you put to abuse.
Yes, my system cron messages from all the non mail servers go to my mail server over secure submission.
-- I want to die in my sleep like my grandfather did, not screaming in terror like his passengers.
On Mon, Oct 19, 2020 at 12:28:37PM +0200, Thomas Pronold wrote:
I have dockerized my dovecot setup. Everything works fine besides auto-responder using sieve.
Issue is that the my dovecot docker image does NOT come with a SMTP which could be used for outgoing mail.
My SMTP setup (postfix) is in another image/container.
I want to keep it that way, so that dovecot and postfix have separate images.
I use msmtp for that, and install it as sendmail in the container. It is rather simple SMTP client but quite configurable, and you can configure TLS and authentication for better security.
-- Piotr "Malgond" Auksztulewicz firstname@lastname.net
participants (4)
-
@lbutlr
-
Fabien KOCIK
-
Piotr Auksztulewicz
-
Thomas Pronold