I copied and slightly modified Christoph Gartmann's work included in the
copy of his usenet posting included below. It has helped tremendously by
moving the SMTP-RETURN jobs to their own queue where they only delay each
other. I also set the MULTINET_SMTP_RETURN_INTERVAL to 4 hours to keep them
from hanging around for a long time.

Using this, we rarely have real messages stuck in the queue behind spam
returns.



From: Christoph Gartmann - view profile
Date: Thurs, Feb 27 2003 11:06 am
Email: gartm...@immunbio.mpg.de (Christoph Gartmann)
Groups: vmsnet.networks.tcp-ip.multinet
Not yet ratedRating:
show options


Hello,

in order to do something against the increasing number of spam hanging
around
in our MULTINET_SMTP queue I did the following:


- created a queue
$ INIT/QUEU multinet_return/PROCES=multinet_smtp_symbiont/OWN=system -
_$ /BASE=1/ON=mpi4/PROT=(S:RSM,O:RSD,G:R,W:R)/START
Note the low base priority ;-)


- created the following procedure


$ ! Procedure to requeue "SMTP-RETURN" jobs
$ ! Ch.G.,
02/03
$ !
$ SET NOVERIFY
$ IF F$MODE() .NES. "BATCH"
$ THEN
$ username = F$EDIT( F$GETJPI("","USERNAME"), "TRIM")
$ qualifier = ""
$ IF username .NES. "SYSTEM" THEN qualifier = "/USER=SYSTEM"
$ procname = F$ENVIRONMENT("PROCEDURE")
$ time = """" + F$CVTIME("+0:05","ABSOLUTE") + """"
$ SUBMIT/AFTER='time'/NOTIFY/NOLOG/NOPRINT'qualifier' 'procname'
$ EXIT
$ ENDIF
$ !
$ temp = F$GETQUI("CANCEL_OPERATION")
$ qname = F$GETQUI("DISPLAY_QUEUE", "QUEUE_NAME", "MULTINET_SMTP",
"WILDCARD")
$loop1:
$ entnum = F$GETQUI("DISPLAY_JOB", "ENTRY_NUMBER",, "ALL_JOBS")
$ IF entnum .NES. ""
$ THEN
$ jobname = F$GETQUI("DISPLAY_JOB","JOB_NAME",,"FREEZE_CONTEXT")
$ IF jobname .EQS. "SMTP-RETURN"
$ THEN
$ SET NOON
$ SET ENTRY 'entnum'/REQUEUE=multinet_return
$ SET ON
$ ENDIF
$ ELSE
$ GOTO resubmit
$ ENDIF
$ GOTO loop1
$resubmit:
$ time = """" + F$CVTIME("+1:00","ABSOLUTE") + """"
$ procname = F$ENVIRONMENT("PROCEDURE")
$ SUBMIT/AFTER='time'/NOTIFY/NOLOG/NOPRINT 'procname'
$ EXIT


Now I have almost no SMTP-RETURN jobs in the normal MULTINET_SMTP queue.
They
are all hanging in my MULTINET_RETURN queue and are slowly processed without

disturbing the rest. The nice thing is that these jobs remain in this queue
even if they have been (unsuccessfully) processed by the Multinet symbiont.