[kwlug-disc] /etc/valiases, piping and "local delivery failed"??
Robert P. J. Day
rpjday at crashcourse.ca
Thu Apr 15 15:24:29 EDT 2010
a short followup to my postings from yesterday, in which i wanted to
set up a /etc/valiases file to redirect the incoming message to a
*multitude* of executables (PHP, shell script, whatever).
the original incantation:
*: "| name-of-PHP-script.php"
worked fine. when i replaced it with my duplication script, it worked
fine, but emailing to that domain also produced a "local delivery
failed" error, even though the message was actually processed
properly.
to strip the situation down to its bare essentials, i wrote a
simpler shell script which simply did a pass through:
#!/bin/bash
tee >(php $1) > /dev/null
and set the /etc/valiases file to:
*: "| name-of-shell-script.sh name-of-PHP-script.php"
in other words, i just added another level of complexity for testing
purposes. i still got the "local delivery failed" error, so it's
clearly something involving the way the shell invocation is being
done.
what is it that causes that delivery error message to be generated?
am i not passing back the appropriate error code from the script? as
i said, the setup actually works, but *something* is informing the
mailer (incorrectly) that delivery did not take place, even when it
has.
thoughts?
rday
--
========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA
Linux Consulting, Training and Kernel Pedantry.
Web page: http://crashcourse.ca
Twitter: http://twitter.com/rpjday
========================================================================
More information about the kwlug-disc
mailing list