in reply to Perl and SNMP (or how to create a custom SNMP agent.)

The S in SNMP is a joke. But for your problem, the Net-SNMP agent offers an easy way out. It supports remote query of custom parameters aka scripts using the pass-through extensions of its UCD MIB under .1.3.6.1.4.1.2021... Assuming exim -bpc is no CPU hog, you are set with a simple wrapper returning OID, type (string/integer/counter) and the output value. If it is expensive to run, maybe a simple caching layer between invocations would do it.

Update: Now I see your example and properly recollect the snmpd.conf options. You can write:

exec   exim_output_ucd /usr/bin/exim -bpc
extend exim_output_ns  /usr/bin/exim -bpc
pass   .1.3.6.1.4.1.55555.1 /usr/local/bin/exim_wrapper
To pull the results of old UCD exec, walk .1.3.6.1.4.1.2021.8 For the newer Net-SNMP extend, walk .1.3.6.1.4.1.8072.1.3.2 Both return string output, which may not work well with a snmp poller for graphing. To create a proper gauge at .1.3.6.1.4.1.55555.1, make a /usr/local/bin/exim_wrapper like:
#!/bin/sh

case "$1" in
-g)     echo ".1.3.6.1.4.1.55555.1"  # you are enterprise 55555
        echo "gauge"
        exec exim -bps
        ;;
esac
_______________________________