fail2ban emails

Discussion in 'HOWTO-Related Questions' started by jasper, Jul 29, 2007.

  1. jasper

    jasper New Member HowtoForge Supporter

    I have followed the howto of fail2ban and I want to recieve emails about the banned ip's. I 'm just not recieving these mails.
    fail2ban.log says:

    The jail <name> has been started successfuly.\n
    Regards,\n
    Fail2Ban"|mail -s "[Fail2Ban] <name>: started" <dest>
    2007-07-29 02:31:35,246 fail2ban.actions.action: INFO Set actionUnban =
    2007-07-29 02:31:35,250 fail2ban.actions.action: INFO Set actionCheck =
    2007-07-29 02:31:35,434 fail2ban.actions.action: ERROR echo -en "Hi,\n
    The jail postfix has been started successfuly.\n
    Regards,\n
    Fail2Ban"|mail -s "[Fail2Ban] postfix: started" admin@net.nl returned 7f00
    2007-07-29 02:31:35,624 fail2ban.actions.action: ERROR echo -en "Hi,\n
    The jail courierpop3 has been started successfuly.\n
    Regards,\n
    Fail2Ban"|mail -s "[Fail2Ban] courierpop3: started" admin@net.nl returned 7f00
    2007-07-29 02:31:35,702 fail2ban.actions.action: ERROR echo -en "Hi,\n
    The jail proftpd has been started successfuly.\n
    Regards,\n
    Fail2Ban"|mail -s "[Fail2Ban] proftpd: started" admin@net.nl returned 7f00
    2007-07-29 02:31:35,902 fail2ban.actions.action: ERROR echo -en "Hi,\n
    The jail courierimap has been started successfuly.\n
    Regards,\n
    Fail2Ban"|mail -s "[Fail2Ban] courierimap: started" admin@net.nl returned 7f00
    2007-07-29 02:31:35,913 fail2ban.actions.action: ERROR echo -en "Hi,\n
    The jail ssh has been started successfuly.\n
    Regards,\n
    Fail2Ban"|mail -s "[Fail2Ban] ssh: started" admin@net.nl returned 7f00
    2007-07-29 02:31:36,114 fail2ban.actions.action: ERROR echo -en "Hi,\n
    The jail apache has been started successfuly.\n
    Regards,\n
    Fail2Ban"|mail -s "[Fail2Ban] apache: started" admin@net.nl returned 7f00
    2007-07-29 02:31:36,161 fail2ban.actions.action: ERROR echo -en "Hi,\n
    The jail sasl has been started successfuly.\n
    Regards,\n
    Fail2Ban"|mail -s "[Fail2Ban] sasl: started" admin@net.nl returned 7f00


    Can somebody help me please?

    Thanks in advance and best regards,

    Jasper
     
  2. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Any errors in your mail log?
     
  3. jasper

    jasper New Member HowtoForge Supporter

    no errors in mail log

    And I can send mail from the server to admin@net.nl if I use:

    sendmail admin@net.nl <test

    I have postfix installed.
     
  4. jasper

    jasper New Member HowtoForge Supporter

    I found the problem.

    I don't have a mail command just a sendmail command because of install postfix.

    After installing mailx everything works fine.

    Thanks and regards,

    Jasper
     
  5. steffersonj

    steffersonj New Member

    Uff, being trying to fix this for hours. That was easy, many thanks for the information.

    Regards,
     

Share This Page