Commit 39ab7e34 authored by Frank Bergmann's avatar Frank Bergmann

- Upgrade to V4.0

parent 5e590d6c
......@@ -2,38 +2,53 @@
<!-- Generated by the OpenACS Package Manager -->
<package key="acs-mail-lite" url="http://openacs.org/repository/apm/packages/acs-mail-lite" type="apm_service">
<license>GPL V2.0 or any later version</license>
<package-name>Mail Services Lite</package-name>
<pretty-plural>Mail Services Lite</pretty-plural>
<initial-install-p>f</initial-install-p>
<initial-install-p>t</initial-install-p>
<singleton-p>t</singleton-p>
<implements-subsite-p>f</implements-subsite-p>
<inherit-templates-p>t</inherit-templates-p>
<version name="0.7a" url="http://openacs.org/repository/download/apm/acs-mail-lite-0.7a.apm">
<owner url="mailto:eric@openforce.biz">Eric Lorenzo</owner>
<version name="5.6.0" url="http://openacs.org/repository/download/apm/acs-mail-lite-5.6.0.apm">
<owner url="mailto:malte.sussdorff@cognovis.de">Malte Sussdorff</owner>
<owner url="mailto:timo@studio-k4.de">Timo Hentschel</owner>
<summary>Simplified reliable email transmission with bounce management.</summary>
<release-date>2004-01-14</release-date>
<description format="text/html">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.</description>
<release-date>2010-06-17</release-date>
<vendor url="http://www.openacs.org">OpenACS</vendor>
<description format="text/html">This package provides a service for sending messages, queueing messages in the database to ensure reliable sending and make sending a message 'transactional'. Replacement for acs-mail.</description>
<maturity>2</maturity>
<provides url="acs-mail-lite" version="0.7a"/>
<provides url="acs-mail-lite" version="5.6.0"/>
<requires url="acs-kernel" version="5.6.0"/>
<requires url="acs-service-contract" version="5.6.0"/>
<requires url="acs-tcl" version="5.6.0"/>
<callbacks>
<callback type="before-uninstall" proc="acs_mail_lite::before_uninstall"/>
<callback type="after-install" proc="acs_mail_lite::after_install"/>
<callback type="after-upgrade" proc="acs_mail_lite::after_upgrade"/>
</callbacks>
<parameters>
<parameter datatype="string" min_n_values="1" max_n_values="1" name="BounceDomain" description="Email Domain for outgoing messages" section_name="email"/>
<parameter datatype="string" min_n_values="1" max_n_values="1" name="BounceMailDir" description="Location of the maildir location that accepts incoming bounces" section_name="email"/>
<parameter datatype="number" min_n_values="1" max_n_values="1" name="BounceScanQueue" default="120" description="How often (in seconds) to scan for new bounces" section_name="email"/>
<parameter datatype="string" min_n_values="1" max_n_values="1" name="EmailAllow" description="Tcl list of email addresses that are allowed to receive messages when delivery mode is set to filter" section_name="rollout_support"/>
<parameter datatype="string" min_n_values="1" max_n_values="1" name="EmailDeliveryMode" default="default" description="Set how message will be delivered. default: Email messages are sent in the usual manner. log: Email messages are written to the server's error log. redirect: Email messages are redirected to the addresses specified by the EmailRedirectTo parameter. If this list is absent or empty, email messages are written to the server's error log. filter: Email messages are sent to in the usual manner if the recipient appears in the EmailAllow parameter, otherwise they are logged." section_name="rollout_support"/>
<parameter datatype="string" min_n_values="1" max_n_values="1" name="EmailRedirectTo" description="Tcl list of email addresses to redirect to" section_name="rollout_support"/>
<parameter datatype="string" min_n_values="1" max_n_values="1" name="EnvelopePrefix" default="bounce" description="The prefix for sending mail that will be handled by this instance" section_name="email"/>
<parameter datatype="string" min_n_values="1" max_n_values="1" name="FixedFont" description="Font definition (after the font tag) that will always be wrapped around HTML e-mail. Example: face=Verdana size=2. Default is empty" section_name="email"/>
<parameter datatype="string" min_n_values="1" max_n_values="1" name="FixedSenderEmail" description="Email addres that will be always the email stored in the sender. Default is empty" section_name="email"/>
<parameter datatype="number" min_n_values="1" max_n_values="1" name="FolderID" description="Folder ID of a folder in the content repository that contains files that can be included using checkboxes in each e-mail send out of the system. This effects /lib/email" section_name="email"/>
<parameter datatype="string" min_n_values="1" max_n_values="1" name="MMEncodeBin" default="/usr/bin/mmencode" description="Location of mmencode executable." section_name="email"/>
<parameter datatype="number" min_n_values="1" max_n_values="1" name="MaxBounceCount" default="10" description="Number of bounced emails after resulting in disabling an email-address" section_name="email"/>
<parameter datatype="number" min_n_values="1" max_n_values="1" name="MaxDaysToBounce" default="2" description="Number of days after mail sending a bounce is expected at the very latest" section_name="email"/>
<parameter datatype="number" min_n_values="1" max_n_values="1" name="MaxNotificationCount" default="4" description="Number of times the user will get a notification that his email got disabled in the system" section_name="email"/>
<parameter datatype="string" min_n_values="1" max_n_values="1" name="MMEncodeBin" default="/usr/bin/mmencode" description="Location of mmencode executable." section_name="email"/>
<parameter datatype="number" min_n_values="1" max_n_values="1" name="NotificationInterval" default="7" description="Number of days the users with bouncing email will be notified again on how to reenable the email again" section_name="email"/>
<parameter datatype="string" min_n_values="1" max_n_values="1" name="NotificationSender" default="reminder@openacs.org" description="Sender of the notification email" section_name="email"/>
<parameter datatype="string" min_n_values="1" max_n_values="1" name="NotificationSender" description="Sender of the notification email" section_name="email"/>
<parameter datatype="string" min_n_values="1" max_n_values="1" name="SMTPHost" default="localhost" description="SMTP Host to be used for sending emails" section_name="SMTP"/>
<parameter datatype="string" min_n_values="1" max_n_values="1" name="SMTPPassword" description="SMTP Password to be used for sending emails" section_name="SMTP"/>
<parameter datatype="number" min_n_values="1" max_n_values="1" name="SMTPPort" default="25" description="SMTP Port to be used for sending emails" section_name="SMTP"/>
<parameter datatype="number" min_n_values="1" max_n_values="1" name="SMTPTimeout" default="60" description="SMTP Timeout. Waiting time until we give up with the mailserver." section_name="SMTP"/>
<parameter datatype="string" min_n_values="1" max_n_values="1" name="SMTPUser" description="SMTP User to be used for sending emails" section_name="SMTP"/>
<parameter datatype="number" min_n_values="1" max_n_values="1" name="send_immediately" default="0" description="Boolean value to say whether new mails should be send out immediately or stored in the db before send out." section_name="email"/>
<parameter datatype="string" min_n_values="1" max_n_values="1" name="SendmailBin" default="/usr/sbin/sendmail" description="Location of sendmail binary on your system (Set to SMTP to use SMTP server)" section_name="email"/>
</parameters>
</version>
......
......@@ -7,28 +7,38 @@
create sequence acs_mail_lite_id_seq;
create table acs_mail_lite_queue (
message_id integer
constraint acs_mail_lite_queue_pk
primary key,
to_addr varchar(400),
from_addr varchar(200),
subject varchar(200),
body clob,
extra_headers clob,
bcc clob,
package_id integer
constraint acs_mail_lite_queue_pck_fk
references apm_packages,
valid_email_p varchar2(1)
constraint acs_mail_lite_qu_valid_em_p_ck
check (valid_email_p in ('t','f'))
CREATE TABLE acs_mail_lite_queue (
message_id integer
constraint acs_mail_lite_queue_pk
PRIMARY KEY,
creation_date varchar(4000),
locking_server varchar(4000),
to_addr varchar(4000),
cc_addr clob,
bcc_addr clob,
from_addr varchar(400),
reply_to varchar(400),
subject varchar(4000),
body clob,
package_id integer
constraint amlq_package_id_fk
references apm_packages,
file_ids varchar(4000),
mime_type varchar(200),
object_id integer,
no_callback_p char(1)
constraint amlq_no_callback_p_ck
check (no_callback_p in ('t','f')),
extraheaders clob,
use_sender_p char(1)
constraint amlq_use_sender_p_ck
check (use_sender_p in ('t','f'))
);
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 acmlml_party_id_fk
references parties (party_id)
on delete cascade
constraint acs_mail_lite_log_pk
primary key,
......@@ -37,9 +47,9 @@ create table acs_mail_lite_mail_log (
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 acmlb_party_id_fk
references parties (party_id)
on delete cascade
constraint acs_mail_lite_bou_pk
primary key,
......@@ -48,12 +58,13 @@ create table acs_mail_lite_bounce (
create table acs_mail_lite_bounce_notif (
user_id integer
constraint acs_mail_li_bou_notif_us_id_fk
references users (user_id)
party_id integer
constraint amlbn_party_id_fk
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
);
......@@ -7,3 +7,6 @@
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;
......@@ -5,75 +5,61 @@
-- @version $Id$
--
create sequence acs_mail_lite_id_seq;
CREATE TABLE acs_mail_lite_queue (
message_id integer
constraint acs_mail_lite_queue_pk
primary key,
creation_date text,
locking_server text,
to_addr text,
cc_addr text,
bcc_addr text,
from_addr text,
reply_to text,
subject text,
body text,
package_id integer
constraint amlq_package_id_fk
references apm_packages,
file_ids text,
mime_type text,
object_id integer,
no_callback_p boolean,
extraheaders text,
use_sender_p boolean
);
create table acs_mail_lite_mail_log (
party_id integer
constraint amlml_party_id_fk
references parties (party_id)
on delete cascade
constraint acs_mail_lite_log_pk
primary key,
last_mail_date timestamptz default current_timestamp
);
create or replace function inline_0 ()
returns integer as '
DECLARE
row RECORD;
v_count integer;
BEGIN
select count(*) into v_count from user_tab_columns
where lower(table_name) = ''acs_mail_lite_queue'';
IF v_count > 0 THEN return 0; END IF;
create sequence acs_mail_lite_id_seq;
create table acs_mail_lite_queue (
message_id integer
constraint acs_mail_lite_queue_pk
primary key,
to_addr text,
from_addr varchar(200),
subject varchar(200),
body text,
extra_headers text,
bcc text,
package_id integer
constraint acs_mail_lite_queue_pck_fk
references apm_packages,
valid_email_p boolean
);
create table acs_mail_lite_mail_log (
user_id integer
constraint acs_mail_lite_log_user_id_fk
references users (user_id)
on delete cascade
constraint acs_mail_lite_log_pk
primary key,
last_mail_date timestamptz default current_timestamp
);
create table acs_mail_lite_bounce (
user_id integer
constraint acs_mail_lite_bou_user_id_fk
references users (user_id)
on delete cascade
constraint acs_mail_lite_bou_pk
primary key,
bounce_count integer default 1
);
create table acs_mail_lite_bounce_notif (
user_id integer
constraint acs_mail_li_bou_notif_us_id_fk
references users (user_id)
on delete cascade
constraint acs_mail_lite_notif_pk
primary key,
notification_time timestamptz default current_timestamp,
notification_count integer default 0
);
create table acs_mail_lite_bounce (
party_id integer
constraint amlb_party_id_fk
references parties (party_id)
on delete cascade
constraint acs_mail_lite_bou_pk
primary key,
bounce_count integer default 1
);
return 0;
END;' language 'plpgsql';
select inline_0 ();
drop function inline_0 ();
create table acs_mail_lite_bounce_notif (
party_id integer
constraint amlbn_party_id_fk
references parties (party_id)
on delete cascade
constraint acs_mail_lite_bounce_notif_pk
primary key,
notification_time timestamptz default current_timestamp,
notification_count integer default 0
);
......@@ -9,4 +9,4 @@ 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;
\ No newline at end of file
drop table acs_mail_lite_bounce_notif;
......@@ -8,25 +8,29 @@ ad_library {
}
# Initialize global "variables"
# Default interval is about one minute (reduce lock contention with other jobs scheduled at full minutes)
ad_schedule_proc -thread t 61 acs_mail_lite::sweeper
set queue_dir [parameter::get_from_package_key -parameter "BounceMailDir" -package_key "acs-mail-lite"]
if {$queue_dir ne ""} {
# if BounceMailDir is set then handle incoming mail
ad_schedule_proc -thread t 120 acs_mail_lite::load_mails -queue_dir $queue_dir
}
# check every few minutes for bounces
#ad_schedule_proc -thread t [acs_mail_lite::get_parameter -name BounceScanQueue -default 120] acs_mail_lite::scan_replies
nsv_set acs_mail_lite send_mails_p 0
nsv_set acs_mail_lite check_bounce_p 0
# ad_schedule_proc -thread t -schedule_proc ns_schedule_daily [list 0 25] acs_mail_lite::check_bounces
# Schedule processing outgoing mails
set sweeper_interval 120
ad_schedule_proc -thread t $sweeper_interval acs_mail_lite::sweeper
# Schedule processing incoming mails
set queue_interval 120
set queue_dir [acs_mail_lite::get_parameter -name BounceMailDir]
ad_schedule_proc -thread t $queue_interval acs_mail_lite::load_mails -queue_dir $queue_dir
# Redefine ns_sendmail as a wrapper for acs_mail_lite::send
# Schedule for replies
set reply_interval 120
ad_schedule_proc -thread t $reply_interval acs_mail_lite::scan_replies
# Schedule checking for bounces
set bounce_interval [acs_mail_lite::get_parameter -name BounceScanQueue -default 120]
ad_schedule_proc -thread t -schedule_proc ns_schedule_daily [list 0 25] acs_mail_lite::check_bounces
ns_log Notice "acs-mail-lite: renaming acs_mail_lite::sendmail to ns_sendmail"
rename ns_sendmail _old_ns_sendmail
rename acs_mail_lite::sendmail ns_sendmail
......@@ -3,63 +3,46 @@
<queryset>
<rdbms><type>oracle</type><version>8.1.6</version></rdbms>
<fullquery name="acs_mail_lite::check_bounces.send_notification_to_bouncing_email">
<querytext>
insert into acs_mail_lite_bounce_notif
(user_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
where bounce_count >= :max_bounce_count)
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::check_bounces.get_recent_bouncing_users">
<querytext>
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
and u.email_bouncing_p = 't'
and n.notification_time < sysdate - :notification_interval
and n.notification_count < :max_notification_count
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::check_bounces.log_notication_sending">
<querytext>
update acs_mail_lite_bounce_notif
set notification_time = trunc(sysdate),
notification_count = notification_count + 1
where user_id = :user_id
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::check_bounces.delete_log_if_no_recent_bounce">
<querytext>
delete from acs_mail_lite_bounce
where user_id in (select user_id
from acs_mail_lite_mail_log
where last_mail_date < sysdate - :max_days_to_bounce)
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::send.create_queue_entry">
<querytext>
insert into acs_mail_lite_queue
(message_id, to_addr, from_addr, subject, body, extra_headers, bcc,
package_id, valid_email_p)
insert into acs_mail_lite_queue
(message_id,
creation_date,
locking_server,
to_addr,
from_addr,
reply_to,
subject,
package_id,
file_ids,
mime_type,
no_callback_p,
use_sender_p,
cc_addr,
bcc_addr,
body,
extraheaders,
object_id
)
values
(acs_mail_lite_id_seq.nextval, :to_addr, :from_addr, :subject, :body,
:eh_list, :bcc, :package_id, decode(:valid_email_p,'1','t','f'))
(acs_mail_lite_id_seq.nextval,
:creation_date,
:locking_server,
:to_addr,
:from_addr,
:reply_to,
:subject,
:package_id,
:file_ids,
:mime_type,
decode(:no_callback_p,'1','t','f'),
decode(:use_sender_p,'1','t','f'),
:cc_addr,
:bcc_addr,
:body,
:extraheaders,
:object_id
)
</querytext>
</fullquery>
......@@ -68,7 +51,7 @@
update acs_mail_lite_mail_log
set last_mail_date = sysdate
where user_id = :user_id
where party_id = :user_id
</querytext>
</fullquery>
......@@ -76,36 +59,34 @@
<fullquery name="acs_mail_lite::log_mail_sending.insert_log_entry">
<querytext>
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)
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::sweeper.get_queued_messages">
<querytext>
select message_id,
select
message_id as id,
creation_date,
locking_server,
to_addr,
cc_addr,
bcc_addr,
from_addr,
reply_to,
subject,
body,
extra_headers,
bcc,
package_id,
decode(valid_email_p,'t',1,0) as valid_email_p
file_ids,
mime_type,
decode(no_callback_p,'t',1,0) as no_callback_p,
extraheaders,
decode(use_sender_p,'t',1,0) as use_sender_p,
object_id
from acs_mail_lite_queue
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::send_immediately.create_queue_entry">
<querytext>
insert into acs_mail_lite_queue
(message_id, to_addr, from_addr, subject, body, extra_headers, bcc,
package_id, valid_email_p)
values
(acs_mail_lite_id_seq.nextval, :to_addr, :from_addr, :subject, :body,
:extraheaders, :bcc, :package_id, decode(:valid_email_p,'1','t','f'))
where locking_server = '' or locking_server is NULL
</querytext>
</fullquery>
......
......@@ -3,62 +3,46 @@
<queryset>
<rdbms><type>postgresql</type><version>7.1</version></rdbms>
<fullquery name="acs_mail_lite::check_bounces.send_notification_to_bouncing_email">
<querytext>
insert into acs_mail_lite_bounce_notif (user_id, notification_count, notification_time)
select user_id, 0 as notification_count,
date_trunc('day', current_timestamp - to_interval(1 + :notification_interval, 'days'))
as notification_time
from acs_mail_lite_bounce
where bounce_count >= :max_bounce_count
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::check_bounces.get_recent_bouncing_users">
<querytext>
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
and u.email_bouncing_p = 't'
and n.notification_time < current_timestamp - to_interval(:notification_interval, 'days')
and n.notification_count < :max_notification_count
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::check_bounces.log_notication_sending">
<querytext>
update acs_mail_lite_bounce_notif
set notification_time = date_trunc('day',current_timestamp),
notification_count = notification_count + 1
where user_id = :user_id
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::check_bounces.delete_log_if_no_recent_bounce">
<querytext>
delete from acs_mail_lite_bounce
where user_id in (select user_id
from acs_mail_lite_mail_log
where last_mail_date < current_timestamp - to_interval(:max_days_to_bounce, 'days'))
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::send.create_queue_entry">
<querytext>
insert into acs_mail_lite_queue
(message_id, to_addr, from_addr, subject, body, extra_headers, bcc, package_id, valid_email_p)
insert into acs_mail_lite_queue
(message_id,
creation_date,
locking_server,
to_addr,
cc_addr,
bcc_addr,
from_addr,
reply_to,
subject,
body,
package_id,
file_ids,
mime_type,
no_callback_p,
extraheaders,
use_sender_p,
object_id
)
values
(nextval('acs_mail_lite_id_seq'), :to_addr, :from_addr, :subject, :body, :eh_list, :bcc, :package_id,
(case when :valid_email_p = '1' then TRUE else FALSE end))
(nextval('acs_mail_lite_id_seq'),
:creation_date,
:locking_server,
:to_addr,
:cc_addr,
:bcc_addr,
:from_addr,
:reply_to,
:subject,
:body,
:package_id,
:file_ids,
:mime_type,
(case when :no_callback_p = '1' then TRUE else FALSE end),
:extraheaders,
(case when :use_sender_p = '1' then TRUE else FALSE end),
:object_id
)
</querytext>
</fullquery>
......@@ -68,7 +52,7 @@
update acs_mail_lite_mail_log
set last_mail_date = current_timestamp
where user_id = :user_id
where party_id = :user_id
</querytext>
</fullquery>
......@@ -76,43 +60,35 @@
<fullquery name="acs_mail_lite::log_mail_sending.insert_log_entry">
<querytext>
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)
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::sweeper.get_queued_messages">
<querytext>
select message_id,
select
message_id as id,
creation_date,
locking_server,
to_addr,
cc_addr,
bcc_addr,
from_addr,
reply_to,
subject,
body,
extra_headers,
bcc,
package_id,
(case when valid_email_p = TRUE then 1
else 0
end) as valid_email_p
file_ids,
mime_type,
(case when no_callback_p = TRUE then 1 else 0 end) as no_callback_p,
extraheaders,
(case when use_sender_p = TRUE then 1 else 0 end) as use_sender_p,
object_id
from acs_mail_lite_queue
where locking_server = '' or locking_server is NULL
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::send_immediately.create_queue_entry">
<querytext>
insert into acs_mail_lite_queue
(message_id, to_addr, from_addr, subject, body, extra_headers, bcc,
package_id, valid_email_p)
values
(nextval('acs_mail_lite_id_seq'), :to_addr, :from_addr, :subject, :body,
:extraheaders, :bcc, :package_id,
(case when :valid_email_p = '1' then TRUE
else FALSE end))
</querytext>
</fullquery>
</queryset>
This diff is collapsed.
<?xml version="1.0"?>
<queryset>
<fullquery name="acs_mail_lite::bouncing_email_p.bouncing_p">
<querytext>
select case when email_bouncing_p = 't' then 1 else 0 end
as send_p
from cc_users
where lower(email) = lower(:email)
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::bouncing_user_p.bouncing_p">
<querytext>
select case when email_bouncing_p = 't' then 1 else 0 end
as send_p
from cc_users
where user_id = :user_id
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::log_mail_sending.record_mail_sent">
<querytext>
update acs_mail_lite_mail_log
set last_mail_date = sysdate
where user_id = :user_id
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::log_mail_sending.insert_log_entry">
<querytext>
insert into acs_mail_lite_mail_log (user_id, last_mail_date)
values (:user_id, sysdate)
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::load_mail_dir.record_bounce">
<querytext>
update acs_mail_lite_bounce
set bounce_count = bounce_count + 1
where user_id = :user_id
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::load_mail_dir.insert_bounce">
<querytext>
insert into acs_mail_lite_bounce (user_id, bounce_count)
values (:user_id, 1)
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::check_bounces.delete_log_if_no_recent_bounce">
<querytext>
delete from acs_mail_lite_bounce
where user_id in (select user_id
from acs_mail_lite_mail_log
where last_mail_date < sysdate - :max_days_to_bounce)
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::check_bounces.disable_bouncing_email">
<querytext>
update users
set email_bouncing_p = 't'
where user_id in (select user_id
from acs_mail_lite_bounce
where bounce_count >= :max_bounce_count)
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::check_bounces.delete_bouncing_users_from_log">
<querytext>
delete from acs_mail_lite_bounce
where bounce_count >= :max_bounce_count
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::get_address_array.get_user_name_and_id">
<querytext>
select user_id, first_names || ' ' || last_name as user_name
from cc_users
select person_id as user_id, first_names || ' ' || last_name as user_name
from parties, persons
where email = :email
and party_id = person_id
order by party_id desc
limit 1
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::sweeper.delete_queue_entry">
<fullquery name="acs_mail_lite::sweeper.get_queued_message">
<querytext>
delete
select message_id as id
from acs_mail_lite_queue
where message_id = :message_id
where message_id=:id and (locking_server = '' or locking_server is NULL)
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::sweeper.lock_queued_message">
<querytext>
update acs_mail_lite_queue
set locking_server = :locking_server
where message_id=:id
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::sweeper.delete_queue_entry">
<querytext>
delete from acs_mail_lite_queue
where message_id=:id
</querytext>
</fullquery>
<fullquery name="acs_mail_lite::send_immediately.get_file_info">
<querytext>
select r.mime_type,r.title, r.content as filename, i.name
from cr_revisions r, cr_items i
where r.revision_id = i.latest_revision
and i.item_id in ([join $item_ids ","])
</querytext>
</fullquery>
</queryset>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment