Michael Nguyen writes:

I was looking through the Maildrop documentation and had a question about
it.  Would it be easy to get maildrop to deliver an email to an arbitrary
folder?  My old MTA allowed me to do the following:

[EMAIL PROTECTED]

If I emailed the above address, the email would get delivered directly into
the "archive" maildir.

I'm currently using Postfix as my MTA and the delivery agent there doesn't
support anything like this, but I was wondering what kind of tricks I could
do with maildrop to get the same results?

First, you need to get your mail server, Postfix, to put the recipient's address, that it's delivering to, into some environment variable.

Before you say a word, I can arrange to send you an E-mail with the To: header reading "Dubya <[EMAIL PROTECTED]>", so don't even _THINK_ of screwing around with the To: or the Cc: header in order to get the recipient's E-mail address. It's not going to work. The address must come from Postfix, directly.

So, first, you have to hack Postfix to put the real recipient address into some environment variable.

Then, it's a simple matter of using "import" in a maildrop recipe to get the address, and then do whatever you want with it.

Of course, you have to be careful, and be aware of the security consequences of such an endeavour, lest you end up in trouble after some joker sends you some E-mail addressed to <[EMAIL PROTECTED]; rm -rf $HOME>.



Attachment: pgp7zWKlOdFDS.pgp
Description: PGP signature

Reply via email to