On 2/28/08, Bartłomiej Rutkowski wrote:
> On Wed, 27 Feb 2008 08:09:45 -0700
> "Gary V" wrote:
>
> > On 2/27/08, Bartłomiej Rutkowski wrote:
> > > Hi all,
> > >
> > > I am using policy banks to properly distribute mail routes -
> > > different destination and scores for mail incoming from legitimate
> > > (smtp authorized) clients, different for mail incoming from the
> > > internet, different for mail that is relayed and sent back to the
> > > net. All is working great, but what I wanted to do, is to override
> > > default DNS policy for my authorized clients (which is by now: NO
> > > DNS SENDING) so I could inform them that their mail did not reach
> > > the recipient, because of spammy text, or having a virus, or by any
> > > reason. So I changed my policy banks like that, for hosts STASIS00
> > > and STASIS01 like so:
> > >
> > > $interface_policy{'10009'} = 'QMAIL';
> > > $policy_bank{'QMAIL'} = {
> > >  forward_method => 'smtp:[10.10.3.9]:10025',
> > > };
> > >
> > > $interface_policy{'10048'} = 'STASIS00';
> > > $interface_policy{'10040'} = 'STASIS01';
> > > $policy_bank{'STASIS00'} = {
> > >  forward_method => 'smtp:[10.10.3.9]:10025',
> > >  spam_kill_level_maps => [8.5],
> > >  sa_dsn_cutoff_level => [25.0],
> > >  final_spam_destiny => 'D_BOUNCE',
> > >  final_virus_destiny => 'D_BOUNCE',
> > >  final_banned_destiny => 'D_BOUNCE',
> > > };
> > > $policy_bank{'STASIS01'} = {
> > >  forward_method => 'smtp:[10.10.3.9]:10025',
> > >  spam_kill_level_maps => [8.5],
> > >  sa_dsn_cutoff_level => [25.0],
> > >  final_spam_destiny => 'D_BOUNCE',
> > >  final_virus_destiny => 'D_BOUNCE',
> > >  final_banned_destiny => 'D_BOUNCE',
> > > };
> > >
> > > $interface_policy{'10049'} = 'MX00';
> > > $interface_policy{'10050'} = 'MX01';
> > > $policy_bank{'MX00'} = {
> > >  forward_method => 'smtp:[10.10.3.9]:10025',
> > >  os_fingerprint_method => 'p0f:195.46.43.224:1234',
> > > };
> > > $policy_bank{'MX01'} = {
> > >  forward_method => 'smtp:[10.10.3.9]:10025',
> > >  os_fingerprint_method => 'p0f:195.46.43.225:1234',
> > > };
> > >
> > > While the default settings are:
> > >
> > > $sa_tag_level_deflt  = 0.0;
> > > $sa_tag2_level_deflt = 5.0;
> > > $sa_kill_level_deflt = 7.0;
> > > $sa_dsn_cutoff_level = 0;
> > > $sa_quarantine_cutoff_level = 25;
> > >
> > > $notify_method  = 'smtp:[10.10.3.9]:10025';
> > > # $forward_method = 'smtp:[127.0.0.1]:10025';
> > >
> > > # $final_virus_destiny      = D_DISCARD;
> > > # $final_banned_destiny     = D_BOUNCE;
> > > # $final_spam_destiny       = D_BOUNCE;
> > > # $final_bad_header_destiny = D_PASS;
> > >
> > > After that, everything in policy banks is working, and I cant find
> > > any error messages in logs, but DNS sending still does not work.
> > > Why is that? Where did I something wrong?
> > >
> > > Thanks for any help
> > > B.R.
> > >
> >
> > sa_dsn_cutoff_level is not a valid policy bank key, you want
> > spam_dsn_cutoff_level_maps. See amavisd.conf-default for a list of
> > valid keys. Version 2.5 or newer should additionally require
> > spam_dsn_cutoff_level_bysender_maps (and if mail is considered to
> > originate from us, 'originating'). Here is an example:
> >
> > $policy_bank{'TRUSTED'} = { # mail originating from trusted senders
> >   originating => 1,
> >   spam_admin_maps => ["[EMAIL PROTECTED]"], # alert of internal
> > spam final_spam_destiny => D_BOUNCE, # so the sender knows they are a
> > spammer spam_kill_level_maps => [10.0],
> >   spam_dsn_cutoff_level_maps => [9999],
> >   spam_dsn_cutoff_level_bysender_maps => [9999],
> > };
> >
>
> That worked, thanks for your reply! I`ve managed to get those
> notifications to be sent and it works like a charm, but now I have two
> other issues with it.
>
> The first one is about content of DNS - I would like it to be in foreign
> language, and I have found some clues in sample config how to insert
> custom text, but it does not show how to use any variables (like sender
> ip address, sender and recipient address and so on) to use it in that
> text, so it would not be static info.

You mean DSN, not DNS. I can only point you to:
http://www.ijs.si/software/amavisd/README.customize.txt

This should provide more clues to variables that you can manipulate. I
have not done so myself, so I don't have a lot of advice here.

Myself, I do what Debian does. I break out the templates into text
files in a separate directory (/etc/amavis/en_US/) and refer to them
in this way:
read_l10n_templates('en_US', '/etc/amavis');

Here I have english 2.5.3 templates broken out:
http://www200.pair.com/mecham/amavisd/2.5.3/en_US/

> Second one is about delivery method - right now each DNS is sent
> directly by machine which scanned the message. Is there any way to do
> it like amavis does while passing message, that is to inject it to some
> machine at some specified port?

Hopefully Mark will join in and provide insight into this question. I
simply have not taken the time to observe the routing behavior of
amavisd-new generated bounce notifications.

> Also, one question - what is 'originating => 1' for? I dont want to
> treat those mails any specific way, I just want the policy bank to work
> in other way than default, not regarding if it is authorized mail, or
> relay, or from the net.

This may help:
http://marc.info/?l=amavis-user&m=120058980003212

Sorry I'm not more helpful.

>
> Kind regards,
> Bartek Rutkowski
>

-- 
Gary V
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
AMaViS-user mailing list
[email protected]
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