From: Phil Howard on
On Wed, May 19, 2010 at 15:13, Wietse Venema <wietse(a)porcupine.org> wrote:

> Don't do that.
>
> Postfix will accept mail for addresses that don't exist and later
> bounce that mail to innocent people.
>

Of course I don't want to do that. Sounds like what I need is something
that will map the address at RCPT TO time, so it can use the mapped result
to do further checks to see if the user exists (e.g. under the mapped-to
domain).
From: Phil Howard on
On Wed, May 19, 2010 at 15:14, Noel Jones <njones(a)megan.vbhcs.org> wrote:

> If smtp_generic_maps suit your needs, they will not affect recipient
> validation, and may be easier to implement.
>

Isn't that a client mapping that would apply to sender addresses on
outgoing?
From: Noel Jones on
On 5/19/2010 2:49 PM, Phil Howard wrote:
> On Wed, May 19, 2010 at 15:14, Noel Jones <njones(a)megan.vbhcs.org
> <mailto:njones(a)megan.vbhcs.org>> wrote:
>
> If smtp_generic_maps suit your needs, they will not affect recipient
> validation, and may be easier to implement.
>
>
> Isn't that a client mapping that would apply to sender addresses on
> outgoing?
>

smtp_generic_maps rewrites addresses on the fly during
delivery. It's commonly used eg. rewrite @foo.example.com to
@example.com during delivery to hide internal addresses.
http://www.postfix.org/postconf.5.html#smtp_generic_maps
http://www.postfix.org/ADDRESS_REWRITING_README.html#generic


-- Noel Jones

From: Phil Howard on
On Wed, May 19, 2010 at 16:00, Noel Jones <njones(a)megan.vbhcs.org> wrote:

> On 5/19/2010 2:49 PM, Phil Howard wrote:
>
>> On Wed, May 19, 2010 at 15:14, Noel Jones <njones(a)megan.vbhcs.org
>> <mailto:njones(a)megan.vbhcs.org>> wrote:
>>
>> If smtp_generic_maps suit your needs, they will not affect recipient
>> validation, and may be easier to implement.
>>
>>
>> Isn't that a client mapping that would apply to sender addresses on
>> outgoing?
>>
>>
> smtp_generic_maps rewrites addresses on the fly during delivery. It's
> commonly used eg. rewrite @foo.example.com to @example.com during delivery
> to hide internal addresses.
> http://www.postfix.org/postconf.5.html#smtp_generic_maps
>
> http://www.postfix.org/ADDRESS_REWRITING_README.html#generic
>

OK, so both sender and recipient?

But it sounds like what I need is something to rewrite envelope recipient
address at SMTPD RCPT TO time. Like maybe (this does not exist)
smtpd_recipient_map and (also does not exist) smtpd_recipient_domain_map ??
What I would envision this doing is applying this rewrite before checking to
see if the user really exists, then using that rewritten address in all
further checks that get done during the SMTPD session, all while the remote
SMTP client waits for a response (it's already waiting for all those
restriction checks).
From: Brian Evans - Postfix List on
On 5/19/2010 3:44 PM, Phil Howard wrote:
> On Wed, May 19, 2010 at 15:13, Wietse Venema <wietse(a)porcupine.org
> <mailto:wietse(a)porcupine.org>> wrote:
>
> Don't do that.
>
> Postfix will accept mail for addresses that don't exist and later
> bounce that mail to innocent people.
>
>
> Of course I don't want to do that. Sounds like what I need is
> something that will map the address at RCPT TO time, so it can use the
> mapped result to do further checks to see if the user exists (e.g.
> under the mapped-to domain).
>
In addition, in the configuration posted previously, you are not using
virtual_mailbox_maps for validation anyway so Postfix will allow any
user listed at the domains in virtual_mailbox_domains. The dovecot
transport then accepts or bounces it.

There should be a list of users that dovecot can deliver to, can't
Postfix access this too?