Closed SystemParadox closed 2 years ago
Hi
It seems there is no direct way for cron to leverage docker-postfix
container from the host. You need some mediator to pass messages. I usually use ssmtp
for this purpose. It seems to provide what you are looking for:
# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
#FromLineOverride=YES
Firstly thanks for this, I found your image super helpful in moving to a dockerised postfix.
I was wondering if you had any ideas for how to get cron on the host machine to use this? I've got ports 25 and 587 mapped to the host, but cron seems to want a
sendmail
command, which is normally provided by postfix. It seems crazy and potentially very confusing to install postfix on the host machine just to get sendmail, and it's going to conflict with the mapped ports.I tried minimalist options like msmtp but then I end up with bare or invalid from headers like
From: root
orFrom: root (Cron Daemon)
and the mail gets rejected.Do you have any suggestions for how to set this up sanely?