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

Fix the subject handling. Issue submitted by Michael Starks #1370 #1377

Merged
merged 1 commit into from
Mar 15, 2018

Conversation

ddpbsd
Copy link
Member

@ddpbsd ddpbsd commented Mar 11, 2018

If CLEANFULL is enabled during the build, and maild.full_subject=0
the email subjects should be smaller. At some point the logic may
have been reversed (or the documentation and memories of users are
backwards).

Either way, allow this to work the way it's understood to work.

I'm not sure if the default in internal_options.conf should change to 1. I think this would restore the default behavior people may be expecting, but I'm not sure how much it matters.

If CLEANFULL is enabled during the build, and maild.full_subject=0
the email subjects should be smaller. At some point the logic may
have been reversed (or the documentation and memories of users are
backwards).
Either way, allow this to work the way it's understood to work.
@ddpbsd ddpbsd mentioned this pull request Mar 11, 2018
@atomicturtle atomicturtle merged commit a736665 into ossec:master Mar 15, 2018
@@ -135,7 +135,7 @@ MailMsg *OS_RecvMailQ(file_queue *fileq, struct tm *p,
}

/* We have two subject options - full and normal */
if (Mail->subject_full) {
if (Mail->subject_full == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to not match the documentation of internal_options.conf

# Maild full subject (0=disabled, 1=enabled)                                                                                                                                                                                                                                      
maild.full_subject=0

Am I missing something ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate?

Copy link
Contributor

@calve calve Sep 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just packaged OSSEC 3.0.0 and upgraded my monitor;

  • on 2.9.3, maild.full_subject=1 is honored and I receive OSSEC Alerts ... (full) mails.
  • on 3.0.0, maild.full_subject=1 is not honored and I receive OSSEC Notifications ... mails.
  • on 3.0.0, maild.full_subject=0 is somewhat honored and I receive OSSEC Alerts ... (full) mails.

By the documentation, I did not expected the two last behaviour, but rather the contrary

I suspect this line should be Mail->subject_full == 1?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the behavior expected in the original issue didn't work if Mail->subject_full == 1, I'm guessing the answer is no. I think we should just remove this nonsense and not ever have to worry about it again.

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

Successfully merging this pull request may close these issues.

None yet

3 participants