$smtp_reason_by_ccat{&CC_SPAM} = 'id=%n - spam';
$smtp_reason_by_ccat{&CC_SPAM} = '[~[:TESTS]|SPF_FAIL|id=%n - SPF
Failure ; Please contact your administrator|spam]';
$smtp_reason_by_ccat{&CC_SPAM} = '[~[:TESTS]|MYTEST|Triggered
MYTEST-Spamassassin Rule|spam]';
I tried the following but it doesn't work. Maybe the previous gets
overwritten...
Yes, you are reassigning two times.
and i would also like to additionally set custom messages for other
reject-reasons (spamassassin rules)
The full form is described in README.customize as
[~string|regexp1|then1|regexp2|then2|...|regexpN|thenN|else]
So for SPF_FAIL, MYTEST and generic spam, it would be
$smtp_reason_by_ccat{&CC_SPAM} = 'id=%n - [~[:TESTS]|SPF_FAIL|SPF
Failure ; Please contact your administrator|MYTEST|Triggered
MYTEST-SpamAssassin Rule|spam]';