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 -N -r1.24 -r1.25 --- openacs-4/packages/acs-mail-lite/acs-mail-lite.info 17 Nov 2006 15:14:56 -0000 1.24 +++ openacs-4/packages/acs-mail-lite/acs-mail-lite.info 17 Dec 2006 17:04:09 -0000 1.25 @@ -7,7 +7,7 @@ f t - + Eric Lorenzo Timo Hentschel @@ -16,7 +16,7 @@ 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/oracle/acs-mail-lite-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/sql/oracle/acs-mail-lite-create.sql,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/acs-mail-lite/sql/oracle/acs-mail-lite-create.sql 21 Jan 2004 14:51:49 -0000 1.5 +++ openacs-4/packages/acs-mail-lite/sql/oracle/acs-mail-lite-create.sql 17 Dec 2006 17:04:09 -0000 1.6 @@ -26,9 +26,9 @@ ); create table acs_mail_lite_mail_log ( - user_id integer + party_id integer constraint acs_mail_lite_log_user_id_fk - references users (user_id) + references parties (party_id) on delete cascade constraint acs_mail_lite_log_pk primary key, @@ -37,9 +37,9 @@ create table acs_mail_lite_bounce ( - user_id integer + party_id integer constraint acs_mail_lite_bou_user_id_fk - references users (user_id) + references parties (party_id) on delete cascade constraint acs_mail_lite_bou_pk primary key, @@ -48,12 +48,49 @@ create table acs_mail_lite_bounce_notif ( - user_id integer + party_id integer constraint acs_mail_li_bou_notif_us_id_fk - references users (user_id) + references parties (party_id) on delete cascade constraint acs_mail_lite_notif_pk primary key, notification_time date default sysdate, notification_count integer default 0 ); + +CREATE TABLE acs_mail_lite_reply_prefixes +( + prefix varchar(100) NOT NULL, + package_id int4 NOT NULL, + impl_name varchar(100) NOT NULL +) ; + + +CREATE TABLE acs_mail_lite_complex_queue ( + id serial PRIMARY KEY, + creation_date text, + locking_server text, + to_party_ids text, + cc_party_ids text, + bcc_party_ids text, + to_group_ids text, + cc_group_ids text, + bcc_group_ids text, + to_addr text, + cc_addr text, + bcc_addr text, + from_addr text, + subject text, + body text, + package_id integer, + files text, + file_ids text, + folder_ids text, + mime_type text, + object_id integer, + single_email_p boolean, + no_callback_p boolean, + extraheaders text, + alternative_part_p boolean, + use_sender_p boolean +); Index: openacs-4/packages/acs-mail-lite/sql/oracle/acs-mail-lite-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/sql/oracle/acs-mail-lite-drop.sql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-mail-lite/sql/oracle/acs-mail-lite-drop.sql 4 May 2002 18:27:52 -0000 1.1 +++ openacs-4/packages/acs-mail-lite/sql/oracle/acs-mail-lite-drop.sql 17 Dec 2006 17:04:09 -0000 1.2 @@ -7,3 +7,8 @@ drop table acs_mail_lite_queue; drop sequence acs_mail_lite_id_seq; +drop table acs_mail_lite_mail_log; +drop table acs_mail_lite_bounce; +drop table acs_mail_lite_bounce_notif; +drop TABLE acs_mail_lite_reply_prefixes; +drop TABLE acs_mail_lite_complex_queue; \ No newline at end of file Index: openacs-4/packages/acs-mail-lite/sql/oracle/upgrade/upgrade-1.0b6-1.0b7.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/sql/oracle/upgrade/Attic/upgrade-1.0b6-1.0b7.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-mail-lite/sql/oracle/upgrade/upgrade-1.0b6-1.0b7.sql 17 Dec 2006 17:04:09 -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/sql/oracle/upgrade/upgrade-1.3b5-1.3b6.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/sql/oracle/upgrade/Attic/upgrade-1.3b5-1.3b6.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-mail-lite/sql/oracle/upgrade/upgrade-1.3b5-1.3b6.sql 17 Dec 2006 17:04:09 -0000 1.1 @@ -0,0 +1,7 @@ + +CREATE TABLE acs_mail_lite_reply_prefixes +( + prefix varchar(100) NOT NULL, + package_id int4 NOT NULL, + impl_name varchar(100) NOT NULL +) ; \ No newline at end of file Index: openacs-4/packages/acs-mail-lite/sql/oracle/upgrade/upgrade-1.3b7-1.3b8.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/sql/oracle/upgrade/Attic/upgrade-1.3b7-1.3b8.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-mail-lite/sql/oracle/upgrade/upgrade-1.3b7-1.3b8.sql 17 Dec 2006 17:04:09 -0000 1.1 @@ -0,0 +1,38 @@ +-- 2006/11/17 cognovis/nfl +-- +-- Name: acs_mail_lite_complex_queue; Type: TABLE; Schema: public; Owner: cognovis; Tablespace: +-- + +CREATE TABLE acs_mail_lite_complex_queue ( + id serial PRIMARY KEY, + creation_date text, + locking_server text, + to_party_ids text, + cc_party_ids text, + bcc_party_ids text, + to_group_ids text, + cc_group_ids text, + bcc_group_ids text, + to_addr text, + cc_addr text, + bcc_addr text, + from_addr text, + subject text, + body text, + package_id integer, + files text, + file_ids text, + folder_ids text, + mime_type text, + object_id integer, + single_email_p boolean, + no_callback_p boolean, + extraheaders text, + alternative_part_p boolean, + use_sender_p boolean +); + +-- +-- PostgreSQL database statements - end of file +-- + Index: openacs-4/packages/acs-mail-lite/sql/oracle/upgrade/upgrade-1.3b8-1.3b9.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/sql/oracle/upgrade/Attic/upgrade-1.3b8-1.3b9.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-mail-lite/sql/oracle/upgrade/upgrade-1.3b8-1.3b9.sql 17 Dec 2006 17:04:09 -0000 1.1 @@ -0,0 +1,5 @@ +-- 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_bounce_notif drop constraint acs_mail_li_bou_notif_us_id_fk; +alter table acs_mail_lite_bounce_notif add column party_id integer constraint acs_mail_li_bou_notif_us_id_fk references parties (party_id) on delete cascade; +update acs_mail_lite_bounce_notif set party_id = user_id; +alter table acs_mail_lite_bounce_notif drop column user_id; \ No newline at end of file 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 -N -r1.5 -r1.6 --- openacs-4/packages/acs-mail-lite/sql/postgresql/acs-mail-lite-create.sql 1 Dec 2006 16:54:45 -0000 1.5 +++ openacs-4/packages/acs-mail-lite/sql/postgresql/acs-mail-lite-create.sql 17 Dec 2006 17:04:10 -0000 1.6 @@ -46,9 +46,9 @@ create table acs_mail_lite_bounce_notif ( - user_id integer + party_id integer constraint acs_mail_li_bou_notif_us_id_fk - references users (user_id) + references parties (party_id) on delete cascade constraint acs_mail_lite_notif_pk primary key, Index: openacs-4/packages/acs-mail-lite/sql/postgresql/acs-mail-lite-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/sql/postgresql/acs-mail-lite-drop.sql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/acs-mail-lite/sql/postgresql/acs-mail-lite-drop.sql 14 Jan 2004 15:31:40 -0000 1.2 +++ openacs-4/packages/acs-mail-lite/sql/postgresql/acs-mail-lite-drop.sql 17 Dec 2006 17:04:10 -0000 1.3 @@ -9,4 +9,6 @@ drop sequence acs_mail_lite_id_seq; drop table acs_mail_lite_mail_log; drop table acs_mail_lite_bounce; -drop table acs_mail_lite_bounce_notif; \ No newline at end of file +drop table acs_mail_lite_bounce_notif; +drop TABLE acs_mail_lite_reply_prefixes; +drop TABLE acs_mail_lite_complex_queue; Index: openacs-4/packages/acs-mail-lite/sql/postgresql/upgrade/upgrade-1.3b8-1.3b9.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail-lite/sql/postgresql/upgrade/Attic/upgrade-1.3b8-1.3b9.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-mail-lite/sql/postgresql/upgrade/upgrade-1.3b8-1.3b9.sql 17 Dec 2006 17:04:10 -0000 1.1 @@ -0,0 +1,5 @@ +-- 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_bounce_notif drop constraint acs_mail_li_bou_notif_us_id_fk; +alter table acs_mail_lite_bounce_notif add column party_id integer constraint acs_mail_li_bou_notif_us_id_fk references parties (party_id) on delete cascade; +update acs_mail_lite_bounce_notif set party_id = user_id; +alter table acs_mail_lite_bounce_notif 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 -N -r1.6 -r1.7 --- openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-oracle.xql 29 Nov 2005 11:28:26 -0000 1.6 +++ openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-oracle.xql 17 Dec 2006 17:04:10 -0000 1.7 @@ -7,7 +7,7 @@ insert into acs_mail_lite_bounce_notif - (user_id, notification_count, notification_time) + (party_id, notification_count, notification_time) (select user_id, 0 as notification_count, trunc(sysdate-1-:notification_interval) as notification_time from acs_mail_lite_bounce @@ -21,7 +21,7 @@ select u.user_id, u.email, u.first_names || ' ' || u.last_name as name from cc_users u, acs_mail_lite_bounce_notif n - where u.user_id = n.user_id + where u.user_id = n.party_id and u.email_bouncing_p = 't' and n.notification_time < sysdate - :notification_interval and n.notification_count < :max_notification_count @@ -35,7 +35,7 @@ update acs_mail_lite_bounce_notif set notification_time = trunc(sysdate), notification_count = notification_count + 1 - where user_id = :user_id + where party_id = :user_id 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 -N -r1.8 -r1.9 --- openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-postgresql.xql 2 Dec 2006 12:49:54 -0000 1.8 +++ openacs-4/packages/acs-mail-lite/tcl/acs-mail-lite-procs-postgresql.xql 17 Dec 2006 17:04:10 -0000 1.9 @@ -6,7 +6,7 @@ - insert into acs_mail_lite_bounce_notif (user_id, notification_count, notification_time) + insert into acs_mail_lite_bounce_notif (party_id, notification_count, notification_time) select party_id, 0 as notification_count, date_trunc('day', current_timestamp - to_interval(1 + :notification_interval, 'days')) as notification_time @@ -21,7 +21,7 @@ select u.user_id, u.email, u.first_names || ' ' || u.last_name as name from cc_users u, acs_mail_lite_bounce_notif n - where u.user_id = n.user_id + where u.user_id = n.party_id and u.email_bouncing_p = 't' and n.notification_time < current_timestamp - to_interval(:notification_interval, 'days') and n.notification_count < :max_notification_count @@ -35,7 +35,7 @@ update acs_mail_lite_bounce_notif set notification_time = date_trunc('day',current_timestamp), notification_count = notification_count + 1 - where user_id = :user_id + where party_id = :user_id