diff --git a/config/action.d/helpers-common.conf b/config/action.d/helpers-common.conf index 03422a87..24e9fda9 100644 --- a/config/action.d/helpers-common.conf +++ b/config/action.d/helpers-common.conf @@ -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=""; grep %(_grep_logs_args)s $logpath | +# Wrap log lines to 900 chars to comply with SMTP line length limit (RFC 5321: max 998 chars) +_grep_logs = logpath=""; grep %(_grep_logs_args)s $logpath | fold -sw 900 | # options `-wF` used to match only whole words and fixed string (not as pattern) _grep_logs_args = -wF "" diff --git a/config/action.d/mail-whois-common.conf b/config/action.d/mail-whois-common.conf index ecf3a5d9..655c98a4 100644 --- a/config/action.d/mail-whois-common.conf +++ b/config/action.d/mail-whois-common.conf @@ -11,7 +11,8 @@ after = mail-whois-common.local [DEFAULT] #original character set of whois output will be sent to mail program -_whois = whois || echo "missing whois program" +# Wrap whois output to 900 chars to comply with SMTP line length limit (RFC 5321: max 998 chars) +_whois = whois | 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