Closed eoehen closed 3 years ago
@pfeigl My tests dosn't send any emails. Do you have an idea why?
I also had some problems. What you can do is the following:
logfile /var/log/msmtp.log
) or install rsyslog, start the service and set syslog on
in msmtp config.Btw, you can use this to also get mail stdout and stderr into the cronlog
echo "$cronSchedule . /container_env.sh; /usr/local/bin/backup.sh 2>&1 | tee -a /var/log/cron.log | mail -s 'SQL Server Backup Result' $MAIL_TO 2>&1 | tee -a /var/log/cron.log"
The -a
(append) is important, I missed them in my initial version - this would truncate the cron.log over and over again.
The
-a
(append) is important, I missed them in my initial version - this would truncate the cron.log over and over again.
Thank you for your input, it was helpful to find the problem. But I am not sure if we should use the append parameter (-a). I think in this case we should have the control about the growing of the logfile.
I create a new Issue for this #39
@pfeigl My tests dosn't send any emails. Do you have an idea why?
Now I could test it with PaperCut Without TLS and AUTH.
Great. I tried with mailtrap and office365 servers and both worked great (also with tls and auth).
Extracted from PR #25 by @pfeigl