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

changing $to in crossbar




Did anybody try to configure crossbar() to use special redirecting of the
inbound mail with alias expansion?

For example:

In the 'intercept()' function (file: crossbar.cf) I would like
to trap all mail coming from a specific address and pass it back to 
crossbar with directive to "redirect":

	intercept (address) {
		rayan@csri.*)   return (drop) ;;
		bitftp*@*)  return (error bounce) ;;

>		*hydra.carleton.CA)    return (redirect nos-bbs) ;;
	}

and then in the crossbar change $to quad with alias expansion:

	crossbar (from, to) {
    local rewrite destination tmp arg1

	# Intercept (drop, redirect, bounce, save) the message

    tmp=$(intercept "$(user $from)") &&
        case "$(car $tmp)" in
        drop|error)
            return ;;
        file)   LOGMSG="$LOGMSG $(car $(cdr $tmp))" ;;
>       redirect)
>           arg1=$(car $(cdr $tmp))
>			to=$(router "$arg1") ;;
		esac	
	...

If I do that I get "Malformed recipient" warnings from the router and
in the log file and scheduler files have null recipients in the envelope
part of the file.

It seems that changing $to in crossbar from a single quad to a list of
quads is not allowed. Is that true?

-- 
Peter Ziobrzynski, pz@modtor.emp.promis.com, Toronto, Ont. Canada