Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POSTFIX_WARNING_* patterns match POSTFIX_QUEUEID in the wrong position #182

Closed
wolfgangkarall opened this issue Jan 9, 2024 · 3 comments

Comments

@wolfgangkarall
Copy link
Contributor

They have the optional (%{POSTFIX_QUEUEID:postfix_queueid}: )? before the mandatory %{POSTFIX_WARNING_LEVEL:postfix_message_level}:, but in reality postfix logs e.g.

warning: 4T8Zh133D8zGpCM: recipient_canonical_maps map lookup problem for ...

The severity level always comes first with the msg_warn() and similar functions.

Sorry for not being able to submit a pull request at the moment.

@whyscream
Copy link
Owner

@wolfgangkarall Thanks for reporting.

Full example after messing with my own config:

Jan 10 11:19:39 hostname postfix/cleanup[777199]: warning: hash:/etc/postfix/sender_canonical_maps is unavailable. open database /etc/postfix/sender_canonical_maps: No such file or directory
Jan 10 11:19:39 hostname postfix/cleanup[777199]: warning: hash:/etc/postfix/sender_canonical_maps lookup error for "sender@example.com"
Jan 10 11:19:39 hostname postfix/cleanup[777199]: warning: 9BECF3F19D: sender_canonical_maps map lookup problem for sender@example.com -- message not accepted, try again later

@whyscream
Copy link
Owner

whyscream commented Jan 15, 2024

Both versions exist, queue-id before and after the warning level. My hunch is that this difference is between 'system' warnings that signal some runtime issue, and user-configurable warnings (f.i. by using the header_checks WARN action), but I didn't look into it too deeply.

Resolved in #183. Thanks for reporting!

@wolfgangkarall
Copy link
Contributor Author

Yeah, true, I haven't noticed that since I have all of the header_checks-related patterns (where the 'warning' is just one of the POSTFIX_ACTION) set up differently in my local patterns.

Thanks for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants