Michael J. Prichard writes:
Hello all,
I want to set up a simple MTA (postfix) that will recieve email from
specified sources (other production mta's that bcc it) and then based on
the envelop rcpt to: address place the email into a specified
directory. Another program will pick it up here and then do its thing.
I asked on the postfix mailing list about this and they suggested I use
maildrop. Here is the scenario I would like to do:
email w/ "rcpt to: inco...@foo.blah.com" will be deposited into the
/my/directory/foo/ as individual source files. email w/ "rcpt to:
inco...@bar.blah.com" will be deposited into /my/directory/bar/ and so
on...
Is maildrop something I can use to accomplish this? If so, any good
examples out there?
No.
Maildrop has no idea, no access, no clue whatsoever what the mail server
originally received in the RCPT TO: command.
If you think that's the contents of the To: or the Cc: header, you are
sadly, sadly mistaken.
The only guaranteed way to know that is to set up a different mail account
for each valid recipient address, so that the mail account's .mailfilter
file knows exactly what the recipient address was, and handle the message
accordingly.