mirror of
https://github.com/darold/sendmailanalyzer.git
synced 2026-05-15 22:02:32 -06:00
Add NO_HOST_DOMAIN configuration directive. When activated, remove domain part
of the syslog hostname. Some programme use FQDN instead of the single hostname. Set it to 1 if you have two report for the same hostname but one with the domain part.
This commit is contained in:
parent
e43a96c25d
commit
bb2a958d03
2 changed files with 10 additions and 0 deletions
|
|
@ -312,6 +312,12 @@ EXCLUDE_RELAY addr1\@domain1.com|addr2\@domain2.com
|
|||
# When enabled it allow email subjects to be shown in detailed view. Of course
|
||||
# The log file must contain this information.
|
||||
SHOW_SUBJECT 0
|
||||
|
||||
# When activated, remove domain part of the syslog hostname. Some programme
|
||||
# use FQDN instead of the single hostname. Set it to 1 if you have two report
|
||||
# for the same hostname but one with the domain part.
|
||||
NO_HOST_DOMAIN 0
|
||||
|
||||
};
|
||||
close(OUTCFG);
|
||||
|
||||
|
|
|
|||
|
|
@ -459,6 +459,10 @@ sub parse_common_fields
|
|||
# Get current system time
|
||||
my $ctime = &format_time(localtime(time));
|
||||
|
||||
# Remove domain part of the host
|
||||
if ($CONFIG{NO_HOST_DOMAIN}) {
|
||||
$host =~ s/\..*//;
|
||||
}
|
||||
my $date = '';
|
||||
if ($month =~ /(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)/) {
|
||||
$date = "$1$2$3";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue