Penpal configuration help

Phil Daws uxbod at splatnix.net
Wed Oct 15 21:09:07 CEST 2014


Hmmm, this is a little confusing then. Postfix is set to forward via LMTP on tcp/10024 and in amavisd.conf I have: 

$interface_policy{'10024'} = 'POLICY-IN'; 

$policy_bank{'POLICY-IN'} = { 
originating => 0, 
bounce_killer_score => 1, 
penpals_bonus_score => 1, 
}; 

and from the internal network when it sends out it should hit: 

$policy_bank{'MYNETS'} = { # mail originating from @mynetworks 
originating => 1, # is true in MYNETS by default, but let's make it explicit 
os_fingerprint_method => undef, # don't query p0f for internal clients 
allow_disclaimers => 0, 
log_level => 1, 
penpals_bonus_score => undef, 
bounce_killer_score => 0, 
}; 

as I have specified the correct mynetworks variable. When email comes in from external it does look okay: 

amavis[19518]: (19518-01) Passed CLEAN {RelayedInbound}, POLICY-IN [216.207.245.17]:33321 [198.245.16.142] <asterisk-users-bounces at lists.digium.com> 

but what is odd is when I send out: 

amavis[19517]: (19517-01) Checking: IQESxMhvS-Ec POLICY-IN/MYNETS [172.30.10.11] 

is one policy map overriding the other or is it treating the internal networks as external as-well ? Should add that I am also using MySQL storage so is this valid ? 

@storage_sql_dsn = @lookup_sql_dsn; 

@storage_redis_dsn = ( 
{ server => '172.30.10.20:6379', db_id => 1 }, 
); 

As when I check the Redis database there are no keys :( 

172.30.10.20:6379> keys * 
(empty list or set) 

Thanks, Phil 
----- Original Message ----- 
From: "Mark Martinec" <Mark.Martinec+amavis at ijs.si> 
To: amavis-users at amavis.org 
Sent: Wednesday, 15 October, 2014 5:31:48 PM 
Subject: Re: Penpal configuration help 

Phil, 

> am very new to Amavisd-new and struggling with how to get penpals 
> working. I have two MX which are sharing a common redis database. At 
> present in amavisd.conf the following is set: 
> 
> $policy_bank{'MYNETS'} = { # mail originating from @mynetworks 
> originating => 1, # is true in MYNETS by default, but let's make it 
> explicit 
> os_fingerprint_method => undef, # don't query p0f for internal clients 
> allow_disclaimers => 0, 
> log_level => 1, 
> penpals_bonus_score => undef, 
> bounce_killer_score => 0, 
> }; 
> 
> and in postfix/main.cf and postfix/master.cf I have: 
> 
> content_filter = lmtp-amavis:[127.0.0.1]:10024 
> 
> lmtp-amavis unix - - n - 3 lmtp 
> -o lmtp_data_done_timeout=1200 
> -o lmtp_send_xforward_command=yes 
> -o disable_dns_lookups=yes 
> -o max_use=20 
> 
> but when I check the database no keys are being written. I presume 
> that I need to create a second policy bank and associate that with 
> another interface ? 
> 
> Any help would be appreciated. 

Assuming your redis settings are fine ( @storage_redis_dsn ), 
for pen-pals to work the penpals_bonus_score must be defined 
and nonzero. From release notes: 

* configuration variable $penpals_bonus_score must be set to a positive 
value (such as 1.0, increase to perhaps 5 or 8 after seeing that it 
works), 
zero disables the feature and is a default; 

Other important pre-requisites for penpals: 

* @mynetworks and @local_domains_maps must reflect reality, allowing 
amavisd 
to distinguish between outgoing, incoming and internal-to-internal 
mail; 

* the information about client IP address must be available to amavisd, 
i.e. Postfix XFORWARD protocol extension must be enabled, or 
AM.PDP+milter; 

(references to SQL in that part of release notes can be ignored 
if you are using a Redis server). 

Mark 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20141015/fc5d211d/attachment.html>


More information about the amavis-users mailing list