I think it is better to provide the changes in 'lib/CorrectASSPcfg.pm'
Create a sub in this module eg. 'sub mytosyslog' copying the code from
assp.pl.
Make all required changes there. Don't forget to change global ASSP calls
and variables like for example:
$syslogNextTry to $main::syslogNextTry
$CanUseSyslog to $main::CanUseSyslog
closelog() to &main::closelog()
In 'sub set' of this module change the namespace reference for
*main::tosyslog like
*{'main::tosyslog'} = \&mytosyslog;
>I want to ask you to add this to assp if you can and you want.
No - the code is too specific. If - it needs to be generic and
configurable.
Thomas
Von: "Adrian Stoica" <[email protected]>
An: <[email protected]>
Datum: 13.12.2016 15:59
Betreff: [Assp-user] assp request
Hello
I’m using assp syslog , and I have some requirements : to log the
message-id , for corelate with other process.
I use a modified version of assp that ( I hope) is doing this , plus
changing the priority for some of messages.
I want to ask you to add this to assp if you can and you want.
Thank you.
Following is my old patch :
--- assp.pl
+++ assp_old.pl
@@ -16869,6 +16869,7 @@
my $p = $priority;
$p = 'warning' if $msg =~ /^\[[^\]+]\] warning:/oi;
$p = 'error' if $msg =~ /^\[[^\]+]\] error:/oi;
+ $p = 'warning' if $msg =~ /\[(VIRUS|spam
found|unsupported_AUTH_encryption_required|DenyStrict|SMTP Error)\]/ig;
#adrian
my $ok;
eval{$ok = $SysLogObj->send($msg,Priority => $p);};
if (! $ok || $@) {
@@ -16890,6 +16891,7 @@
my $p = $priority;
$p = 'warning' if $msg =~ /^\[[^\]+]\] warning:/oi;
$p = 'error' if $msg =~ /^\[[^\]+]\] error:/oi;
+ $p = 'warning' if $msg =~ /\[(VIRUS|spam
found|unsupported_AUTH_encryption_required|DenyStrict|SMTP Error)\]/ig;
#adrian
syslog($p, $msg);
}
closelog();
@@ -25613,6 +25615,7 @@
$this->{msgid} = decodeMimeWords2UTF8($1);
$this->{msgid}=~s/[\s>]+$//o;
$this->{msgid}=~s/^[\s<]+//o;
+ mlog( $fh, "[Message-ID]
$this->{msgid}" ); #adrian
}
if (! &MsgIDOK($fh)) {
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Assp-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/assp-user
DISCLAIMER:
*******************************************************
This email and any files transmitted with it may be confidential, legally
privileged and protected in law and are intended solely for the use of the
individual to whom it is addressed.
This email was multiple times scanned for viruses. There should be no
known virus in this email!
*******************************************************
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Assp-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/assp-user