Index: openacs-4/packages/acs-mail-lite/acs-mail-lite.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/acs-mail-lite.info,v diff -u -r1.15 -r1.16 --- openacs-4/packages/acs-mail-lite/acs-mail-lite.info 30 Oct 2005 11:53:15 -0000 1.15 +++ openacs-4/packages/acs-mail-lite/acs-mail-lite.info 29 Nov 2005 11:28:25 -0000 1.16 @@ -7,15 +7,15 @@ f t - + Eric Lorenzo Timo Hentschel Simplified reliable email transmission with bounce management. 2005-10-19 This package provides a simple ns_sendmail-like interface for sending messages, but queues messages in the database to ensure reliable sending and make sending a message 'transactional'. Prefered over acs-messaging or acs-mail. 0 - + Index: openacs-4/packages/acs-mail-lite/sql/postgresql/acs-mail-lite-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/sql/postgresql/acs-mail-lite-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-mail-lite/sql/postgresql/acs-mail-lite-create.sql 30 Oct 2005 11:53:15 -0000 1.3 +++ openacs-4/packages/acs-mail-lite/sql/postgresql/acs-mail-lite-create.sql 29 Nov 2005 11:28:26 -0000 1.4 @@ -24,9 +24,9 @@ ); create table acs_mail_lite_mail_log ( - user_id integer - constraint acs_mail_lite_log_user_id_fk - references users (user_id) + party_id integer + constraint acs_mail_lite_log_party_id_fk + references parties (party_id) on delete cascade constraint acs_mail_lite_log_pk primary key, @@ -35,9 +35,9 @@ create table acs_mail_lite_bounce ( - user_id integer - constraint acs_mail_lite_bou_user_id_fk - references users (user_id) + party_id integer + constraint acs_mail_lite_bou_party_id_fk + references parties (party_id) on delete cascade constraint acs_mail_lite_bou_pk primary key, Index: openacs-4/packages/acs-mail-lite/sql/postgresql/upgrade/upgrade-1.0b6-1.0b7.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/sql/postgresql/upgrade/Attic/upgrade-1.0b6-1.0b7.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-mail-lite/sql/postgresql/upgrade/upgrade-1.0b6-1.0b7.sql 29 Nov 2005 11:28:26 -0000 1.1 @@ -0,0 +1,8 @@ +-- Make sure that emails are going to parties not to users and therefore logging is for parties, not for users. +alter table acs_mail_lite_mail_log add column party_id integer references parties(party_id); +update acs_mail_lite_mail_log set party_id = user_id; +alter table acs_mail_lite_mail_log drop column user_id; + +alter table acs_mail_lite_bounce add column party_id integer references parties(party_id); +update acs_mail_lite_bounce set party_id = user_id; +alter table acs_mail_lite_bounce drop column user_id; \ No newline at end of file Index: openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-oracle.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-oracle.xql 20 May 2004 18:54:33 -0000 1.5 +++ openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-oracle.xql 29 Nov 2005 11:28:26 -0000 1.6 @@ -44,7 +44,7 @@ delete from acs_mail_lite_bounce - where user_id in (select user_id + where party_id in (select party_id from acs_mail_lite_mail_log where last_mail_date < sysdate - :max_days_to_bounce) @@ -68,15 +68,15 @@ update acs_mail_lite_mail_log set last_mail_date = sysdate - where user_id = :user_id + where party_id = :user_id - insert into acs_mail_lite_mail_log (user_id, last_mail_date) + insert into acs_mail_lite_mail_log (party_id, last_mail_date) values (:user_id, sysdate) Index: openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-postgresql.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-postgresql.xql 2 May 2004 04:41:37 -0000 1.4 +++ openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-postgresql.xql 29 Nov 2005 11:28:26 -0000 1.5 @@ -44,7 +44,7 @@ delete from acs_mail_lite_bounce - where user_id in (select user_id + where party_id in (select party_id from acs_mail_lite_mail_log where last_mail_date < current_timestamp - to_interval(:max_days_to_bounce, 'days')) @@ -68,15 +68,15 @@ update acs_mail_lite_mail_log set last_mail_date = current_timestamp - where user_id = :user_id + where party_id = :user_id - insert into acs_mail_lite_mail_log (user_id, last_mail_date) + insert into acs_mail_lite_mail_log (party_id, last_mail_date) values (:user_id, current_timestamp) Index: openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.xql,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.xql 10 Nov 2005 15:00:56 -0000 1.8 +++ openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs.xql 29 Nov 2005 11:28:26 -0000 1.9 @@ -29,15 +29,15 @@ update acs_mail_lite_mail_log set last_mail_date = sysdate - where user_id = :user_id + where party_id = :user_id - insert into acs_mail_lite_mail_log (user_id, last_mail_date) + insert into acs_mail_lite_mail_log (party_id, last_mail_date) values (:user_id, sysdate) @@ -48,15 +48,15 @@ update acs_mail_lite_bounce set bounce_count = bounce_count + 1 - where user_id = :user_id + where party_id = :user_id - insert into acs_mail_lite_bounce (user_id, bounce_count) + insert into acs_mail_lite_bounce (party_id, bounce_count) values (:user_id, 1) @@ -66,7 +66,7 @@ delete from acs_mail_lite_bounce - where user_id in (select user_id + where party_id in (select party_id from acs_mail_lite_mail_log where last_mail_date < sysdate - :max_days_to_bounce) @@ -78,7 +78,7 @@ update users set email_bouncing_p = 't' - where user_id in (select user_id + where user_id in (select party_id from acs_mail_lite_bounce where bounce_count >= :max_bounce_count)