OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Victor Duchovni (Victor.Duchovnimorganstanley.com)
Date: Tue Oct 02 2001 - 13:18:41 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

            Michael, your table (specifically the second to last entry)
            is not accurate...

            with user+extexample.com and table entry of

            example.com luserexample.org

            The rewrite is luser+extexample.org:

            Prior to 200102028pl05 there was another case that came out wrong:

            userexample.com example.org

            with rewrite to user+ext+extexample.org without the patch, and
            user+ext with the patch. For full disclosure the released patch is
            not the whole story (partly my fault), the correct code is:

        if ((string = mail_addr_find(path, address, &extension)) != 0) {

            /*
             * Prepend the original user to otherdomain.
             */
            if (*string == '') {
                buffer = vstring_alloc(100);
                if ((ratsign = strchr(address, '')) != 0)
                    vstring_strncpy(buffer, address, ratsign - address);
                else
                    vstring_strcpy(buffer, address);
                if (extension)
                    vstring_truncate(buffer, LEN(buffer) - strlen(extension));
                vstring_strcat(buffer, string);
                string = STR(buffer);
            }

            /*
             * Canonicalize and externalize the result, and propagate the
             * unmatched extension to each address found.
             */
            argv = mail_addr_crunch(string, propagate ? extension : 0);
            if (buffer)
                vstring_free(buffer);
            if (msg_verbose)
                for (i = 0; i < argv->argc; i++)
                    msg_info("%s: %s -> %d: %s", myname, address, i,
    argv->argv[i]);
        }

    > From: Michael Tokarev
    > []
    > > What would I use to get the original username if "virtual" had:
    > >
    > > domain.com someuserotherdomain.com
    > >
    > > and mail was sent to xyzzydomain.com (note: no extension). I think
    >
    > Aha. This makes sense. And this *is* documented in virtual(5) manpage.
    >
    > Let's draw a table:
    >
    > rcpt address vkey vval result
    > ab.c ab.c xy.z xy.z
    > b.c xy.z xy.z
    > b.c y.z ay.z
    > a+eb.c a+eb.c xy.z xy.z
    > ab.c xy.z x+ey.z <==
    > b.c xy.z xy.z <====
    > b.c y.z a+ey.z <==
    >

    -
    To unsubscribe, send mail to majordomopostfix.org with content
    (not subject): unsubscribe postfix-users