I'm using Fedora Core 3, and I'm modifying the LogWatch script below:
open(OUTFILE,"|$Config{'mailer'} $Config{'mailto'}") or die "Can't execute /bin/mail\n";
print OUTFILE "From: LogWatcher\n";
to something like:
open(OUTFILE,"|$Config{'mailer'} $Config{'mailto'}") or die "Can't execute /bin/mail\n";
print OUTFILE "From: LogWatcher <operator@domain.com>\n";
What I'm trying to do is to receive an e-mail where the sender is shown only as "LogWatcher", instead of "LogWatcher@domain.com". And when you double click "LogWatcher", the e-mail
operator@domain.com shows up.
The problem is that I'm not a perl developer, and my modification is clearly incorrect. It returns the error:
Possible unintended interpolation of @domain in string at /etc/cron.daily/00-logwatch line 681
Does anyone know how to do it?
Thanks.