Article 6GE9S SSMTP fails at endpoint if used in cron

SSMTP fails at endpoint if used in cron

by
glennbtn
from LinuxQuestions.org on (#6GE9S)
Hi

So this will sound a bit odd. I have ssmtp installed and use it for sending reports out Zimbra email box using smtp auth and it works bar on 3 debian 11 machine.

If I send via the command line ie
alerts@mydomain.co.uk < /tmp/log.txt

The message arrives no problem. If I run the bash script from the command line that does the backups etc and the calls as part of the batch file alerts@mydomain.co.uk < /tmp/log.txt

The message is delivered.

If I cron the job the email gets out to the server but the zimbra server seems to reject the message by trying to return the message to postmaster(can't see the message as does not accept incoming mail)

Zimbra message on command line
Sender address triggers FILTER smtp-amavis

Now this makes no sense to me how is can send from the command line and the bash script but not when it's called from a cron.

Anyone got any clues

Thanks
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments