How to send mail from zimbra command line

Vikas Kushwaha picture Vikas Kushwaha · Sep 28, 2015 · Viewed 8.8k times · Source

I am vikas. i am looking a command that can send mail from zimbra mail-store server to external world. but as i checked in zimbra not getting Any program that have role of sending mails. that is why i am relay email through Zimbra MTA server. now i am going to use below command but still getting variable error.

awk 'BEGIN{print "Subject:test mail!\nFrom:Mailadmin <[email protected]>"}{printf("%s\015\n", $0)}' $message file-name=/test.txt | sendmail -t "[email protected]"

awk: command not found

Answer

PeptideChain picture PeptideChain · Sep 13, 2017

The instructions here worked for me:

vim /etc/logwatch/conf/logwatch.conf

Relevant lines to be replaced:

Output = mail
MailTo = [email protected]
MailFrom = [email protected]
mailer = "/opt/zimbra/common/sbin/sendmail -t"

Zimbra uses a modified version of sendmail.