OpenBSD CVS

CVS log for src/usr.sbin/smtpd/Attic/queue_fsqueue.c


[BACK] Up to [local] / src / usr.sbin / smtpd

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.65, Fri Jul 19 20:37:07 2013 UTC (10 years, 10 months ago) by eric
Branch: MAIN
CVS Tags: HEAD
Changes since 1.64: +1 -1 lines
FILE REMOVED

Assorted queue improvements:
- cleanup the internal queue backend API and get rid of the QOP_* thing.
- implement a queue_proc backend
- rename queue_fsqueue.c to queue_fs
- enable support for queue encryption
- add an envelope cache
- better logging and error reporting

Revision 1.64 / (download) - annotate - [select for diffs], Fri Jul 19 15:09:40 2013 UTC (10 years, 10 months ago) by eric
Branch: MAIN
Changes since 1.63: +6 -2 lines
Diff to previous 1.63 (colored)

need to create the incoming directory

Revision 1.63 / (download) - annotate - [select for diffs], Fri Jul 19 11:14:08 2013 UTC (10 years, 10 months ago) by eric
Branch: MAIN
Changes since 1.62: +4 -4 lines
Diff to previous 1.62 (colored)

Get rid of env->sc_pw and env->sc_pwqueue.  Early queue initialization
now happens in queue_init(), and backends take the queue passwd as
parameter in their init function.

Remove useless SMTPD_FILTER_USER while there.

Revision 1.62 / (download) - annotate - [select for diffs], Fri May 24 17:03:14 2013 UTC (11 years ago) by eric
Branch: MAIN
Changes since 1.61: +33 -29 lines
Diff to previous 1.61 (colored)

sync with OpenSMTPD 5.3.2

ok gilles@

Revision 1.61 / (download) - annotate - [select for diffs], Tue Apr 2 09:17:14 2013 UTC (11 years, 2 months ago) by gilles
Branch: MAIN
Changes since 1.60: +3 -3 lines
Diff to previous 1.60 (colored)

change log format to fix warning

Revision 1.60 / (download) - annotate - [select for diffs], Sun Mar 31 14:42:21 2013 UTC (11 years, 2 months ago) by gilles
Branch: MAIN
Changes since 1.59: +2 -2 lines
Diff to previous 1.59 (colored)

ooops, forgot to lower the define after my very last test: it's 10% not 99%

Revision 1.59 / (download) - annotate - [select for diffs], Sat Mar 30 10:41:03 2013 UTC (11 years, 2 months ago) by gilles
Branch: MAIN
Changes since 1.58: +47 -1 lines
Diff to previous 1.58 (colored)

have smtpd temporarily refuse new messages if file system holding the queue
has less than 10% of disk space or inodes left. a warning is logged and the
clients will get a temporarily failure asking them to retry later.

prompted by deraadt@

