From: Michael Orlitzky Date: Thu, 5 Aug 2021 22:34:38 +0000 (-0400) Subject: Makefile: whitespace cleanup and a few quality-of-life improvements. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=14251ce4082b9ea7af171f5df7f7c3f55379b3a7;p=postfix-logwatch.git Makefile: whitespace cleanup and a few quality-of-life improvements. --- diff --git a/Makefile b/Makefile index e0a3d2f..2d87025 100644 --- a/Makefile +++ b/Makefile @@ -26,26 +26,49 @@ install: @echo 'Run "make install-all" to install both' install-logwatch: - $(INSTALL) -d -m 0755 $(DESTDIR)$(scriptdir_logwatch) $(DESTDIR)$(confdir_logwatch) || exit 1; - $(INSTALL) -m 0644 $(program) $(DESTDIR)$(scriptdir_logwatch)/$(program_logwatch) || exit 1; - $(INSTALL) -m 0644 $(program).conf $(DESTDIR)$(confdir_logwatch)/$(program_logwatch).conf || exit 1; + $(INSTALL) -d -m 0755 \ + $(DESTDIR)$(scriptdir_logwatch) \ + $(DESTDIR)$(confdir_logwatch) + $(INSTALL) -m 0644 \ + $(program) \ + $(DESTDIR)$(scriptdir_logwatch)/$(program_logwatch) + $(INSTALL) -m 0644 \ + $(program).conf \ + $(DESTDIR)$(confdir_logwatch)/$(program_logwatch).conf # removes taint mode (-T) to run under logwatch - perl -e 'while (<>) { $$.==1 and s/\s+-T$$//; print "$$_";}' -i $(DESTDIR)$(scriptdir_logwatch)/$(program_logwatch) + perl -e 'while (<>) { $$.==1 and s/\s+-T$$//; print "$$_";}' \ + -i $(DESTDIR)$(scriptdir_logwatch)/$(program_logwatch) install-standalone: - $(INSTALL) -d -m 0755 $(DESTDIR)$(scriptdir_standalone) $(DESTDIR)$(confdir_standalone) || exit 1; - $(INSTALL) -m 0755 $(program) $(DESTDIR)$(scriptdir_standalone)/$(program) || exit 1; - $(INSTALL) -m 0644 $(program).conf $(DESTDIR)$(confdir_standalone)/$(program).conf || exit 1; - $(INSTALL) -m 0644 $(program).1 $(DESTDIR)$(mandir_standalone)/$(program).1 || exit 1; + $(INSTALL) -d -m 0755 \ + $(DESTDIR)$(scriptdir_standalone) \ + $(DESTDIR)$(confdir_standalone) \ + $(DESTDIR)$(mandir_standalone) + $(INSTALL) -m 0755 \ + $(program) \ + $(DESTDIR)$(scriptdir_standalone)/$(program) + $(INSTALL) -m 0644 \ + $(program).conf \ + $(DESTDIR)$(confdir_standalone)/$(program).conf + $(INSTALL) -m 0644 \ + $(program).1 \ + $(DESTDIR)$(mandir_standalone)/$(program).1 install-all: install-logwatch install-standalone uninstall-logwatch: - -rm $(DESTDIR)$(scriptdir_logwatch)/$(program_logwatch) $(DESTDIR)$(confdir_logwatch)/$(program_logwatch).conf + rm -f $(DESTDIR)$(scriptdir_logwatch)/$(program_logwatch) \ + $(DESTDIR)$(confdir_logwatch)/$(program_logwatch).conf + rm -rf $(DESTDIR)$(scriptdir_logwatch) \ + $(DESTDIR)$(confdir_logwatch) uninstall-standalone: - -rm $(DESTDIR)$(scriptdir_standalone)/$(program) $(DESTDIR)$(confdir_standalone)/$(program).conf \ - $(DESTDIR)$(mandir_standalone)/$(program).1 + rm -f $(DESTDIR)$(scriptdir_standalone)/$(program) \ + $(DESTDIR)$(confdir_standalone)/$(program).conf \ + $(DESTDIR)$(mandir_standalone)/$(program).1 + rm -rf $(DESTDIR)$(scriptdir_standalone) \ + $(DESTDIR)$(confdir_standalone) \ + $(DESTDIR)$(mandir_standalone) uninstall-all: uninstall-logwatch uninstall-standalone diff --git a/postfix-logwatch.conf b/postfix-logwatch.conf index 5b14639..9c709d7 100644 --- a/postfix-logwatch.conf +++ b/postfix-logwatch.conf @@ -1,258 +1,50 @@ -# -# postfix.conf / postfix-logwatch.conf -# -# This is the postfix-logwatch configuration file. - -# Lines in this file are of the format: -# -# VAR = VALUE -# *VAR = VALUE -# $VAR = VALUE -# -# Whitespace surrounding the = assignment character is removed. Variable names -# and values are case insensitive. Double quotes can be used to preserve case and -# whitespace. -# -# Variables beginning with a * are used only by logwatch. -# Variables beginning with a $ are used only by the postfix-logwatch filter. -# Variables beginning with neither * nor $ are used only by logwatch, with the -# exception of the Detail variable which is passed via environment to the -# postfix-logwatch filter. -# -# Any of the equivalent boolean values below may be used where appropriate: -# -# 1, Yes, True, On -# 0, No, False, Off -# -# Lines that begin with a # are comment lines. Blank and whitespace lines -# are ignored. Whitespace at the beginning and end of a line is ignored. -# - -# Specifies the title used in the logwatch report -# -Title = "Postfix" - -# Specifies the logwatch logfile group -# -LogFile = maillog - -# Specifies the global, maximum detail level -# -#Detail = 10 - -# The *OnlyService selector is used solely by logwatch to select log lines -# to pass to the postfix-logwatch filter. And postfix-logwatch uses the -# $postfix_Syslog_Name variable for log line selection. -# -# When used in logwatch, both the *OnlyService and $postfix_Syslog_Name -# variables below should contain essentially the same REs so that lines passed -# by logwatch are also selected by postfix-logwatch. Note that *OnlyService -# also includes the / (eg. postfix/smtpd). -# -# If you change postfix's syslog_name for any postfix service, you will need to -# replace "postfix" below with an appropriate RE to capture the desired log entries. -# Do likewise for *OnlyService above when used under logwatch. For example, the -# settings: -# -# *OnlyService = "postfix\d?/[-a-zA-Z\d]*" -# $postfix_Syslog_Name = "postfix\d?" -# -# will capture postfix/smtpd, postfix2/virtual, ..., postfix9/cleanup -# -# Note: If you use parenthesis in your regular expression, be sure they -# are cloistering and not capturing: use (?:pattern) instead of (pattern). -# -# Performance Note: -# If you do not wish to analyze any or all of postgrey, postfwd, or policyd-spf -# consider simplifying $postfix_Syslog_Name to increase log scanning performance. The -# more complex the RE, the longer the scan time to select/reject a log line. The -# difference in scan times between the simple string 'postfix' and the more complex -# alternation RE that includes postfix, postgrey, postfwd and policyd-spf is about 40%. -# -# Includes: postfix/smtpd, etc, postfix/policy-spf -#*OnlyService = "postfix/[-\w]*" -#$postfix_Syslog_Name = "postfix" -# Includes: postfix/smtpd, etc, postfix/policy-spf, postgrey, postfwd, policyd-spf -*OnlyService = "(?:post(?:fix|grey|fwd)|policyd-spf)(?:/[-\w]*)?" -$postfix_Syslog_Name = "(?:post(?:fix|grey|fwd)|policyd-spf)" - -# Ignored postfix services -# -# Ignores postfix services postfix/SERVICE, where SERVICE is an RE -# pattern. The example below will ignore log lines whose syslog -# name is "postfix/myservice". -#$postfix_Ignore_Service = "myservice" - -# Specifies the maximum report width for Detail <= 10, -# or when postfix_Line_Style is not set to Truncate -# -$postfix_Max_Report_Width = 100 - -# Specifies how to handle line lengths greater than Max_Report_Width. -# Options are Truncate (default), Wrap, or Full. -# for Detail <= 10 -# -$postfix_Line_Style = Truncate - -# Set the variable below to the value set for "recipient_delimiter" -# in your postfix configuration, if you want your recipient email -# addresses split into their user + extension. -# -#$postfix_Recipient_Delimiter = "+" - -# Width of IP addresses for columnar output. Change to 40 for IPv6 addresses -#$postfix_ipaddr_width = 40 -$postfix_ipaddr_width = 15 - -# Switch to use Postfix 2.8 long queue IDs: -# Postfix option: enable_long_queue_ids -$postfix_Enable_Long_Queue_Ids = No - -# Show delays percentiles report. For command line, use --[no]delays, -# without an argument. -# -$postfix_Show_Delays = Yes - -# Show names of detail section variables/command line options in -# detail report titles. For command line, use --[no]sect_vars, -# without an argument. -# -$postfix_Show_Sect_Vars = No - -# Show the postfix-reported hostname of 'unknown' in formatted -# ip/hostname pairs. For command line, use --[no]unknown, -# without an argument. -# -$postfix_Show_Unknown = Yes - -# Show the summary section. For command line, use --[no]summary, -# without an argument. -$postfix_Show_Summary = Yes - -# Specifies the percentiles shown in the delivery delays report -# Valid values are from 0 to 100, inclusive. -$postfix_Delays_Percentiles = "0 25 50 75 90 95 98 100" - -# Specifies the list of reject sections that will be output in -# reports (eg. 5xx permanent or 4xx temporary failures). -# Each entry in the comma or whitespace separated list consists of 3 -# characters, where the first is either 4 or 5, and second and third -# are a digit or a dot "." match-anything character. Also allowed is -# the keyword "Warn" (which is used for postfix "warn_if_reject" rejects). -# In PCRE (perl regular expression) terms, any pattern that matches: -# -# ^([45][0-9.][0-9.]|Warn)$ -# -# is acceptable. -# -# Typical reject codes: -# -# 421 Service not available, closing transmission channel -# 450 Requested mail action not taken: mailbox unavailable -# 451 Requested action aborted: local error in processing -# 452 Requested action not taken: insufficient system storage -# -# 500 Syntax error, command unrecognized -# 501 Syntax error in parameters or arguments -# 502 Command not implemented -# 503 Bad sequence of commands -# 504 Command parameter not implemented -# 550 Requested action not taken: mailbox unavailable -# 551 User not local; please try -# 552 Requested mail action aborted: exceeded storage allocation -# 553 Requested action not taken: mailbox name not allowed -# 554 Transaction failed -# -# Specific codes take priority over wildcard patterns. The default list -# is: "5.. 4.. Warn". -# -# See also the various Reject... level limiters below -# -$postfix_Reject_Reply_Patterns = "5.. 4.. Warn" - -# Level Limiters -# -# The variables below control the maximum output level for a given -# category. A level of 1 indicates only one level of detailed output in -# the Detailed report section. The Summary section is only available -# at logwatch --Detail level >= 5. Increasing the Detail level -# by one adds one level of additional detail in the Summary section. -# -# For example, Detail 5 would output one additional level of detail, -# Detail 6 two levels, etc. all the way up to 10. Finally, Detail -# 11 yields uncropped lines of output. -# -# You can control the maximum number of level 1 lines by appending -# a period and a number. The value 2.10 would indicate 2 levels -# of detail, but only 10 level-1 lines. For example, setting -# $postfix_Sent = 1.20 yields a top 20 list of Messages Sent. -# -# A more useful form of limiting uses triplets in the form l:n:t. -# This triplet specifies level l, top n, and minimum threshold t. -# Each of the values are integers, with l being the level limiter -# as described above, n being a top n limiter for the level l, and -# t being the threshold limiter for level l. When both n and t -# are specified, n has priority, allowing top n lists (regardless -# of threshold value). If the value of l is omitted, the speci- -# fied values for n and/or t are used for all levels available in -# the sub-section. This permits a simple form of wildcarding (eg. -# place minimum threshold limits on all levels). However, spe- -# cific limiters always override wildcard limiters. The first -# form of level limiter may be included in levelspec to restrict -# output, regardless of how many triplets are present. - -$postfix_Sent = 1 -$postfix_SentLmtp = 1 -$postfix_Delivered = 1 -$postfix_Forwarded = 1 -$postfix_ConnectionLostInbound = 1 -$postfix_TimeoutInbound = 1 -$postfix_ConnectToFailure = 2 - -# Disabled by default to reduce noise and consume less memory. -# Enable at will -$postfix_EnvelopeSenders = 0 -$postfix_EnvelopeSenderDomains = 0 -$postfix_ConnectionInbound = 0 -# Reject by IP report -$postfix_ByIpRejects = 0 - -$postfix_PanicError = 10 -$postfix_FatalError = 10 -$postfix_Error = 10 -# warnings -$postfix_Anvil = 3 -$postfix_AttrError = 10 -$postfix_CommunicationError = 10 -$postfix_DatabaseGeneration = 10 -$postfix_DNSError = 10 -$postfix_HeloError = 10 -$postfix_HostnameValidationError = 10 -$postfix_HostnameVerification = 10 -$postfix_IllegalAddrSyntax = 10 -$postfix_LdapError = 10 -$postfix_MailerLoop = 10 -$postfix_MapProblem = 10 -$postfix_MessageWriteError = 10 -$postfix_NumericHostname = 10 -$postfix_ProcessExit = 10 -$postfix_ProcessLimit = 10 -$postfix_QueueWriteError = 10 -$postfix_RBLError = 10 -$postfix_SaslAuthFail = 10 -$postfix_SmtpConversationError = 10 -$postfix_StartupError = 10 -$postfix_WarningsOther = 10 +$postfix_Enable_Long_Queue_Ids = Yes +$postfix_Sent = 1.10 +$postfix_SentLmtp = 1.10 +$postfix_Delivered = 1.10 +$postfix_Forwarded = 1.10 +$postfix_ConnectionLostInbound = 1.10 +$postfix_TimeoutInbound = 1.10 +$postfix_ConnectToFailure = 1.10 +$postfix_EnvelopeSenders = 1.10 +$postfix_EnvelopeSenderDomains = 1.10 +$postfix_ConnectionInbound = 1.10 +$postfix_ByIpRejects = 1.10 +$postfix_PanicError = 5.10 +$postfix_FatalError = 5.10 +$postfix_Error = 5.10 +$postfix_Anvil = 1.10 +$postfix_AttrError = 1.10 +$postfix_CommunicationError = 1.10 +$postfix_DatabaseGeneration = 1.10 +$postfix_DNSError = 1.10 +$postfix_HeloError = 1.10 +$postfix_HostnameValidationError = 1.10 +$postfix_HostnameVerification = 1.10 +$postfix_IllegalAddrSyntax = 1.10 +$postfix_LdapError = 1.10 +$postfix_MailerLoop = 5.10 +$postfix_MapProblem = 5.10 +$postfix_MessageWriteError = 5.10 +$postfix_NumericHostname = 1.10 +$postfix_ProcessExit = 5.10 +$postfix_ProcessLimit = 5.10 +$postfix_QueueWriteError = 5.10 +$postfix_RBLError = 5.10 +$postfix_SaslAuthFail = 2.10 +$postfix_SmtpConversationError = 1.10 +$postfix_StartupError = 5.10 +$postfix_WarningsOther = 5.10 # Common access control actions -$postfix_Bcced = 10 -$postfix_Discarded = 10 -$postfix_Filtered = 10 -$postfix_Hold = 10 -$postfix_Prepended = 10 -$postfix_Redirected = 10 -$postfix_Replaced = 10 -$postfix_Warned = 10 +$postfix_Bcced = 1.10 +$postfix_Discarded = 1.10 +$postfix_Filtered = 1.10 +$postfix_Hold = 1.10 +$postfix_Prepended = 1.10 +$postfix_Redirected = 1.10 +$postfix_Replaced = 1.10 +$postfix_Warned = 1.10 # DUNNO action not logged # IGNORE action not logged # REJECT actions are below @@ -262,28 +54,28 @@ $postfix_Warned = 10 # expanded into each reject variant, based on the reply patterns # listed in Reject_Reply_Patterns. By default, each item in the # list below becomes 4xxReject..., 5xxReject..., and WarnReject... -$postfix_RejectBody = 10 -$postfix_RejectClient = 10 -$postfix_RejectConfigError = 10 -$postfix_RejectContent = 10 -$postfix_RejectData = 10 -$postfix_RejectEtrn = 10 -$postfix_RejectHeader = 10 -$postfix_RejectHelo = 10 -$postfix_RejectInsufficientSpace = 10 -$postfix_RejectLookupFailure = 10 -$postfix_RejectMilter = 10 -$postfix_RejectProxy = 10 -$postfix_RejectRBL = 10 -$postfix_RejectRecip = 10 -$postfix_RejectRelay = 10 -$postfix_RejectSender = 10 -$postfix_RejectSize = 10 -$postfix_RejectUnknownClient = 10 -$postfix_RejectUnknownReverseClient = 10 -$postfix_RejectUnknownUser = 10 -$postfix_RejectUnverifiedClient = 3 -$postfix_RejectVerify = 10 +$postfix_RejectBody = 1.10 +$postfix_RejectClient = 1.10 +$postfix_RejectConfigError = 1.10 +$postfix_RejectContent = 1.10 +$postfix_RejectData = 1.10 +$postfix_RejectEtrn = 1.10 +$postfix_RejectHeader = 1.10 +$postfix_RejectHelo = 1.10 +$postfix_RejectInsufficientSpace = 1.10 +$postfix_RejectLookupFailure = 1.10 +$postfix_RejectMilter = 1.10 +$postfix_RejectProxy = 1.10 +$postfix_RejectRBL = 1.10 +$postfix_RejectRecip = 1.10 +$postfix_RejectRelay = 1.10 +$postfix_RejectSender = 1.10 +$postfix_RejectSize = 1.10 +$postfix_RejectUnknownClient = 1.10 +$postfix_RejectUnknownReverseClient = 1.10 +$postfix_RejectUnknownUser = 1.10 +$postfix_RejectUnverifiedClient = 1.10 +$postfix_RejectVerify = 1.10 # For more precise control, you can comment out any of the reject # types above and specify each variant manually, but the list must @@ -301,31 +93,29 @@ $postfix_RejectVerify = 10 # $postfix_WarnRejectHelo = 2 # -$postfix_Deferred = 10 -$postfix_Deferrals = 10 -$postfix_BounceLocal = 10 -$postfix_BounceRemote = 10 +$postfix_Deferred = 2.10 +$postfix_Deferrals = 2.10 +$postfix_BounceLocal = 2.10 +$postfix_BounceRemote = 2.10 -$postfix_Discarded = 10 -$postfix_ReturnedToSender = 10 -$postfix_NotificationSent = 10 -$postfix_ConnectionLostOutbound = 10 +$postfix_Discarded = 2.10 +$postfix_ReturnedToSender = 2.10 +$postfix_NotificationSent = 2.10 +$postfix_ConnectionLostOutbound = 2.10 -$postfix_Deliverable = 10 -$postfix_Undeliverable = 10 -$postfix_PixWorkaround = 10 -$postfix_SaslAuth = 10 -$postfix_TlsServerConnect = 10 -$postfix_TlsClientConnect = 10 -$postfix_TlsUnverified = 10 -$postfix_TlsOffered = 10 -$postfix_SMTPProtocolViolation = 10 +$postfix_Deliverable = 1.10 +$postfix_Undeliverable = 2.10 +$postfix_PixWorkaround = 2.10 +$postfix_SaslAuth = 1.10 +$postfix_TlsServerConnect = 1.10 +$postfix_TlsClientConnect = 1.10 +$postfix_TlsUnverified = 1.10 +$postfix_TlsOffered = 1.10 +$postfix_SMTPProtocolViolation = 2.10 $postfix_Postscreen = 1 $postfix_DNSBLog = 1 -$postfix_PolicySPF = 10 -$postfix_PolicydWeight = 10 -$postfix_Postgrey = 10 - -# vi: shiftwidth=3 tabstop=3 et +$postfix_PolicySPF = 2.10 +$postfix_PolicydWeight = 2.10 +$postfix_Postgrey = 2.10