> Hi
Hi
 
> I'm in dire need of away to filter incoming messages to other mailboxes
> than INBOX.
> I.e. if I receive an email addressed to [EMAIL PROTECTED] i want it to go
> to a folder named 1234 for the user associated with domain.com
> 
> I would like dbmail to manage this by it self if possible. As a last
> resort I'll build a perl / php script that sorts the emails into the
> correct boxes but that
> is quite a tacky solution which I want to avoid if possible.
> 
> Any suggestions?

I had a play around with this. You can specify a mailbox and username for
dbmail.

dbmail-smtp -m "mailbox" -u [username] for delivery to mailbox (name)

Depending on what args you're currently using on dbmail-smtp, shouldn't be
too much hassle to add a script between mta and dbmail-smtp. 

If you're sending the address as an arg, then simply do a db query to return
the username and the desired mailbox. The pass all stdin to dbmail-smtp. The
only downside would be a performance loss, ideally you'd want to use
persistent db connections on compiled code.

I had a play with the dbmail-smtp (main.c) code, so could in theory simply
use something like:

Dbmail-smtp -m "INBOX" -h
Or
Dbmail-smtp -m "JUNK" -h

However my hacking couldn't reliably get the address, worked fine in testing
just not on our live system, think I might have another look at this again
though.

Although, ideally libsieve (server side sorting) would do all that you
require :)

S

Reply via email to