Revision 1.58 / (download) - annotate - [select for diffs], Thu Jan 31 18:34:43 2013 UTC (11 years, 4 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.57: +13 -4 lines
Diff to previous 1.57 (colored)

assorted fixes spotted by Coverity.
some log message updates.

ok gilles@

Revision 1.57 / (download) - annotate - [select for diffs], Sat Jan 26 09:37:23 2013 UTC (11 years, 4 months ago) by gilles
Branch: MAIN
Changes since 1.56: +191 -107 lines
Diff to previous 1.56 (colored)

Sync with our smtpd repo:

* first bricks of ldap and sqlite support (not finished but both working)
* new table API to replace map API, all lookups are done through tables
* improved handling of temporary errors throughout the daemon
* improved scheduler and mta logic: connection reuse, optimizes batches
* improved queue: more tolerant to admin errors, new layout, less disk-IO
* improved memory usage under high load
* SSL certs/keys isolated to lookup process to avoid facing network
* VIRTUAL support improved, fully virtual setups possible now
* runtime tracing of processes through smtpctl trace
* ssl_privsep.c sync-ed with relayd
* ssl.c no longer contains smtpd specific interfaces
* smtpd-specific ssl bits moved to ssl_smtpd.c
* update mail address in copyright

FLUSH YOUR QUEUE. FLUSH YOUR QUEUE. FLUSH YOUR QUEUE. FLUSH YOUR QUEUE.

smtpd.conf(5) simplified, it will require adaptations

ok eric@

Revision 1.56 / (download) - annotate - [select for diffs], Fri Nov 23 09:25:44 2012 UTC (11 years, 6 months ago) by eric
Branch: MAIN
Changes since 1.55: +55 -55 lines
Diff to previous 1.55 (colored)

Replace the qwalk API (to retreive on disk envelopes at runtime) with
a simple QOP_WALK queue operation. Some knf and formating fixes while
there.

ok gilles@

Revision 1.55 / (download) - annotate - [select for diffs], Mon Nov 12 14:58:53 2012 UTC (11 years, 6 months ago) by eric
Branch: MAIN
Changes since 1.54: +7 -7 lines
Diff to previous 1.54 (colored)

Cleanups and improvements:

* Log more events (especially client session) and use a better scheme
  for that: each messages is prefixed with a token to easily identify
  its class:
    - info/warn/debug: general server messages
    - smtp-in: smtp client connections
    - relay: status update for relayed messages
    - delivery: status update for local deliveries

* Implement "smtpctl monitor" to display updates of selected internal
  counters.

* When reloading the on-disk queue at startup do not commit a message
  if no envelope was submitted for that message.

* Remove unused stuff in the config parser.

ok gilles@

Revision 1.54 / (download) - annotate - [select for diffs], Mon Oct 22 21:58:14 2012 UTC (11 years, 7 months ago) by chl
Branch: MAIN
Changes since 1.53: +7 -8 lines
Diff to previous 1.53 (colored)

switch from {open,read,close}() to {fopen,fread,fclose}() in fsqueue_envelope_load(),
also fix a potential fd leak.

ok gilles@ eric@

Revision 1.53 / (download) - annotate - [select for diffs], Thu Aug 30 18:19:50 2012 UTC (11 years, 9 months ago) by eric
Branch: MAIN
Changes since 1.52: +10 -1 lines
Diff to previous 1.52 (colored)

when reloading the envelopes from disk, skip envelopes that are
more recent than the startup time, since they are already known
to the scheduler.

ok gilles@

Revision 1.52 / (download) - annotate - [select for diffs], Sun Aug 26 17:08:41 2012 UTC (11 years, 9 months ago) by eric
Branch: MAIN
Changes since 1.51: +68 -125 lines
Diff to previous 1.51 (colored)

sane rewrite of the disk-queue traversal code, and log bogus files found
in there.  fixes issues reported by many.

ok gilles@

Revision 1.51 / (download) - annotate - [select for diffs], Fri Aug 24 13:13:13 2012 UTC (11 years, 9 months ago) by chl
Branch: MAIN
Changes since 1.50: +29 -37 lines
Diff to previous 1.50 (colored)

Don't pass struct envelope pointer in queue backend API, instead use envelope id and
an envelope ascii buffer.

ok eric@ gilles@

Revision 1.50 / (download) - annotate - [select for diffs], Fri Aug 24 10:07:28 2012 UTC (11 years, 9 months ago) by eric
Branch: MAIN
Changes since 1.49: +22 -12 lines
Diff to previous 1.49 (colored)

When creating an envelope, check if the message is incoming or
queued to decide the path for the envelope. Remove the need to
check the envelope type.

ok gilles@ chl@

Revision 1.49 / (download) - annotate - [select for diffs], Sun Aug 19 14:16:58 2012 UTC (11 years, 9 months ago) by chl
Branch: MAIN
Changes since 1.48: +21 -21 lines
Diff to previous 1.48 (colored)

coding style: replace all occurences of u_int* with uint*

ok eric@

Revision 1.48 / (download) - annotate - [select for diffs], Sun Aug 19 10:32:32 2012 UTC (11 years, 9 months ago) by chl
Branch: MAIN
Changes since 1.47: +43 -26 lines
Diff to previous 1.47 (colored)

Kill envelope_{dump,load}_file() and replace them with envelope_{dump,load}_buffer().

with input from eric@

ok eric@

Revision 1.47 / (download) - annotate - [select for diffs], Wed Aug 8 17:31:55 2012 UTC (11 years, 9 months ago) by eric
Branch: MAIN
Changes since 1.46: +2 -6 lines
Diff to previous 1.46 (colored)

cleanup some old debug traces

ok gilles@ chl@

Revision 1.46 / (download) - annotate - [select for diffs], Tue Jul 10 23:21:34 2012 UTC (11 years, 10 months ago) by chl
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.45: +30 -12 lines
Diff to previous 1.45 (colored)

backout the:
- remove the /envelopes subdirectory, envelopes are at the same level than
  the message file
- kill PATH_ENVELOPES define

but keep the:
- reduce the number of buckets from 0xfff to 0xff, this avoid performances
  of the queue to decrease when we start having tons of buckets

ok eric@ gilles@

Revision 1.45 / (download) - annotate - [select for diffs], Mon Jul 9 08:08:29 2012 UTC (11 years, 10 months ago) by gilles
Branch: MAIN
Changes since 1.44: +18 -36 lines
Diff to previous 1.44 (colored)

first step of simplifying fsqueue:

- remove the /envelopes subdirectory, envelopes are at the same level than
  the message file
- kill PATH_ENVELOPES define
- reduce the number of buckets from 0xfff to 0xff, this avoid performances
  of the queue to decrease when we start having tons of buckets

this diff introduces a change to the queue layout, you will want to empty
your queue before updating. more cleanup to come

ok eric@, ok chl@

Revision 1.44 / (download) - annotate - [select for diffs], Sun Jul 8 18:13:08 2012 UTC (11 years, 10 months ago) by chl
Branch: MAIN
Changes since 1.43: +73 -117 lines
Diff to previous 1.43 (colored)

remove enum queue_kind from queue_fsqueue.c.
incoming messages are now always stored in /incoming, whatever the queue_backend is.
remove QOP_FD_RW and fsqueue_message_fd_rw().
while there check return value of generated paths before calling rmtree()

with advice from gilles@ and eric@

ok gilles@ eric@

Revision 1.43 / (download) - annotate - [select for diffs], Mon Jul 2 13:22:14 2012 UTC (11 years, 11 months ago) by eric
Branch: MAIN
Changes since 1.42: +16 -18 lines
Diff to previous 1.42 (colored)

make backend functions static.

ok gilles@

Revision 1.42 / (download) - annotate - [select for diffs], Wed Jun 20 20:45:23 2012 UTC (11 years, 11 months ago) by eric
Branch: MAIN
Changes since 1.41: +52 -84 lines
Diff to previous 1.41 (colored)

Finally get rid of the queue_kind enum in the queue API. Keep that
internally in fsqueue backend for now, and let the fsqueue_message()
and fsqueue_envelope() dispatchers do the right thing.

Based on a diff by chl@

ok chl@ gilles@

Revision 1.41 / (download) - annotate - [select for diffs], Fri Jun 1 11:42:34 2012 UTC (12 years ago) by eric
Branch: MAIN
Changes since 1.40: +2 -10 lines
Diff to previous 1.40 (colored)

on envelope creation, setup and reset the relevant envelope fields in
the wrapper function rather than in individual backends.

ok gilles@

Revision 1.40 / (download) - annotate - [select for diffs], Fri Jun 1 09:24:58 2012 UTC (12 years ago) by eric
Branch: MAIN
Changes since 1.39: +3 -176 lines
Diff to previous 1.39 (colored)

move envelope dump/load functions to envelope.c

ok gilles@

Revision 1.39 / (download) - annotate - [select for diffs], Wed Mar 7 22:54:49 2012 UTC (12 years, 2 months ago) by gilles
Branch: MAIN
Changes since 1.38: +2 -7 lines
Diff to previous 1.38 (colored)

various reliability fixes:

- prevent queue_fsqueue from fatal() when it hits an ENOENT, it can happen
- change a bit the scheduler API to simplify it, fix runner accordingly

- we can't remove msg/batch from ramqueue while envelope is offloaded or
  it will cause a double, instead we add refcnt to both msg/batch and
  only free them when it hits 0

Revision 1.38 / (download) - annotate - [select for diffs], Tue Jan 31 21:05:26 2012 UTC (12 years, 4 months ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.37: +3 -1 lines
Diff to previous 1.37 (colored)

fix an issue observed this week-end while flooding ajacoutot@ :

we keep track of available fd's to prevent scheduling of messages if we
know that we are going to fail. however, since the envelope is not
removed from the scheduler, it will be rescheduled right away leading to
a busy loop in the scheduler. we know flag the mda/mta processes as BUSY
and do not schedule envelopes that target a BUSY process.

also, fix a potential bug that could lead to a use after free when doing
a batch/message/host traversal of schedulable envelopes.

while at it fix misuse of env->sc_opts as env->sc_flags, was not really
causing any issue as the misuse was constant ...

Revision 1.37 / (download) - annotate - [select for diffs], Sun Jan 29 16:54:13 2012 UTC (12 years, 4 months ago) by eric
Branch: MAIN
Changes since 1.36: +3 -3 lines
Diff to previous 1.36 (colored)

Remove message directories right away instead of moving them to purge/.
Prevent hitting dir entry limits when dealing with lots of mails.

ok gilles@

Revision 1.36 / (download) - annotate - [select for diffs], Sun Jan 29 10:40:05 2012 UTC (12 years, 4 months ago) by eric
Branch: MAIN
Changes since 1.35: +13 -5 lines
Diff to previous 1.35 (colored)

Quick fix to prevent two processes from using the same temporary
envelope file at the same time.

ok gilles@

Revision 1.35 / (download) - annotate - [select for diffs], Tue Jan 24 12:20:18 2012 UTC (12 years, 4 months ago) by eric
Branch: MAIN
Changes since 1.34: +6 -5 lines
Diff to previous 1.34 (colored)

Add a parameter to the queue backend init() call to specify wether the
call is issued by smtpd or smtpctl.  In the latter case, only perform
sanity checks and do not touch directories.  A running server no
longer lose its "incoming/" directory each time smtpctl is called...

ok gilles@

Revision 1.34 / (download) - annotate - [select for diffs], Sat Jan 14 19:35:31 2012 UTC (12 years, 4 months ago) by eric
Branch: MAIN
Changes since 1.33: +11 -1 lines
Diff to previous 1.33 (colored)

When moving a message to the corrupt/ directory, give it an alternate name
if there is already an entry with the same name.

ok gilles@ chl@

Revision 1.33 / (download) - annotate - [select for diffs], Sat Jan 14 12:56:49 2012 UTC (12 years, 4 months ago) by eric
Branch: MAIN
Changes since 1.32: +15 -23 lines
Diff to previous 1.32 (colored)

Change fsqueue_*_path() to report success or failure instead of
fatal(). Make sure at init time that all paths can contain envelopes,
then these calls will never fail (provided that buffers are always
correctly sized, which is true internally).

ok gilles@ chl@

Revision 1.32 / (download) - annotate - [select for diffs], Sat Jan 14 10:48:47 2012 UTC (12 years, 4 months ago) by eric
Branch: MAIN
Changes since 1.31: +8 -2 lines
Diff to previous 1.31 (colored)

When creating a new message (in incoming/) make sure that the msgid does not
already exist in queue/ to prevent possible collision on commit.

ok gilles@

Revision 1.31 / (download) - annotate - [select for diffs], Sat Jan 14 08:37:16 2012 UTC (12 years, 4 months ago) by eric
Branch: MAIN
Changes since 1.30: +42 -55 lines
Diff to previous 1.30 (colored)

Add a fsqueue_message_path() function to build path to message dir
and use it where appropriate.

ok gilles@ chl@

Revision 1.30 / (download) - annotate - [select for diffs], Fri Jan 13 22:01:23 2012 UTC (12 years, 4 months ago) by eric
Branch: MAIN
Changes since 1.29: +2 -5 lines
Diff to previous 1.29 (colored)

use a simpler way to get to the parent directory

ok gilles@

Revision 1.29 / (download) - annotate - [select for diffs], Fri Jan 13 21:58:35 2012 UTC (12 years, 4 months ago) by eric
Branch: MAIN
Changes since 1.28: +8 -68 lines
Diff to previous 1.28 (colored)

queue_message_purge() and queue_message_delete() are actually the same
thing. Remove queue_message_purge() in favor of queue_message_delete
and simplify fsqueue_message_delete() implementation to move the
message dir to purge/

ok gilles@

Revision 1.28 / (download) - annotate - [select for diffs], Thu Jan 12 17:00:56 2012 UTC (12 years, 4 months ago) by eric
Branch: MAIN
Changes since 1.27: +44 -80 lines
Diff to previous 1.27 (colored)

Add a fsqueue_envelope_dump_atomic() function that writes an envelope
to incoming/envelope.tmp before moving it to its final destination.
This allows to make sure that envelopes created directly in the queue
(such as bounces) can't let the queue in an inconsistent state if
the program stops in the middle of an envelope dump.

This also allow to simplify qwalk, since we don't put any temporary
contents anywhere in "walkable" queue dirs.

ok gilles@

Revision 1.27 / (download) - annotate - [select for diffs], Wed Jan 11 22:24:37 2012 UTC (12 years, 4 months ago) by gilles
Branch: MAIN
Changes since 1.26: +175 -1 lines
Diff to previous 1.26 (colored)

implement an envelope_ascii API that's not tied to a specific queue_backend
simplify queue_fsqueue

Revision 1.26 / (download) - annotate - [select for diffs], Wed Jan 11 17:46:36 2012 UTC (12 years, 4 months ago) by eric
Branch: MAIN
Changes since 1.25: +7 -20 lines
Diff to previous 1.25 (colored)

Simplify runner/queue by getting rid of Q_PURGE.  Instead, let smtpd
periodically clear the purge/ directory.  At init time, the fsqueue
backend simply moves the existing incoming/ dir in purge/ to discard
aborted sessions.

ok gilles@ chl@

Revision 1.25 / (download) - annotate - [select for diffs], Tue Dec 27 17:13:05 2011 UTC (12 years, 5 months ago) by eric
Branch: MAIN
Changes since 1.24: +3 -33 lines
Diff to previous 1.24 (colored)

Q_BOUNCE is not used anymore

ok gilles@

Revision 1.24 / (download) - annotate - [select for diffs], Fri Dec 23 12:10:06 2011 UTC (12 years, 5 months ago) by eric
Branch: MAIN
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

On envelope creation, get the message id in a saner way than the
current confusing hack.

ok gilles@

Revision 1.23 / (download) - annotate - [select for diffs], Thu Dec 22 18:41:30 2011 UTC (12 years, 5 months ago) by eric
Branch: MAIN
Changes since 1.22: +30 -25 lines
Diff to previous 1.22 (colored)

Add fqueue_envelope_path() function to create path to envelopes.

ok chl@ gilles@

Revision 1.22 / (download) - annotate - [select for diffs], Wed Dec 14 17:55:55 2011 UTC (12 years, 5 months ago) by eric
Branch: MAIN
Changes since 1.21: +10 -1 lines
Diff to previous 1.21 (colored)

make queue_fsqueue backend consistent with the backend scheme.

ok gilles@

Revision 1.21 / (download) - annotate - [select for diffs], Mon Nov 21 18:57:54 2011 UTC (12 years, 6 months ago) by eric
Branch: MAIN
Changes since 1.20: +4 -8 lines
Diff to previous 1.20 (colored)

get rid of the "enqueue/" queue; use "incoming/" instead.

ok gilles@ chl@

Revision 1.20 / (download) - annotate - [select for diffs], Tue Nov 15 23:12:44 2011 UTC (12 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.19: +12 -2 lines
Diff to previous 1.19 (colored)

wooooops defines missing from previous commit

Revision 1.19 / (download) - annotate - [select for diffs], Tue Nov 15 23:06:39 2011 UTC (12 years, 6 months ago) by gilles
Branch: MAIN
Changes since 1.18: +250 -24 lines
Diff to previous 1.18 (colored)

Qwalk, our API to linearly walk over the persistent queue, did not take the
queue_backend into account and assumed a filesystem with a specific layout.

This commit does plenty of things:

- make qwalk an abstraction in the queue_backend API, and impose queue
  drivers to implement qwalk_open(), qwalk() and qwalk_close();

- move previous qwalk_open(), qwalk() and qwalk_close() to the fsqueue
  driver since they were fsqueue specific ...

- make qwalk API work with msgid/evpid instead of pathnames since we're
  going to use the queue_backend API to load envelopes by evpid anyway;

- makes smtpd use *solely* the queue_backend API when manipulating the
  queue. pathnames were removed from smtpd.h and moved into the fsqueue
  which means we can now store a queue anywhere ... as long as we write
  the ten functions or so required for a queue driver ;-)

ok eric@, ok chl@

Revision 1.18 / (download) - annotate - [select for diffs], Mon Nov 14 11:53:10 2011 UTC (12 years, 6 months ago) by eric
Branch: MAIN
Changes since 1.17: +7 -116 lines
Diff to previous 1.17 (colored)

The spool and offline directories are backend-independent, so they
must be created early by smtpd, rather than in fsqueue.

ok gilles@ chl@

Revision 1.17 / (download) - annotate - [select for diffs], Sun Nov 6 16:57:27 2011 UTC (12 years, 6 months ago) by eric
Branch: MAIN
Changes since 1.16: +1 -7 lines
Diff to previous 1.16 (colored)

No need to save/restore the batch_id since the envelope is not dumped
as a structure anymore.

ok chl@ gilles@

Revision 1.16 / (download) - annotate - [select for diffs], Thu Oct 27 14:32:57 2011 UTC (12 years, 7 months ago) by chl
Branch: MAIN
Changes since 1.15: +6 -5 lines
Diff to previous 1.15 (colored)

Use PRI{x,d}64 in format strings instead of %llx, %lld or %qd to print {u_,}int64_t or time_t

While there, cast some time_t to int64_t

These will fix build warnings for portable smptd

ok gilles@ eric@

Revision 1.15 / (download) - annotate - [select for diffs], Sun Oct 23 13:03:05 2011 UTC (12 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.14: +35 -5 lines
Diff to previous 1.14 (colored)

introduce Q_CORRUPT and queue_backend operation to move a message from
schedule queue to corrupt queue upon envelope loading failure.

tested by me, ok eric@

Revision 1.14 / (download) - annotate - [select for diffs], Sun Oct 23 09:30:07 2011 UTC (12 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.13: +47 -56 lines
Diff to previous 1.13 (colored)

fsqueue no longer stores envelopes by dumping the structure, instead use a
couple of load/dump functions to convert to and from a human readable fmt.
while at it kill struct delivery and merge back its fields to the envelope.

this basically means we shouldn't require users to flush their queues every
time we make a change to struct envelope.

work is not done, but we're at a better state than the binary fsqueue so
we'll improve it in-tree.

has been running on my own box for the last 12 hours or so
ok eric@, chl@

Revision 1.13 / (download) - annotate - [select for diffs], Fri Aug 26 14:39:47 2011 UTC (12 years, 9 months ago) by chl
Branch: MAIN
Changes since 1.12: +2 -1 lines
Diff to previous 1.12 (colored)

add missing header needed by time()

ok gilles@

Revision 1.12 / (download) - annotate - [select for diffs], Mon May 16 21:05:52 2011 UTC (13 years ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.11: +31 -30 lines
Diff to previous 1.11 (colored)

murder struct path and make sure smtpd uses simpler structures that do not
bring a shitload of unnecessary information everywhere. this required many
parts of smtpd to be refactored and more specifically envelope expansion.

in the process lots of code got simplified, and the envelope expansion code
has been isolated to lka_session.c with some longstanding bugs fixed.

Diff has been tested by many with no major regression reported.
armani@ spotted a bug in a setup where a domain is listed a both primary
and virtual, I will fix that in-tree as it's becoming painful to maintain
this diff out.

Revision 1.11 / (download) - annotate - [select for diffs], Sun May 1 12:57:11 2011 UTC (13 years, 1 month ago) by eric
Branch: MAIN
Changes since 1.10: +39 -47 lines
Diff to previous 1.10 (colored)

the smtpd env is meant to be global, so do not pass it all around.

discussed with and ok gilles@

Revision 1.10 / (download) - annotate - [select for diffs], Sun Apr 17 11:39:22 2011 UTC (13 years, 1 month ago) by gilles
Branch: MAIN
Changes since 1.9: +39 -39 lines
Diff to previous 1.9 (colored)

a structure describing an envelope should be called struct envelope, not
struct message ...

Revision 1.9 / (download) - annotate - [select for diffs], Sat Apr 16 09:13:38 2011 UTC (13 years, 1 month ago) by gilles
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

I accidentally changed group ownership of fsqueue to _smtpd, it used to be
owned by wheel. This commit reverts to original behavior

Revision 1.8 / (download) - annotate - [select for diffs], Fri Apr 15 17:01:05 2011 UTC (13 years, 1 month ago) by gilles
Branch: MAIN
Changes since 1.7: +84 -83 lines
Diff to previous 1.7 (colored)

kill message_id and message_uid

smtpd now has an evpid associated to each delivery message, the evpid is an
u_int64_t where the upper 32 bits are the msgid, and the 32 bits are the
envelope unique identifier for that message. this results in lots of space
saved in both disk-based and ram-based queues, but also simplifies a lot of
code.

change has been stressed on my desktop, and has ran on my MX for the entire
afternoon without a regression.

Revision 1.7 / (download) - annotate - [select for diffs], Thu Apr 14 23:29:56 2011 UTC (13 years, 1 month ago) by gilles
Branch: MAIN
Changes since 1.6: +4 -4 lines
Diff to previous 1.6 (colored)

bye bye queue_hash() you can now rest in peace.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Apr 14 23:26:16 2011 UTC (13 years, 1 month ago) by gilles
Branch: MAIN
Changes since 1.5: +95 -2 lines
Diff to previous 1.5 (colored)

- implement missing operations for fsqueue:
	fsqueue_envelope_create(), fsqueue_message_purge()
- kill deprecated functions in queue_shared.c

At this point fsqueue backend is almost complete, all that is left to do is
to move the qwalk() API inside the queue_backend API, then make sure smtpd
is no longer calling anything queue related directly.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Apr 14 22:36:09 2011 UTC (13 years, 1 month ago) by gilles
Branch: MAIN
Changes since 1.4: +97 -5 lines
Diff to previous 1.4 (colored)

- implement fsqueue_message_create() and fsqueue_message_commit()
- change a few prototypes to allow bounce messages to use the
	queue_backend API until it gets merged in
- kill functions of the queue API that have been deprecated

Revision 1.4 / (download) - annotate - [select for diffs], Thu Apr 14 21:53:46 2011 UTC (13 years, 1 month ago) by gilles
Branch: MAIN
Changes since 1.3: +49 -7 lines
Diff to previous 1.3 (colored)

fsqueue now provides fsqueue_message_fd_r() and fsqueue_message_fd_rw() to
obtain a read{-only,/write} descriptor to the message file.

make sure smtpd uses the new API everywhere it needs a fd, and kill the
many functions that were used until now.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Apr 14 21:14:20 2011 UTC (13 years, 1 month ago) by gilles
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

fsqueue_message_delete() should use fsqueue_hash() not queue_hash() as i'm
going to kill it with lots of violence soon.

Revision 1.2 / (download) - annotate - [select for diffs], Thu Apr 14 20:11:08 2011 UTC (13 years, 1 month ago) by gilles
Branch: MAIN
Changes since 1.1: +377 -5 lines
Diff to previous 1.1 (colored)

fsqueue queue backend will implement a filesystem queue:
- fsqueue->setup() performs the queue initialization;
- fsqueue->message() controls messages;
- fsqueue->envelope() controls envelopes;

This commit brings the following to fsbackend:
fsqueue_setup(), fsqueue_message_delete(), fsqueue_envelope_load(),
fsqueue_envelope_update(), fsqueue_envelope_delete().

It also makes smtpd use the queue_backend API for these operations.

Revision 1.1 / (download) - annotate - [select for diffs], Thu Apr 14 17:06:43 2011 UTC (13 years, 1 month ago) by gilles
Branch: MAIN

smtpd makes too many assumptions about the structure and layout of its
disk-based queue, it makes it near impossible to make changes to it without
editing twenty files... how am i going to implement mongodb support ? :-)

bring a new queue_backend API which hides the details of the disk-based
queue to smtpd. it is not "plugged in" yet and I'm filling the holes.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.