On Thu, Aug 23, 2001 at 06:04:45PM -0400, John R. Levine wrote:
> > Is there any way to determine what the *original* envelope recipient
> > ([EMAIL PROTECTED]) was under a virtualdomain before qmail changed
> > it to the local representation?
> 
> Of course.  When qmail rewrites the local part of a virtual domain
> address, it does NOT change the domain.  So all you have to do is to
> look up $DOMAIN in virtualdomains, and if you find it strip off the
> prepend string.  It should take about three lines of perl.  It doesn't
> even need for the prepends to be unique.

May I note, that virtualdomains accepts lines of the format
    user@domain:prepend
Despite its name it can also be used as a "virtualusers" file, so
- it may not be enough to only scan for domains and sorting out
  the user@domain:prepend may take a bit more work as you can have
       [EMAIL PROTECTED]:prepend-1
       [EMAIL PROTECTED]:prepend-2
       example.com:prepend-3
       .example.com:prepend-4
- in case of .domain:prepend this scanning may be a bit more work
  to match subdomains

        \Maex

-- 
SpaceNet AG            | Joseph-Dollinger-Bogen 14 | Fon: +49 (89) 32356-0
Research & Development |       D-80807 Muenchen    | Fax: +49 (89) 32356-299
Stress is when you wake up screaming and you realize you haven't fallen
asleep yet.

Reply via email to