BanDaemon 'No email template found'

Discussion in 'Plugins/Modules/Addons' started by paka, Nov 7, 2018.

  1. paka

    paka Member

    Was exploring the possibility of reporting some of the more determined IPs using BanDaemon's email reporting via command line. However received an error stating the email template not found. I noted templates are in the tpl directory.

    Here's the command and error message:
    Code:
    /opt/ispprotect_bandaemon# /opt/ispprotect_bandaemon/ispp_bandaemon --abuse evidence/20181107052949-193_169_252_112.txt
    
    No email template file found.
    
    Is the --abuse flag currently functional? If so, what template name and directory is banDaemon looking for?
     
  2. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Hello paka,
    please take a look inside the "tpl" directory. It should contain templates for the abuse emails like abuse_email_en.tpl.
    The content is similar to:
    Code:
    Subject: Abuse report for IP address {IP}
    Dear abuse team,
    
    we recognized malicious activities on our server, that are caused by
    ip address {IP} which is under your control, regarding whois information.
    
    Please inform your customer and/or initiate counter-measures to stop
    these acitivities.
    
    Following we provide you with some log excerpts of these activities:
    --------------------------------------
    {LOGS}
    --------------------------------------
    
    Kind regards
     Server Monitoring Teamc
     
  3. paka

    paka Member

    I did notice the templates in ./tpl however bandaemon can't seem to locate them.
    Code:
    @mail:/opt/ispprotect_bandaemon/tpl# ls -la
    total 20
    drw-r-----  2 root root 4096 Nov  7 09:43 .
    drw-r----- 11 root root 4096 Nov  7 09:56 ..
    -rw-r-----  1 root root  531 Nov  3 23:36 abuse_email_de.tpl
    -rw-r-----  1 root root  484 Nov  3 23:36 abuse_email_en.tpl
    -rw-r-----  1 root root  484 Nov  7 09:43 abuse_email.tpl
    I'd also tried copying on of the language templates to just abuse_email.tpl in the hope that might help.
    How best should I proceed with troubleshooting?
     
  4. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Ah. I have an idea what the reason could be. Which php version do you use? If it is "7.0" please try copying the tpl folder to v56 folder.
     
    paka likes this.
  5. paka

    paka Member

    Haven't upgraded to 7.0 yet. Server is running:
    Code:
    PHP 5.6.38-0+deb8u1 (cli) (built: Sep 20 2018 02:32:02)
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
        with Zend OPcache v7.0.6-dev,
     
  6. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    5.6 uses the same path.
     
  7. paka

    paka Member

    Cheers Croydon. That did the trick. I'm surprised I missed that. Thought I'd searched through the all the docs.
     
  8. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    It's not your fault. We changed the Ban Daemon starter lately due to compatibility changes with PHP and that led to changed paths for the template search. We'll fix that, so it takes the tpl from the base dir.
     
  9. paka

    paka Member

    I see. Don't feels quite so dim now. Ta!

    For updates do I need to check the version available for downloading or is there a more straightforward method?
     

Share This Page