Hello Gerhard,
you could try a custom spamassassin rule.
These rules go into ~amavis/.spamassassin/user_prefs
There are already some SPF/DKIM rules in spamassassin. See file
25_spf.cf or
25_dkim.cf of spamassassin.
# Then you create a rule to identify your domain:
header MY_FROM From =~ /
example.com/i
describe MY_FROM Sender is from
example.com
# Now you create a rule to combine them:
meta MY_FROM_WITHOUT_SPF MY_FROM && (SPF_NONE || SPF_FAIL)
describe MY_FROM_WITHOUT_SPF Sender is from my domain, but has no SPF
score MY_FROM_WITHOUT_SPF 9
# or:
meta MY_FROM_WITHOUT_DKIM MY_FROM && !DKIM_VALID
describe MY_FROM_WITHOUT_DKIM Sender is from my domain, but has no DKIM
score MY_FROM_WITHOUT_DKIM 9
The high score tells amavis to quarantine such mails.
Please check, if the above criteria are really useful for you. Have a
look in /usr/share/spamassassin/ . Maybe some other criteria is more
apropriate?
Test before using this in production. See "debug-sa" parameter to amavis.
Best Regards
Matthias