OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: extension delivery to subfolder

From: /dev/rob0 (rob0gmx.co.uk)
Date: Fri Nov 03 2006 - 10:32:01 CST


On Friday 03 November 2006 03:57, Tomas Macek wrote:
> I'm using Postfix 2.2.10 + VDA + pgsql with many virtual domains and
snip
> But we are using extensions for the amavis quarantines like
> somebox-spamourdomain.com and somebox-virusourdomain.com. I'd like
> to deliver the mail, that is sent to somebox-spamourdomain.com to
> someboxourdomain.com directly to the INBOX/spam subfolder of the
> someboxourdomain.com mailbox. Is here some possibility how to do
> this without using maildrop or some other programs? I need this to
> have the configuration in the database, rather than on the disk in
> some dot files.

That is in fact your answer: to do it in the database. Each "somebox"
record should have corresponding "somebox-virus" and "somebox-spam"
listings which return a different value for the mailbox location.

virtual(8):
[...]
MAILBOX LOCATION
       The mailbox location is controlled by the virtual_mail-
       box_base and virtual_mailbox_maps configuration parameters
       (see below). The virtual_mailbox_maps table is indexed by
       the recipient address as described under TABLE SEARCH
       ORDER below.
[...]
TABLE SEARCH ORDER
[...]
       The search order is as follows. The search stops upon the
       first successful lookup.

       o When the recipient has an optional address exten-
              sion the user+extensiondomain.tld address is
              looked up first.
[...]
       o The userdomain.tld address, without address exten-
              sion, is looked up next.

So, your solution is in PgSQL, and should be rather simple.
--
    Offlist mail to this address is discarded unless
    "/dev/rob0" or "not-spam" is in Subject: header