| |||||||||||||||||||||||||||||||
|
> Hi all, > > I am trying to setup an alias that is sending the mail to a command like > this: > > comment: "|/opt/rt3/bin/rt-mailgate --queue general --action comment --url > https://rt.mysrv.intern" This is similar to the entries in my own aliases file: majordomo: "|/home/majordomo/wrapper majordomo" > in the aliases file I have it all on one line. man aliases says the command > has to be in "", if it has parameters, but when I send a message to the > comment mail address, I see the following in the mail logs: > Apr 11 12:34:27 myserver postfix/local[20387]: 86C8A8BF20: > to=<general-reply>, > orig_to=<general-reply@localhost>, relay=local, delay=0, status=bounced > (Command died with status 127: "/opt/rt3/bin/rt-mailgate --queue > general --action comment --url https://rt.mysrv.intern". Command > output: /bin/sh: /opt/rt3/bin/rt-mailgate --queue general --action > comment --url https://rt.mysrv.intern: No such file or directory ) That's because you are NOT using the above example, but something different, like: comment: "|'/opt/rt3/bin/rt-mailgate ...'" Wietse > so it seems to interpret the whole string as one command, but without the > parenthese around it or with single parentheses ' ', it is not working too. > > so I tried to wrap a shell script around it like this one: > > #!/bin/sh > > cat /dev/stdin > /tmp/blah > > cat /tmp/blah |/opt/rt3/bin/rt-mailgate --queue general --action > comment --url https://rt.mysrv.intern > > it works well on the command line, but when spawned from postfix, the > file /tmp/blah is empty. > > I also haven't touched the allow_mail_to_commands: > allow_mail_to_commands = alias, forward > > what am I missing, doing wrong? > > btw, I have postfix-2.2.9-10 rpm installed on suse 10.1 > > > kind regards > Sebastian > > >
| ||||||||||||||||||||||||||||||
© 2004-2008 readlist.com