banned files question

WD werner at aloah-from-hell.de
Wed Jan 15 16:46:59 CET 2020


Hi there,

I'm looking for a way to selectively send a custom notify with custom
from/envelope-from (not a simple DSN) to the original sender if his mail
contained a banned file and the email was sent to a specific recipient /
user.

Currently I have (example):

%banned_rules = (
  'DENY_EXT' => new_RE(
        qr'^\.pdf$'i,   # banned file type
  ),
  'DEFAULT' => $banned_filename_re,
);

@banned_filename_maps = (
 {'recipient at example.org' => 'DENY_EXT',
  '.' => 'DEFAULT',
 },
);


So far, so good. E-Mail get's rejected with DSN. If I do change
$final_banned_destiny from D_REJECT to D_DISCARD and set
$warnbannedsender = 1 sender get's default template for banned file.

But this change is globally. I want $final_banned_destiny D_DISCARD /
$warnbannedsender just for specific users, default behaviour of D_REJECT
for $final_banned_destiny should remain. I didn't find any policy-bank
possibility for this and and I don't know how this could be achieved?

Any comments on this appreciated =)

Thanks,
Werner


More information about the amavis-users mailing list