[SOLVED]e-mail pipe: fatal: execvp permission Denied.


I just moved a domain from a cpanel install to a virtualmin installation. on the domain there is an install of OSTicket. I had some mail piping set up. I did the following to make this work:

  • Go to virtualmin web gui
  • I select the domain
  • I add a mail alias
    • Advance Mode tab
    • Name: test@domain.be
    • Alias Destinations:
      • Feed to program:
        • /home/domain/public_html/ServiceDesk/api/pipe.php
      • E-mail Address (want an extra check):
        • remi@otherdomain.be
      • Create
Sending an e-mail to the alias gives me the following log: Apr 20 11:52:47 server01 postfix/anvil[16138]: statistics: max connection rate 1/60s for (smtp: at Apr 20 11:49:26 Apr 20 11:52:47 server01 postfix/anvil[16138]: statistics: max connection count 1 for (smtp: at Apr 20 11:49:26 Apr 20 11:52:47 server01 postfix/anvil[16138]: statistics: max cache size 1 at Apr 20 11:49:26 Apr 20 11:58:08 server01 postfix/qmgr[29799]: F299A3BC05C3: from=, size=1792, nrcpt=1 (queue active) Apr 20 11:58:08 server01 local[16639]: fatal: execvp /home/domain/public_html/ServiceDesk/api/pipe.php: Permission denied Apr 20 11:58:08 server01 postfix/local[16638]: F299A3BC05C3: to=, orig_to=, relay=local, delay=522, delays=522/0.01/0/0.08, dsn=4.3.0, status=deferred (temporary failure. Command output: local: fatal: execvp /home/domain/public_html/ServiceDesk/api/pipe.php: Permission denied ) This is the content of pipe.php: #!/usr/bin/php <?php /********************************************************************* pipe.php
Converts piped emails to ticket. Just local - remote must use /api/tickets.email

Peter Rotich <peter@osticket.com>
Copyright (c)  2006-2013 osTicket

Released under the GNU General Public License WITHOUT ANY WARRANTY.
See LICENSE.TXT for details.

vim: expandtab sw=4 ts=4 sts=4:

ini_set(‘memory_limit’, ‘256M’); //The concern here is having enough mem for emails with attachments.
@chdir(realpath(dirname(FILE)).’/’); //Change dir.

//Only local piping supported via pipe.php
if (!osTicket::is_cli())
die(‘pipe.php only supports local piping - use http -> api/tickets.email’);


I see there has been some discussion about this subject (mail piping) before. I have tried various things, but nothing seemed to work. I tried the following things:

change chown of /usr/bin/php to domain:domain

remove #!/usr/bin/php command

remove just -q tag

change chmod of pipe.php to 777

I read http://www.virtualmin.com/node/25249 Though I have sermon installed, there is no indication how to access it (domain:20000 does not work)

Any way how I can configure this manually or so? I would really like this to work…


ok, I found that usermin needs to be started. It does not seem to start by default. I’ll try to configure it from here.

Ok. This is working. This is what I have done:

  • Go to webmin

  • open webmin => usermin configuration

  • Enable usermin (at bottom: start usermin)

  • open “available modules”

  • enable “Mail Forwarding and Replies”

  • Go to virtualmin

  • select domain

  • create user for the e-mail address you want to pipe

  • go to usermin (domain:20000)

  • select tab usermin

  • open “mail forwarding and replies”

  • configuration mode: Complex

  • add a mail forwarding rule

  • enable: yes

  • forward to: feed to program

  • textfield: /dir/to/pipe.php

  • save


Thanks to eric for the hint in http://www.virtualmin.com/node/25249

I’m glad you got it working, thanks for letting us know how you fixed it!