This commit is contained in:
WhySoSerio 2026-05-11 19:09:01 +00:00 committed by GitHub
commit 229dd82ccd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -4,7 +4,8 @@
# _grep_logs_args = 'test'
# (printf %%b "Log-excerpt contains 'test':\n"; %(_grep_logs)s; printf %%b "Log-excerpt contains 'test':\n") | mail ...
#
_grep_logs = logpath="<logpath>"; grep <grepopts> %(_grep_logs_args)s $logpath | <greplimit>
# Wrap log lines to 900 chars to comply with SMTP line length limit (RFC 5321: max 998 chars)
_grep_logs = logpath="<logpath>"; grep <grepopts> %(_grep_logs_args)s $logpath | fold -sw 900 | <greplimit>
# options `-wF` used to match only whole words and fixed string (not as pattern)
_grep_logs_args = -wF "<ip>"

View file

@ -11,7 +11,8 @@ after = mail-whois-common.local
[DEFAULT]
#original character set of whois output will be sent to mail program
_whois = whois <ip> || echo "missing whois program"
# Wrap whois output to 900 chars to comply with SMTP line length limit (RFC 5321: max 998 chars)
_whois = whois <ip> | fold -sw 900 || echo "missing whois program"
# use heuristics to convert charset of whois output to a target
# character set before sending it to a mail program