I have a need to perform local delivery based solely on the user that is
authenticated with SMTP. The logic I'm trying to accomplish looks like this:
1. Joe's email client connects to my Courier via SMTP
2. Joe's email client provides credentials and Courier authenticates as user
Jo...@Domain.com
3. Courier allows the connection, but rather than deliver to
Bo...@AnotherDomain.com, Courier does a local delivery to a Maildir
Later, another process will pickup mail in the Maildir via POP3 and do some
other formatting to the message before finally queuing it to be delivered as
normal (i.e. to Bo...@AnotherDoamin.com)
Note that the original email will look like this:
From: Jo...@Domain.com
To: Bo...@AnotherDomain.com
Subject: Hi
And because Joe's client is a normal client it will do this on the SMTP
handshake when delivery the message in the first place:
EHLO Domain.com
MAIL FROM: <Jo...@Domain.com>
RCPT TO: <Bo...@AnotherDomain.com>
Courier's normal behavior is to simply relay the message, and NOT do a local
delivery? Is there some way to force a local delivery based on the fact
that "Jo...@Domain.com" is the authenticated user?
Thanks!
-Ryan