-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
Support overriding service notifications (#143) #144
Conversation
templates/common/sendmail.conf.epp
Outdated
| [Init] | ||
| <% $config.keys.each |$key| { -%> | ||
| <%= $key %> = <%= $fail2ban::sendmail_config[$key] %> | ||
| <% } -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please fix the missing \n at the end of the file
templates/common/sendmail.conf.epp
Outdated
| @@ -0,0 +1,11 @@ | |||
| # Override the Fail2Ban defaults in sendmail-common.conf with these entries | |||
| <% include stdlib %> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is that include required for anything? I think we can omit it.
|
Hi @deric, thanks for the work! I made a tiny inline comment. Please have a look. |
|
@bastelfreak Sure thing, all objections should be fixed. |
|
Unfortunately these changes aren't enough to disable notifications. Notifications are defined in multiple files. $ fail2ban-client get sshd action sendmail-buffered actionstart
printf %b "Subject: [Fail2Ban] <name>: started on `uname -n`
From: <sendername> <<sender>>
To: <dest>\n
Hi,\n
The jail <name> has been started successfully.\n
Output will be buffered until <lines> lines are available.\n
Regards,\n
Fail2Ban" | /usr/sbin/sendmail -f <sender> <dest>I'll try to include integration tests in order to ensure that this really works as expected. |
|
thanks for the PR! |
Pull Request (PR) description
Support e-mail notification configuration directly from Puppet/Hiera.
This Pull Request (PR) fixes the following issues
Fixes #143