2

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 <admin@knowledgelinux.com>"}{printf("%s\015\n", $0)}' $message file-name=/test.txt | sendmail -t "mail@knowledgelinux.com"

awk: command not found

Ed Morton
  • 188,023
  • 17
  • 78
  • 185
Vikas Kushwaha
  • 21
  • 1
  • 1
  • 2
  • Error message seems self-explanatory: you have no `awk` program installed, or it cannot be found via `PATH`. – Tsyvarev Sep 28 '15 at 11:02
  • This has absolutely nothing to do with awk. You could replace `awk` with `flubber` and have the same problem. So, I'm removing the awk tag. – Ed Morton Sep 28 '15 at 20:03

2 Answers2

1

The instructions here worked for me:

vim /etc/logwatch/conf/logwatch.conf

Relevant lines to be replaced:

Output = mail
MailTo = root_all@your.domain
MailFrom = Logwatch@your.domain
mailer = "/opt/zimbra/common/sbin/sendmail -t"

Zimbra uses a modified version of sendmail.

PeptideChain
  • 543
  • 3
  • 16
0

The Zimbra MTA uses a modified postfix daemon. You should be able to just use the command mail:

cat *messagefilename* |mail -r *fromaddress* -s *Subject* *recipient-list*

As long as the Zimbra MTA is running on the machine in question this should work.

approxiblue
  • 6,982
  • 16
  • 51
  • 59
Jon Drury
  • 1
  • 1