|
List Info
Thread: How does one disable sql logging for certain policies?
|
|
| How does one disable sql logging for
certain policies? |

|
2007-03-14 07:18:38 |
hello Mark and amavis-users,
I'm trying to set up a nice all-in-one in- and outbound
solution here,
and am a bit stuck:
Running 2.4.5, I do not want to log the details of outbound
mail to
sql (syslog is enough). Inbound, being processed for spam
too, is
great in sql, but outbound just litters my db. In fact, I'd
prefer
not having any sql activity for outbound (black/white lists,
etc...
nothing is needed.)
So, I've tried setting up a policy bank, but have discovered
that
'lookup_sql_dsn' and 'storage_sql_dsn' are not
'dynamic_confvars'. It
does make sense, but it doesn't help! So, how to do it?
'sql_clause'
IS a policy-able variable, but I'm not sure amavisd-new
would be
stable if that is set to undef in a policy declaration..
and setting
all of the write components of 'sql_clause' to "SELECT
1" seems a bit
daft.
Maybe I'm just barking up the wrong tree and there's an
easier way, or maybe the "if ($sql_storage)" type
checks in the
'check_mail' method would need another toggle to achieve
this.
I'd appreciate any advice here! Thanks in advance.
Riaan
(Being a fairly new subscriber, I'll just briefly pay my
respects to
the quality of the program and vibrancy of the community
here..
Pretty impressive stuff!)
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
AMaViS-user mailing list
AMaViS-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
|
|
| Re: How does one disable sql logging
for certain policies? |
  Slovenia |
2007-03-14 08:09:22 |
Riaan,
> Running 2.4.5, I do not want to log the details of
outbound mail to
> sql (syslog is enough). Inbound, being processed for
spam too, is
> great in sql, but outbound just litters my db.
Sorry to disappoint you but this is not currently possible,
nor planned. I see the following reasons:
- outbound+internal mail is often just a small fraction
of all mail (5% + 3.5% at our site), so it is not worth
the savings. If you can affort to process and log inbound
mail,
you can afford to process and log all of it.
- pen pals feature depends on information on outbound mail.
In fact, apart from SQL quarantine, the pen pals feature
is
the reason for existance of SQL logging.
- SQL logging database needs periodic purging anyway. You
can
trim log entries of outgoing mail to much shorter keeping
periods.
This just means that an additional 8.5 percent of records
needs
to be purged (besides all inbound mail entries).
> In fact, I'd prefer
> not having any sql activity for outbound (black/white
lists, etc...
> nothing is needed.)
>
> So, I've tried setting up a policy bank, but have
discovered that
> 'lookup_sql_dsn' and 'storage_sql_dsn' are not
'dynamic_confvars'.
> It does make sense, but it doesn't help!
Right. The same child process handles mail regardless of its
direction,
so it keeps one session to a sql server open at any time.
You could in principle save 8.5 percent (in our case) of SQL
lookups
(and keep 'local_domains' in a static lookup table only).
Is it worth it?
> So, how to do it? 'sql_clause'
> IS a policy-able variable, but I'm not sure amavisd-new
would be
> stable if that is set to undef in a policy
declaration.
That could work, but I never tried it. Please see if it
works,
and if it doesn't I'd consider it a bug and fix it.
Mark
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
AMaViS-user mailing list
AMaViS-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
|
|
| Re: How does one disable sql logging
for certain policies? |

|
2007-03-15 08:21:40 |
>
> > So, how to do it? 'sql_clause'
> > IS a policy-able variable, but I'm not sure
amavisd-new would be
> > stable if that is set to undef in a policy
declaration.
>
> That could work, but I never tried it. Please see if it
works,
> and if it doesn't I'd consider it a bug and fix it.
I do find problems there, but it is in that portion of
amavisd-new which
I've modded, so I won't waste space reporting exactly what I
see! However,
if you inspect the code in and around the two 'save_info_'
subroutines,
'penpals_find' is safe thanks to the ' &&
defined($sel_penpals)', but that
check is not present in the 'save_info_' subroutines or in
'find_or_save_addr', so they could be expected to be unhappy
in this
scenario..
regards,
Riaan
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
AMaViS-user mailing list
AMaViS-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
|
|
| Re: How does one disable sql logging
for certain policies? |
  Slovenia |
2007-03-19 12:57:24 |
Riaan,
> > > So, how to do it? 'sql_clause'
> > > IS a policy-able variable, but I'm not sure
amavisd-new would be
> > > stable if that is set to undef in a policy
declaration.
> >
> > That could work, but I never tried it. Please see
if it works,
> > and if it doesn't I'd consider it a bug and fix
it.
>
> I do find problems there, but it is in that portion of
amavisd-new which
> I've modded, so I won't waste space reporting exactly
what I see! However,
> if you inspect the code in and around the two
'save_info_' subroutines,
> 'penpals_find' is safe thanks to the ' &&
defined($sel_penpals)', but that
> check is not present in the 'save_info_' subroutines or
in
> 'find_or_save_addr', so they could be expected to be
unhappy in this
> scenario..
Will be fixed in the next 2.5.0(whatever), so you will be
able
to place (for example) the following in a policy bank:
sql_clause => {
'sel_adr' => undef,
'ins_adr' => undef,
'ins_msg' => undef,
'upd_msg' => undef,
'ins_rcp' => undef,
},
Mark
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
AMaViS-user mailing list
AMaViS-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
|
|
[1-4]
|
|