Is it possible to allow certain file types from certain addresses to
certain recipients without knowing the sending IP to add them to a
policy bank?
File types are considered in the context of banned checks, which can be
configured by various banned_* confvars. Generally some confvars are
global, some are per policybank, but I know only two confvars that can
make other policybanks be loaded. The banned_* confvars are not one of
those.
However, if you're really desperate, you can try something like this:
@banned_filename_maps = sub {
my ($msginfo, $recipient) = ($Amavis::MSGINFO, @_);
if ($msginfo->sender eq '[email protected]' &&
$recipient eq '[email protected]') {
return { '.' => [new_RE(qr/\.exe/)] };
} else {
return { '.' => [new_RE(qr/\.(?:com|exe)/)] };
}
};
It yields
(00739-02) Blocked BANNED (text/plain,.asc,file.com)
{DiscardedInbound,Quarantined}, [127.0.0.1] <[email protected]> ->
<[email protected]>,<[email protected]>, quarantine: [...]
(00739-03) Passed BANNED (text/plain,.asc,file.com)
{DiscardedInbound,RelayedInbound,Quarantined}, [127.0.0.1]
<[email protected]> -> <[email protected]>, quarantine: [...]
(00739-03) Blocked BANNED (text/plain,.asc,file.com)
{DiscardedInbound,RelayedInbound,Quarantined}, [127.0.0.1]
<[email protected]> -> <[email protected]>, quarantine: [...]
(00739-04) Blocked BANNED (text/plain,.asc,file.exe)
{DiscardedInbound,Quarantined}, [127.0.0.1] <[email protected]>
-> <[email protected]>,<[email protected]>, quarantine: [...]
No guarantees, though.