Displaying 2 results from an estimated 2 matches for "merge_quota".
2015 Oct 16
0
quotas configuration a few questions
...T NULL,
created timestamp with time zone DEFAULT now()
);
CREATE TABLE vdomain (
domain text NOT NULL
);
CREATE TABLE quota (
username varchar(100) not null,
bytes bigint not null default 0,
messages integer not null default 0,
primary key (username)
);
CREATE OR REPLACE FUNCTION merge_quota() RETURNS TRIGGER AS $$
BEGIN
IF NEW.messages < 0 OR NEW.messages IS NULL THEN
-- ugly kludge: we came here from this function, really do try to insert
IF NEW.messages IS NULL THEN
NEW.messages = 0;
ELSE
NEW.messages = -NEW.messages;
END IF;
return NEW;
END IF...
2009 Jul 20
1
Problem with quota-dict
...,
"current" integer,
CONSTRAINT quota_pkey PRIMARY KEY (username, path)
)
WITH (OIDS=FALSE);
ALTER TABLE quota OWNER TO mail;
-- Trigger: mergequota on quota
-- DROP TRIGGER mergequota ON quota;
CREATE TRIGGER mergequota
BEFORE INSERT
ON quota
FOR EACH ROW
EXECUTE PROCEDURE merge_quota();
connect = host=localhost dbname=mail user=dovecot password=jianueyeePeev5o
table = quota
select_field = current
where_field = path
username_field = username
My dovecot logfile with mail_debug=yes:
Jul 20 21:06:17 skippy dovecot: Dovecot v1.0.15 starting up
Jul 20 21:06:17 skippy dovecot: auth(...