Michael Nguyen writes:

From: "Sam Varshavchik" <[EMAIL PROTECTED]>
Michael Nguyen writes:

[snip]

> Hmm....  Well, courier-authlib gets the info from a MySQL database.  I
guess
> I'm not sure how I could get authlib to transform
> [EMAIL PROTECTED] into /var/mail/102309.macnt/.archive/ as
the
> maildir.
>
> How would you do this, Sam?

Well, that's what courier-authlib does: take a userid and return the
associated account information, such as the account's homedir/maildir.

Sam, why do you hate me??!  I've been loyal!

Maybe I'm being unclear...  So, [EMAIL PROTECTED] has a maildir of
/var/mail/102309.macnt/...

I want to be able to deliver to an arbitrary folder such that
[EMAIL PROTECTED] would be delivered to ${MAILDIR for
[EMAIL PROTECTED]/.anything

Can you think of any way I can trick authlibmysql into returning something
like that?

No. You said that you were using Postfix, and it's Postfix that runs the logic to deliver <[EMAIL PROTECTED]> to the <[EMAIL PROTECTED]>'s mailbox. This logic belongs in Postfix.

For comparison's purposes, this is analogous to how Courier implements the equivalent concept of <[EMAIL PROTECTED]>.

When Courier gets an address of <[EMAIL PROTECTED]>, it first tries to look up the full address through authlib. If it does not exist, the extension gets chopped off, and Courier tries again.

When a valid mailbox is found, whatever got chopped off is set aside, and used to look up the .courier-extension file in the account's home directory (falling back to .couried-default, etc.)

What you need to do is hack Postfix to put +anything part into some environment variable, and deliver the message to [EMAIL PROTECTED]; and its .mailfilter can then import the +anything part from the environment, and decide what to do with it.


Attachment: pgpJgcDF0oXRN.pgp
Description: PGP signature

Reply via email to