[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: filter in fqdnaliases



On Tue, Jun 10, 2003 at 10:50:58AM +0200, Rocio Alfonso Pita wrote:
> hello,
> 
>   I have in my fqdnaliases this:
> 
> @mydomain.com:    anuser
> 
>   So, all mail to "mydomain.com" goes to count "anuser" only.
> 
>   Now, I want the follow:
> us1*@mydomain.com:   anuser
> 
>   All mail to all users begins with us1 in domain "mydomain.org", goes to 
> count "anuser".

No.  ZMailer's databases don't understand iterative scans of regular
expressions (those you would like to use instead of globs..)

On the other hand...  you can write that kind of mapping functions
in  zmsh  script language, and (to an extent) have them loaded
into running router.

... alas no, even 'incore' format database in itself can't do it for
you.  You have to write a function a bit like:

aliases(key, o1, o2, o3, o4, o5, o6, o7, o8, o9, o10, o11, o12, o13, o14, o15, o16, o17, o18, o19) {
    local a
        if a="$(aliases_1 $key )"; then
            priv="$(filepriv -M 644 $MAILVAR/db/aliases$DBEXTtest \
                            $(db owner aliases_1))" &&
            returns "$a"
        fi
    return 1
}


where you have those matching patterns, and then produce hits/rewrites,
instead of mere     a="$(aliases_1 $key)"   invokation of existing
database.

What will you need to do to    proto/newdbprocessor(.in)  in order to
generate suitable code ?   No idea right now, but perhaps existing
tool gives you some ideas.


>   Is this posible? In zmailer manuel appears: "The ?%1? local part is special 
> (and experimental, as of 21-Feb-2001) substitution pattern where local part 
> (user) can be replaced into the looked up data", but I don't understand this. 
> If this is posible, can you send me an example?

A way to map all of some domain's incoming addresses to another
domain would be:

  @bar.foo:   %1@elsewere.foo

However I haven't gotten around to   a) really need it,  b) write
proper examples of how to use it.   Idea for it was taken from
sendmail, though.

Your   dbases.conf   configuration must have the '%' enable flag in
(sub-)database configuration for that thing to activate.  Essentially
that is it.

>   thanks and regards,
>      rozio
-- 
/Matti Aarnio	<mea@nic.funet.fi>
-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to majordomo@nic.funet.fi