notification from munin for big mailqueue

Discussion in 'ISPConfig 3 Priority Support' started by chico11mbit, Jun 5, 2015.

  1. chico11mbit

    chico11mbit Member

    Hi,
    i want to enable an email notification in Munin, when the mail queue of postfix reaches a specific number of emails. I want to do that because of spam prevention from the php mailer.

    How can i do that? Any help to create this rule would be awesome.

    Best regards
    chico
     
  2. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Normally mail notifications are sent through the local mail server, so that mail might be stuck in the mail queue if it fills up with spam.
    You'd have to send the email via a different mail server than the one you want to watch.

    Check if the postfix mailqueue plugin is installed by typing
    Code:
    munin-run postfix_mailqueue
    on the node.
    It will give something like
    Then you have to configure the warning on the munin master host by adding
    Code:
    postfix_mailqueue.active.warning 90
    or
    Code:
    postfix_mailqueue.deferred.warning 90
    to the node section you want to monitor at.

    If not yet done, you have to configure mail alerts by adding a contact, e. g.
    Code:
    contact.email.command mail -s "Munin-notification for ${var:group} :: ${var:host}" [email protected]
    to the config.
     
    biforme likes this.
  3. chico11mbit

    chico11mbit Member

    thx a lot.
    one question. how can i check that the config is running without filling my mailqueue?

    edit: solution - df node with 1% limit installed.
     
    Last edited: Jun 6, 2015
  4. chico11mbit

    chico11mbit Member

    ups: i get this error msg in "var/mail/root:

    Code:
    Subject: Cron <munin@server3> if [ -x /usr/bin/munin-cron ]; then /usr/bin/munin-cron; fi
    Content-Type: text/plain; charset=ANSI_X3.4-1968
    X-Cron-Env: <MAILTO=root>
    X-Cron-Env: <SHELL=/bin/sh>
    X-Cron-Env: <HOME=/var/lib/munin>
    X-Cron-Env: <PATH=/usr/bin:/bin>
    X-Cron-Env: <LOGNAME=munin>
    Message-Id: <[email protected]>
    Date: Sat,  6 Jun 2015 03:10:14 +0200 (CEST)
    
    sh: mail: Befehl nicht gefunden
    
    problem: Postfix server is running but there is no "mail" command in the shell. the system is Ubuntu 14.04LTS
    edit: Solution: installed mailutils with apt-get install mailutils
     
    Last edited: Jun 6, 2015

Share This Page