On Wed, Nov 18, 2009 at 2:03 PM, Wietse Venema <wie...@porcupine.org> wrote:
> The transports(5) manpage mentions that the destination defaults
> to the recipient domain. However, the scheduler uses a different
> default, which appears to be inconsistent. I wonder what would
> break if this were to be changed.

Yes, this seems to be the issue. I'm depending on, from transport(5):

  "A non-null transport field with a null nexthop field resets
   the nexthop information to the recipient domain."

which doesn't seem to be happening. If you can direct me to the
relevant scheduler code or have a patch I could try, I'd be happy to
test it and see what happens.

> For now, perhaps your header_checks rules can copy the recipient
> domain to the FILTER command.

Success! Well, more or less. This is working, but I'm not 100%
satisfied with it since the sender has to specify the domain to send
to twice in the email, making sure the X-Vmta header matches the
recipient domain.

   /^X-Vmta.*\s*([0-9]+)(\s*(\S*))?/   FILTER vmta${1}:${3}

So:

  "X-Vmta: 3 gmail.com"   maps to "vmta3:gmail.com"

Can anyone think of a way to easily grab the recipient domain from the
To: header line and have it available somehow when writing the FILTER
line? I can't envision a way to pass information between lines like
that.

My preference is to figure out how to get postfix to do what
transport(5) seems to indicate it should, however.

--Ian

Reply via email to