Subject: [Q] meaning of (local pipe.foo ...) calls in aliases.cf

From: Ambrose Li <[email-masked]>
Date: Sun, 29 Dec 2002 02:34:42 -0500

Hello,

I am trying to hack aliases.cf to recognize queue names for
my freshly-installed ticketing system (RT), and I find that
I don't understand what I am copying.

I managed to copy-and-paste and arrive at something like this:

        # Recognize foo-{correspond,comment}@$mydomain
        # as an RT correspondance/comment for queue foo
        ([-A-Za-z0-9_.]+)-(correspond|comment)
                queue="\1"
                action="\2"
                return (((local pipe.nobody "|/software/rt2/bin/rt-mailgate --queue $queue --action $action" $(newattribute $attr privilege "0" ))))
                break
                ;;

I wrote "pipe.nobody" in the "return" line. However, when I
read other "return" commands for pipes in the rest of the
file, I find that what I think is a userid is usually the
list name or something like that. What exactly is that part
(that I wrote "nobody")?

Also, is there a way to force the pipe to run as a certain
user (other than specifying the command as "su ....")?

Thanks in advance,

-- 
Ambrose Li  <[email-masked]>
http://ada.dhs.org/~acli/cmcc/  http://www.cccgt.org/

DRM is theft - We are the stakeholders
-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to [email-masked]

---

From: Andy Poling <[email-masked]>
Date: Sun, 29 Dec 2002 23:03:47 -0500 (EST)

> user (other than specifying the command as "su ....")?

If you want to be in control of the situation and/or you're talking about
delivering significant mail volume this way, your best bet is to write a
transport/delivery agent that does specifically what you want.  Put it in
scheduler.conf, and then route stuff to that channel.

You'll get much better performance (using the scheduler's native interface to
your agent), and you'll be in complete control.  The scheduler->ta interface
is (somewhat) documented in the scheduler man page, and you could use one of
the existing transport agents as a template or starting point.

Another option is to use the "sm" transport agent to run your application in a
traditional sendmail-ish way.  This will be inefficient though, since "sm"
will be invoked for each message.  No worse than using "local" to a pipe
though...

-Andy

-