Jo,

> Is there a way to set a policy bank based on the remote IP address?
>
> I'd like to set a policy bank that includes just localhost, and
> another that includes two remote machines.   @mynetworks includes
> localhost but other machines I don't want it to include...

Currently the @mynetworks entries can only produce a boolean result,
not something which could be used to select a policy bank. This is
something on my to-do list, but for now you will have to bring
Postfix to the aid, choosing one of amavisd TCP ports based on
a client's IP address.

smtpd_client_restrictions =
  check_client_access cidr:/etc/postfix/tag_byclient.cidr

/etc/postfix/tag_byclient.cidr:

127.0.0.0/8       FILTER amavisfeed:[127.0.0.1]:10024
[::1]/128         FILTER amavisfeed:[127.0.0.1]:10024
169.254.0.0/16    FILTER amavisfeed:[127.0.0.1]:10026
10.0.0.0/8        FILTER amavisfeed:[127.0.0.1]:10026
172.16.0.0/12     FILTER amavisfeed:[127.0.0.1]:10026
192.0.2.1         FILTER amavisfeed:[127.0.0.1]:10028
192.0.2.7         FILTER amavisfeed:[127.0.0.1]:10028
0.0.0.0/0         FILTER amavisfeed:[127.0.0.1]:10030
[::]/0            FILTER amavisfeed:[127.0.0.1]:10030


$inet_socket_port = [10024,10026,10028,10030];

$interface_policy{'10024'} = 'LOCALHOST';
$interface_policy{'10026'} = 'OURNETS';
$interface_policy{'10028'} = 'PARTNER';
$interface_policy{'10030'} = 'OTHER';

$policy_bank{'LOCALHOST'} = {
  originating => 1,
  ...
};

$policy_bank{'OURNETS'} = {
  originating => 1,
  ...
};

$policy_bank{'PARTNER'} = {
  originating => 1,  # 0 or 1, as appropriate
  ...
};

$policy_bank{'PARTNER'} = {
  originating => 0,  # redundant, just to be explicit
  ...
};


Mark

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
 AMaViS-HowTos:http://www.amavis.org/howto/ 

Reply via email to