Problem solved! Thanks again, Claus.
For anyone else who reads this... FEATURE(blacklist_recipients) is needed in order to quarantine by recipient. Then it's all good, done as follows.
access file:
To:sp...@columbia.edu QUARANTINE:foobar
makemap hash access < access, then check with -bt:
# /usr/sbin/sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> /map access
To:sp...@columbia.edu
map_lookup: access (
To:sp...@columbia.edu) returns QUARANTINE:foobar (0)
> Rcpt_ok
sp...@columbia.edu
Rcpt_ok input: spam @ columbia . edu
ParseRecipient input: spam @ columbia . edu
CanonAddr input: spam @ columbia . edu
canonify input: spam @ columbia . edu
Canonify2 input: spam < @ columbia . edu >
Canonify2 returns: spam < @ columbia . edu . >
canonify returns: spam < @ columbia . edu . >
Parse0 input: spam < @ columbia . edu . >
Parse0 returns: spam < @ columbia . edu . >
CanonAddr returns: spam < @ columbia . edu . >
ParseRecipient returns: spam < @ columbia . edu >
SearchList input: < + To > $| < F : spam @ columbia . edu > < U : spam @ > < D : columbia . edu > < >
F input: < spam @ columbia . edu > < ? > < + To > < >
F returns: < QUARANTINE : foobar > < >
SearchList returns: < QUARANTINE : foobar >
Rcpt_ok returns: $# error $@ quarantine $: foobar
At port 25 all looks normal (done from another host):
rcpt to:<
sp...@columbia.edu>
250 2.1.5 <
sp...@columbia.edu>... Recipient ok
And here it is, quarantined:
# ls /var/spool/mqueue/
dft4QE86m2032233 hft4QE86m2032233
Joseph Brennan
Columbia University