Setting up e-mail piping
Posted in:
Tutorials
Sep 29, 2009
About email piping
The email piping is a technique of sending email message as an input to a program rather than appending the message to the mailbox file, allowing for real-time email delivery and handling. Every mail server has its own rules and procedures for mail delivery, making it hard to provide common instructions for configuring an MTA. You should refer to your hosting manual or contact your hosting provider for email piping instructions if none of the methods below works for you.
This is why there is no way to provide common instructions for configuring MTA software, which was installed and is being maintained by your hosting provider. You should refer to your hosting manual or contact your hosting provider for email piping instructions.
Unfortunately the email piping feature is not available with each hosting account. Windows based servers lack the feature more often than UNIX boxes. Providers of UNIX shared hosting accounts are somewhat reluctant to allow email piping, because normally the user supplied email processing program will be executed with extended permissions and this involves obvious security threats. If your hosting provider does not support email piping, you may use an alternate technique - pop/imap based queues.
Email piping istructions
Setting up piping in cPanel
Add a forwarding rule for each of the email addresses to /path/to/various/modules/tickets/fetch.php. For example forward support@domain.com to
"|/path/to/various/modules/tickets/fetch.php"
or
"|/usr/bin/php -q /path/to/various/modules/tickets/fetch.php"for CPanel 11.
- Don't forget the quotes.
- Make fetch.php executable chmod 755 fetch.php
Setting up piping with qmail
Create/Edit your .qmail-* for the domain you wish to forward and add a forwarding rule to /path/to/various/modules/tickets/fetch.php. For example for support@domain.com .qmail-support file should contain
|/path/to/various/modules/tickets/fetch.php
Setting up piping for sendmail
Modify your aliases file by adding support: root, |/path/to/various/modules/tickets/fetch.php and run newaliases.
Setting up aliases in .procmailrc
:0 c * ^To.*support@domain.com |/path/to/various/modules/tickets/fetch.php