Re: [EXIM] Support for username+extension@domain.com?

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Peter Radcliffe
Dátum:  
Címzett: exim-users
Tárgy: Re: [EXIM] Support for username+extension@domain.com?
"Tabor J. Wells" <twells@???> probably said:
> stumped. The problem is that our relays look up the incoming address and
> rewrite the envelope-to to redirect it to the server containing their
> mailbox. So user@??? might be rewritten as
> differentuser@???. How would I do the lookup for
> user@??? in the domain.com database while holding onto +extension
> and then rewrite the address so that it is
> differentuser+extension@???.


I'm working on it.
(I want username-suffix, as my preference, but I'll write it with DSUFFIX
so whatever can be used).

I've got, after my traditional virtual director and my director that makes
sure all virtual domains have postmaster and root as valid addresses:

# and if there is a -something suffix, send it to the right place
virtualsuffix:
  driver = smartuser
  domains = dbm;EBASE/dbm/virtualDBEXT
  no_more
  suffix = DSUFFIX*
  new_address = "${lookup{$local_part} dbm \
    {EBASE/domains/${lc:${length_1:${domain}}/${domain}}DBEXT} {$value} fail}


which sends foo-suffix to the address for foo, but I'll need to add the
suffix back onto the $value (which will be fun if its qualified or not).

>         Now, if someone sends mail to fred+pizza@???, procmail
>         will be called to deliver the mail as:
>                 procmail -a pizza -d fred
>         In the .procmailrc file, you can now do an assignment like:
>                 ARGUMENT=$1
>         which will expand to ARGUMENT=pizza.


What I want to know is how do you tell (at the actual delivery) if any
given username-suffix is wanted to be valid by the user ?

Its fine if you use .forward-suffix, a'la .qmail-suffix, which I'll
probably use for local users, but with a procmail director it would be
nice to be able to just punt things to procmail.

The easiest way would be to have .forward-foo contain 'username', and it
would get passed to the procmail director, but then it looses the $1
which is passed to procmail with the -s option, which I want to do
in the procmail director to be completely compatable ...

Suggestions to how to tell if the user who uses procmail for all local
delivery wants username-foo to be valid, without using .forward-suffix ?

(oh, and if anyone wants to work out how to rewrite $value as
$local-part-suffix@domain that deals with qualified and unqualified cases,
feel free ;)

P. - evil rewrites are us.

-- 
pir               pir@???      pir@???      pir@???



--
*** Exim information can be found at http://www.exim.org/ ***