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

Set started/stopped mails sender and address #42

Open
mathieumd opened this issue May 9, 2017 · 1 comment
Open

Set started/stopped mails sender and address #42

mathieumd opened this issue May 9, 2017 · 1 comment

Comments

@mathieumd
Copy link

AFAIK, the specs of mails sent by Fail2ban when it starts are handled by action.d/{sendmail,mail}-common.conf (which one is used depends on mta value in jail.local).

So in order to configure this, this role could simply add a task like this:

  - name: set email sender address
    ini_file:
      dest: "/etc/fail2ban/action.d/{{fail2ban_mta}}-common.local"
      section: Init
      option: "{{item.k}}"
      value: "{{item.v}}"
    with_items:
      - { k: "dest", v: "{{fail2ban_destemail}}" }
      - { k: "sender", v: "{{fail2ban_sender}}" }
      - { k: "sendername", v: "{{fail2ban_sendername}}" }
    notify: restart fail2ban
@vmpr
Copy link

vmpr commented Oct 11, 2024

I would like that! at least until the underlying problem in Fail2ban is fixed?

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

No branches or pull requests

3 participants