You want to do something on no match:
dacl whitelist header /^Message-ID:/
dacl greylist default msg "empty message id"
This almost worked:
milter-greylist: Mail from=<me@...>, rcpt=(nil), addr=testserver[10.10.10.101] is matched by entry dacl 137 greylist [msg "empty message id"] [maxpeek -1] default
However the message is not being grey listed, and still being delivered.
I guess you could do a more complex scenario using variables:
dacl continue header /^Message-ID:/ set $has_msgid="yes"
dacl greylist $has_msgid "yes" msg "empty message id"
This does not match if the header is not present. Only if the header is present but empty. Even so, the message never gets grey listed either.
Any other thoughts?
(irc: netmask on freenode)