I've had this problem before, and the way I solved it last time I was 
really unhappy with, so I though I'd ask the collective to see if anyone 
can come up with something smart for me.  I have this in my config:

mysql_virtual_forward:
  driver = redirect
  allow_defer
  allow_fail
  retry_use_local_part
  data = ${lookup mysql {MYSQL_FORWARD}}

mysql_virtual_mailbox:
  domains = ${lookup mysql {MYSQL_MAILBOX}{$value}}
  driver = accept
  retry_use_local_part
  transport = dovecot_delivery

So, I have a database table containing mailboxes, and one for forwards. 
This works fine, until you want an email address that forwards AND is a 
mailbox. Mailboxes are in the form of an email address, so for example, 
I have a '[EMAIL PROTECTED]' email address, and '[EMAIL PROTECTED]' 
forwards to it.

It will hit the first router, and go no futher.  This is what 'unseen' 
is for if I understand correctly.  However, if I unseen the first 
router, in cases where an email only matches the first router, and not 
the second, it will appear as undeliverable, as it will not have hit any 
'seen' routers.

With 'unseen' on the first router, I see this:

# exim -bt [EMAIL PROTECTED]
[EMAIL PROTECTED] is undeliverable: Unrouteable address
    <-- [EMAIL PROTECTED]
[EMAIL PROTECTED]
    <-- [EMAIL PROTECTED]
    <-- [EMAIL PROTECTED]
  router = mysql_virtual_mailbox, transport = dovecot_delivery

Where as, the expected behaviour (as can be observed with no unseen in 
the first router) is:

# exim -bt [EMAIL PROTECTED]
[EMAIL PROTECTED]
    <-- [EMAIL PROTECTED]
  router = mysql_virtual_mailbox, transport = dovecot_delivery


So, what I want is the best of both worlds. Any ideas?

Thanks



-- 
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to