[Mimedefang] md_syslog and RedHat9
Douglas Willis
ddw at bas.ac.uk
Wed Jun 4 08:04:00 EDT 2003
On Wed, 2003-06-04 at 07:45, Oliver Schulze L. wrote:
> Hi,
> I'm having problems using this function in mimedefang-filter:
> md_syslog("mail", "test message");
>
> The problem I got is that mimedefang print all the messages to the console
> using the wall command(prints in all open shell sessions)
>
> If I use the:
> md_syslog("info", "test message");
> the funtion works and print in /var/log/messages
>
> If I use this command:
> # logger -p mail.info test
> it also works ok by printing in /var/log/maillog
>
> I use this code to debug:
> my $num_faccc = convert_log_facility_to_number("mail");
> md_syslog("info", "test_fac: $num_faccc");
> and it prints:
> test_fac: 16
In your filter there is a setting that directs the md_syslog command to
a specified facility in the syslog. The md_syslog command then adds the
level.
Valid levels are :-
alert, crit, debug, emerg, err, error (deprecated synonym for err),
info, notice, panic (deprecated synonym for emerg),warning, warn
(deprecated synonym for warning).
So for example setting md_log_enable('mail') and calling
md_syslog('info','test') would in turn create an entry directed at the
mail facility with level info and message test.
Redhat by default set the mail.* entry in /etc/syslog.conf to
/var/log/maillog so all mail facility messages should end up there.
cut from mimedefang-filter
--------------------------------------------------
# md_log_enable();
# You may optionally provide a syslogging facility by passing an
# argument such as: md_log_enable('local4'); If you do this, be
# sure to setup the new syslog facility (probably in /etc/syslog.conf).
# Comment this line out to disable logging.
#**********************************************************************
md_log_enable('local4');
---------------------------------------------------
--
Douglas Willis <ddw at bas.ac.uk>
More information about the MIMEDefang
mailing list