ocl wrote:
So, instead of 2 DBMail boxes, I will have one Cyrus box (which
the users will connect to), and a DBMail box which will only be
used for statistical analysis and archive purposes. DBMail is
perfectly suited for that purpose; it saves me a lot of coding.
This is why any replication at the level of filesystem, or
data storage (DB) is no good for me.
I hear you. I think offlineimap is not for you then either.
I don't know what mta you're using, but if it's postfix you may want to look
into it's always_bcc feature.
You could bcc all mail going through your cyrus box to a special bigbrother
address.
Then, filter *everything* though a single procmail filter, add a loop prevention
header, store all incoming mail into a single dbmail account and throw away
everything that is outgoing.
postconf -e [EMAIL PROTECTED]
-- /home/bigbrother/procmailrc --
LOGFILE=$HOME/.procmail.log
VERBOSE=on
SHELL=/bin/sh
# watch out for mail loops.
:0
* !^X-Loop:[EMAIL PROTECTED]
{
:0: bb_lock
* [EMAIL PROTECTED]
| formail -A "X-Loop: [EMAIL PROTECTED]" |\
dbmail-smtp -u bigbrother
}
:0: discard
/dev/null
------------------------------------
Of course, this stands to be improved if you need a 1-1 mapping between your
cyrus users and dbmail users.
You could get the procmail script to automatically create dbmail-accounts as
required.
:0
* !^X-Loop:[EMAIL PROTECTED]
* ^TO_ \/[EMAIL PROTECTED]
{
LUSER=`echo $MATCH|sed 's/@.*//'`
DUMMY=`dbmail-user -l $LUSER &>/dev/null || dbmail-user -a $LUSER`
:0: lock.$LUSER
| dbmail-smtp -u $LUSER
}
Something along those lines. Untested, no warranties, it may eat your lunch,
etc.
--
________________________________________________________________
Paul Stevens [EMAIL PROTECTED]
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands_______________________________________www.nfg.nl