Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DBMail: users

External forwards piped out to a command

 

 

DBMail users RSS feed   Index | Next | Previous | View Threaded


greminn at gmail

Mar 11, 2009, 8:23 PM

Post #1 of 3 (429 views)
Permalink
External forwards piped out to a command

Hi There,

I am trying to get an external forward to a pipe. These are the
commands that im using:

# dbmail-users -l newmedia2
newmedia2:x:768:0:0.00:0.06:test[at]newmedia.net.nz

# dbmail-users -x test[at]newmedia.net.nz -t
"|/usr/local/autoresponder/autoresponder.php"
[|/usr/local/autoresponder/autoresponder.php]
Done

OK. The once I run the command again to check to see if the pipe is
attached to the user:

# dbmail-users -l newmedia2
newmedia2:x:768:0:0.00:0.08:test[at]newmedia.net.nz

It doesnt list the forward. To see the forward i need to run
"dbmail-users -l" and at the bottom i see the forward:

test[at]newmedia.net.nz: |/usr/local/autoresponder/autoresponder.php

OK.. That is fine. The problem i am having is that when i add a
forward using the above method, i postfix cant deliver the message to
dbmail:

Mar 12 16:03:00 mail-in1 postfix/lmtp[15149]: 7BA9C485AD:
to=<test[at]newmedia.net.nz>, relay=210.48.80.133[210.48.80.133]:24,
delay=0.19, delays=0.05/0.01/0/0.13, dsn=4.4.2, status=deferred (lost
connection with 210.48.80.133[210.48.80.133] while sending end of data
-- message may be sent more than once)

As soon as i remove the forward, i can flush the postfix queue and the
message goes thru.

Note that the /usr/local/autoresponder/autoresponder.php is owned by
the dbmail user and is executable.

An assistance would be greatly apprectiated!

Thanks

Simon
_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


paul at nfg

Mar 12, 2009, 2:01 AM

Post #2 of 3 (395 views)
Permalink
Re: External forwards piped out to a command [In reply to]

Simon wrote:

> An assistance would be greatly apprectiated!

Show me the code.

--
________________________________________________________________
Paul Stevens paul at nfg.nl
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands________________________________http://www.nfg.nl
_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


greminn at gmail

Mar 12, 2009, 2:57 AM

Post #3 of 3 (393 views)
Permalink
Re: External forwards piped out to a command [In reply to]

On Thu, Mar 12, 2009 at 10:01 PM, Paul J Stevens <paul[at]nfg.nl> wrote:
> Simon wrote:
>
>> An assistance would be greatly apprectiated!
>
> Show me the code.

Thanks Paul.. The code for /usr/local/autoresponder/autoresponder.php?

I have removed all the PHP that we currently have in the scipt to make
sure that it is not that which is causing the issue. Currently the
file has this in it:

------------------------
#!/usr/bin/php
<?

echo "works";
exit();

?>
------------------------

I have su'ed to dbmail and run the script like this:

# /usr/local/autoresponder/autoresponder.php
# /usr/bin/php /usr/local/autoresponder/autoresponder.php

Both these work correctly and output "works". So i removed the "echo
"works";" part and tried again. Still the same issue, postfix wont
deliver the mail: "status=deferred (lost connection with
210.48.80.133[210.48.80.133] while sending end of data -- message may
be sent more than once)"

Remove the pipe and it works with no issues.

Cheers

Simon
_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

DBMail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.