On Tue, Oct 08, 2024 at 02:03:23PM +0200, Ralf Hildebrandt via Postfix-users wrote:
> Just a minor issue: When a access(5) maps is causing a mail to be > held, I don't see any log line indicating this. > > Yes, the mail is on hold, but when I want to check WHY the mail was > put on hold. The first access(5) action that triggers "HOLD" is always logged. Some logging subsystems may deliberately drop messages, or otherwise be deficient, but Postfix sends the message. $ git grep -A6 '"HOLD"' -- src | cat -tv | perl -lne ' ($f,$l) = split(/(?<=...)[:-]/,$_,2); $l=~s/\^I/\t/g; $f=~s/([^-])$/$1:/; printf "%-32s%s\n", $f, $l ' | expand src/cleanup/cleanup_message.c: if (STREQUAL(value, "HOLD", command_len)) { src/cleanup/cleanup_message.c: if ((state->flags & (CLEANUP_FLAG_HOLD | CLEANUP_FLAG_DISCARD)) == 0) { -> src/cleanup/cleanup_message.c: cleanup_act_log(state, "hold", context, buf, optional_text); src/cleanup/cleanup_message.c: state->flags |= CLEANUP_FLAG_HOLD; src/cleanup/cleanup_message.c: } src/cleanup/cleanup_message.c: return (buf); src/cleanup/cleanup_message.c: } -- src/cleanup/cleanup_milter.c: if (STREQUAL(command, "HOLD", cmd_len)) { src/cleanup/cleanup_milter.c: if ((state->flags & (CLEANUP_FLAG_HOLD | CLEANUP_FLAG_DISCARD)) == 0) { -> src/cleanup/cleanup_milter.c: cleanup_milter_hbc_log(context, "hold", where, buf, optional_text); src/cleanup/cleanup_milter.c: state->flags |= CLEANUP_FLAG_HOLD; src/cleanup/cleanup_milter.c: } src/cleanup/cleanup_milter.c: return ((char *) buf); src/cleanup/cleanup_milter.c: } -- src/smtpd/smtpd_check.c: if (STREQUAL(value, "HOLD", cmd_len)) { src/smtpd/smtpd_check.c: #ifndef TEST src/smtpd/smtpd_check.c: if (can_delegate_action(state, table, "HOLD", reply_class) == 0 src/smtpd/smtpd_check.c: || (state->saved_flags & CLEANUP_FLAG_HOLD)) src/smtpd/smtpd_check.c: return (SMTPD_CHECK_DUNNO); src/smtpd/smtpd_check.c: #endif src/smtpd/smtpd_check.c: vstring_sprintf(error_text, "<%s>: %s %s", reply_name, reply_class, src/smtpd/smtpd_check.c: *cmd_text ? cmd_text : "triggers HOLD action"); -> src/smtpd/smtpd_check.c: log_whatsup(state, "hold", STR(error_text)); -- Viktor. _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org