Le Vendredi 14 Août 2009 11:26:49, Mark Martinec a écrit :
> Luis,
>
> > Well after doing this config, I have a footer in all emails:
> >
> > $altermime = 'altermime';
> > @altermime_args_disclaimer = qw(--verbose
> > --disclaimer=/etc/mail/altermime- disclaimer.txt);
> > @altermime_args_defang = @altermime_args_disclaimer;
> > $defang_maps_by_ccat{+CC_CATCHALL} = [ 'altermime' ];
> >
> > how ever, I wonder to add a special footer based on mail information.
> > Mainly because to let a normal user to feedback amavis to let it learn
> > about ham or spam.
> >
> > so I wondering if there is a way to know in a variable messages mail_id
> > or secret_id in realtime. So I can push this value in altermime data to
> > have a custom foot based on mail information rather than static one.
> >
> > Look that I'm looking a data about mail, not recipients nor senders.
>
> Should the footer be totally dynamic (generated on-the-fly), or
> would it suffice to switch between a couple of pre-configured
> settings?
>
> If the later, remember that @altermime_args_defang and
> @altermime_args_disclaimer are members of policy banks.
>
> You can prepare several policy banks, each with its own
> settings for these two variables, and then use a custom
> plugin to load a policy bank of choice based on virus and
> spam checks (and other data) collected so far.
>
> >From a custom hook you can load a policy bank like this:
> Amavis::load_policy_bank('WHATEVERNAME');
>
>
> Mark
>
> ---------------------------------------------------------------------------
> --- Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day trial. Simplify your report design, integration and deployment -
> and focus on what you do best, core application coding. Discover what's
> new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> 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/
Thanx Mark
I was reading this you've posted:
$policy_bank{'OUR-REPLY'} = {
allow_disclaimers => 0,
};
include_config_files('/etc/amavisd-custom.conf');
/etc/amavisd-custom.conf :
package Amavis::Custom;
use strict;
sub new {
my($class,$conn,$msginfo) = @_;
my($self) = bless {}, $class;
my($subj) = $msginfo->get_header_field_body('subject');
my($refs) = $msginfo->get_header_field_body('references');
my($inre) = $msginfo->get_header_field_body('in-reply-to');
if ($msginfo->originating &&
(defined $refs || defined $inre || $subj =~ /^\s*re:/i)) {
Amavis::load_policy_bank('OUR-REPLY');
}
$self;
}
SO what I want to know is to setup a dynamic disclaimer baased on Mail-id (the
one amavisd uses)
X-Quarantine-ID: <28c4EXoOy2s3>
In that little source, how can I extract that header. And they, by using perl
eval, I could write my policy on the fly:
$policy_bank{'28c4EXoOy2s3'} = {
allow_disclaimers => 1,
@altermime_args_disclaimer = qw(--verbose
--disclaimer=/etc/mail/altermime- CUSTOM-disclaimer.txt);
};
Is that possible?
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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/