List Info

Thread: SQL quarantine: delete or modify?




SQL quarantine: delete or modify?
country flaguser name
United States
2007-07-05 11:02:28
In SQL based quarantine, if I run a script to delete
quarantined email
after (x) days, but want to keep the LOG entries, what is
best to do?

Just find quarantined chunks and set to ''? Or point id to a
phony
(blank) record?

The former would keep lots of records that are duplicates
(blank chunks)
but the later might mess up foreign keys.

What are you doing?

-- 
Michael Scheidell, CTO
SECNAP Network Security Corporation
____________________________________________________________
_____________
This email has been scanned and certified safe by
SpammerTrap(tm). 
For Information please see http://www.spammertrap.com

____________________________________________________________
_____________

------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
AMaViS-userlists.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: SQL quarantine: delete or modify?
user name
2007-07-05 11:17:03
On 7/5/07, Michael Scheidell <scheidellsecnap.net> wrote:
> In SQL based quarantine, if I run a script to delete
quarantined email
> after (x) days, but want to keep the LOG entries, what
is best to do?
>
> Just find quarantined chunks and set to ''? Or point id
to a phony
> (blank) record?
>
> The former would keep lots of records that are
duplicates (blank chunks)
> but the later might mess up foreign keys.
>
> What are you doing?
>

If you just delete records from the 'quarantine' table there
would be
no problem. Because the reference is to the 'msgs' table,
not the
other way around.

------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
AMaViS-userlists.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: SQL quarantine: delete or modify?
country flaguser name
United States
2007-07-05 11:22:07
Brian Wong wrote:
> If you just delete records from the 'quarantine' table
there would be
> no problem. Because the reference is to the 'msgs'
table, not the
> other way around.
>

if you then 'clean out logs' (ie, delete records from msgs
table every 
90 days) won't it be missing a key and mess up foreign key
constraints?


____________________________________________________________
_____________
This email has been scanned and certified safe by
SpammerTrap(tm). 
For Information please see http://www.spammertrap.com

____________________________________________________________
_____________

------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
AMaViS-userlists.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: SQL quarantine: delete or modify?
user name
2007-07-05 11:44:29
On 7/5/07, Michael Scheidell <scheidellsecnap.net> wrote:
> Brian Wong wrote:
> > If you just delete records from the 'quarantine'
table there would be
> > no problem. Because the reference is to the 'msgs'
table, not the
> > other way around.
> >
>
> if you then 'clean out logs' (ie, delete records from
msgs table every
> 90 days) won't it be missing a key and mess up foreign
key constraints?
>

I think you are misunderstanding how it works. The
dependence is
unidirectional.

If you delete the record from a 'msgs' table, the
corresponding record
in the 'quarantine' table will  be removed. If you delete
just the
record in the 'quarantine' table, that will be the only
table
affected.

The process of deleting a record from the 'msgs' table will
check for
any references to it. It will delete those that are
referenced to it,
but the lack of the reference will not throw an error.

------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
AMaViS-userlists.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: SQL quarantine: delete or modify?
country flaguser name
United States
2007-07-05 11:47:18
Brian Wong wrote:
> On 7/5/07, Michael Scheidell <scheidellsecnap.net> wrote:
>> Brian Wong wrote:
>> > If you just delete records from the
'quarantine' table there would be
>> > no problem. Because the reference is to the
'msgs' table, not the
>> > other way around.
>> >
>>
>> if you then 'clean out logs' (ie, delete records
from msgs table every
>> 90 days) won't it be missing a key and mess up
foreign key constraints?
>>
>
ok, thanks.

> I think you are misunderstanding how it works. The
dependence is
> unidirectional.
>
> If you delete the record from a 'msgs' table, the
corresponding record
> in the 'quarantine' table will  be removed. If you
delete just the
> record in the 'quarantine' table, that will be the only
table
> affected.
>
> The process of deleting a record from the 'msgs' table
will check for
> any references to it. It will delete those that are
referenced to it,
> but the lack of the reference will not throw an error.
>

____________________________________________________________
_____________
This email has been scanned and certified safe by
SpammerTrap(tm). 
For Information please see http://www.spammertrap.com

____________________________________________________________
_____________

------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
AMaViS-userlists.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-5]

about | contact  Other archives ( Real Estate discussion Medical topics )