11 msgSMTP authentication with saslauthd against PAM
7 msgError in SMTP sequence
2 msgdkim-milter on relay server unknown-jobid exter...
11 msgStubborn Cert issue
3 msgProblems with false positives
4 msgreject_unverified_recipient case sensitive?
3 msgdkim=fail (verification error: invalid key gran...
5 msg? Using header checks on (Postini) X-pstn-levels
2 msgCan't find error in my config file. Can you?
1 msgchroot postgresql ssl problem
15 msgWhat cert to buy
3 msgAddress re-writing
9 msgMail Rejected when we relay for a client.
8 msgQueueing up archive messages
2 msgCannot send e-mails from any e-mail clients
1 msgRe: outbound mail failure - need to fix asap -S...
4 msgoutbound mail failure - need to fix asap
3 msgPostfix alias problem

problem to send a mail to a command in aliases
\ Sebastian Reitenbach (11 Apr 2007)
. \ (Wietse Venema) (11 Apr 2007)

3 msgsmtpd_auth
Subject:Re: problem to send a mail to a command in aliases
Group:Postfix-users
From:(Wietse Venema)
Date:11 Apr 2007


 
Sebastian Reitenbach:
> 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