[Exim] Command line mails

Top Page
Delete this message
Reply to this message
Author: Simon Chappell
Date:  
To: Exim
Subject: [Exim] Command line mails
Hi All,


I have a command line reporting program(Well scripts really)
every five minutes they send me an email if some parameters are hit.

part of the script that send the email is this
if ((@lines) and $Levels{$level} >= $Levels{$MailThreshold}) {
open (MAIL, "| mail -s '[$level] $hostname: $subject' '$Email'");
foreach (@lines) {
print MAIL $_;
}
close(MAIL);

the line in question I beleive is this one
open (MAIL, "| mail -s '[$level] $hostname: $subject' '$Email'");

I get this
exim abandoned: unknown, malformed, or incomplete option -s

if I replace with this line
open (MAIL, "| mail -F 'Warning' $Email");

I sends the mail with the body but I have no subject line. Is there a
command that I can insert the subject line into the mail.

Been googlin with this for months so I am out of ideas. I even bought
the book( which was great for setting up spamassasin and clam now the
mail server seems bulletproof) but even that has not helped with this
problem.

Any help greatly received

Simon