4

I tried this process to pipe all mails from postfix to PHP. https://serverfault.com/questions/258469/how-to-configure-postfix-to-pipe-all-incoming-email-to-a-script

For testing purpose, I just executed a PHP script that would save raw mails to text file. It worked like a charm.

mailtransport   unix  -       n       n       -       -       pipe
  flags=FR user=vmail argv=/usr/bin/php /var/www/public_html/script/email/execute.php 
  ${nexthop} ${user}

But, I want to pipe all the emails through an artisan command. Something like this:

mailtransport   unix  -       n       n       -       -       pipe
  flags=FR user=vmail argv=/usr/bin/php /var/www/public_html/to/artisan email:parse 
  ${nexthop} ${user}

When I run this, I get an error -

Command died with status 1: "/usr/bin/php".
    Command output:                             [RuntimeException]      Too
    many arguments.
Community
  • 1
  • 1
nirvair
  • 4,001
  • 10
  • 51
  • 85

0 Answers0