ibd-category is introduced in version 1.07 or IPQ BDB

The need is to add an external report category to selected reasons in 
the "descr" database.  New utility ibd-descr is just for that.  
External categories must be in the range [1, 255], for example those 
described in: https://www.abuseipdb.com/categories

To enable that kind of reporting:

1. Assign a category to each reportable reason.  ibd-del -S now outputs
   the assigned categories as well.  Make sure descriptions contain no
   commas if you are going to follow step 3 below.

2. Enable category logs.  The long option --log-category directs ibd-ban
   and ibd-parse to output the category after the description, separated
   by a comma.  While it's easy to add that option to the few ibd-parse
   invocations, it is handy to alias -l or --log-syslog.  It can be done
   using the option file, for example like so:

      printf 'ibd-ban alias -l -l --log-category\n' >> $(ibd-config| awk '/^IPQBDB_OPTION_FILE/ {print $2;}')
      printf 'ibd-ban alias --log-syslog -l --log-category\n' >> $(ibd-config| awk '/^IPQBDB_OPTION_FILE/ {print $2;}')

   See "OPTION ALIASING" in the popt(3) man page.

3. Adjust your reporting script.  If you collect log lines using a pipe 
that starts with a line like the following:

      sed -rn '/ibd-(parse|ban)/s/(^.{15})[^:]*: *(old|new) record for ([^,]*), *(.*)/\3 \1 \2 \4/p' |...

   then you can replace it with a line like the following:

      sed -rn '/ibd-(parse|ban)/s/(^.{15})[^:]*: *(old|new) record for ([^,]*), *([^,]*,[^,]*,[^,]*)(, ([0-9]*))?/\3 \1 \2 \4/p' |...

   Note that the replacement, in this case \3 \1 \2 \4, is the same.  The
   purpose of such change is just to capture the fourth part, which used 
   to be the rest-of-line, '(.*)', as three comma-separated fields,
   '([^,]*,[^,]*,[^,]*)', discarding the added category.  A fifth match
   will get a possible report category.  Leave the script like that,
   ignoring the report category until you're ready.  Then do step 4.

4. When ready, modify the reporting script, using the possibly added
   category (sixth match in the example, as the fifth parenthesis is 
   used to express conditionality) to compose an external report.  For 
   example like so:

      cat /var/log/daemon.log.0 |\
      sed -rn '/30 north ibd-/s/(^.{15})[^:]*: *(old|new) record for ([^,]*), *([^,]*,[^,]*,[^,]*)(, ([0-9]*))?/\3 \1 \6 \2 \4/p' |\
      sort --key 1 --stable |\
      (
          read ip month day time category line
          #
          # inner part of the script
          # ...
      )

   If you're not sure that --log-category is always present, you may 
   want to check it in the inner part of the script like so:


      if [ "$category" = "new" -o "$category" = "old" ]; then
          line="$category $line"
          category=0
          echo "Missing category in $line" 1>&2
      fi

   You can then compose a CSV file:

      if ((category > 0)); then
          if [ "$ip" != "$last_ip" ]; then
              printf '%s,%s,%s,"%s"\n' \
                  "$ip" "$category" \
                  "$(date -d "$month $day $time" --iso-8601=seconds)" \
                  "$(echo $line| sed -r 's/[^,]*,[^,]*, (.*)/\1/')" >> $CSVFILE
              last_ip=$ip
          fi
      fi


