diff --git a/mail-status.sh b/mail-status.sh index 202a733..93e1a63 100644 --- a/mail-status.sh +++ b/mail-status.sh @@ -208,11 +208,19 @@ BEGIN { if (match($0, /[0-9](\.[0-9])+ [^;]+/)) s_reason = substr($0, RSTART, RLENGTH); else if (match($0, /[0-9]{3} [^;]+/)) s_reason = substr($0, RSTART, RLENGTH); + # --- NOVÁ LOGIKA PRE GREYLIST --- + s_stat = "REJECT"; scol = red; + if (index($0, "Greylisted") > 0) { + s_stat = "GREYLIST"; + scol = yellow; + } + # -------------------------------- + if (d_mode == 0 && length(s_reason) > 30) s_reason = substr(s_reason, 1, 27) ".."; if ((f_filt == "" || index(f, f_filt) > 0) && (t_filt == "" || index(t, t_filt) > 0) && (i_filt == "" || i_filt == "NOQUEUE" || index("NOQUEUE", i_filt) > 0)) { printf "%s%-16s %s%-12s%s %s%-16s%s %-36s %-31s %s%-12s%s %s[%s]%s\n", - reset, full_time, red, "NOQUEUE", reset, gray, n_ip, reset, shorten(f, 35), shorten(t, 30), red, "REJECT", reset, yellow, s_reason, reset; + reset, full_time, red, "NOQUEUE", reset, gray, n_ip, reset, shorten(f, 35), shorten(t, 30), scol, s_stat, reset, yellow, s_reason, reset; } } }' > "$TMP_DATA"