email piping with subaddress

mike817

Member
Aug 5, 2010
15
0
51
Hey all. I'm looking to do some automatic email processing. Basically if someone replies to an email, the response would be stored in a database. In order to pull this off I setup an email forwarder to a php script. The problem I'm having is when I add some identifying information in the subaddress section of the email address, the forwarding stops. Is there any way to setup the forwarding that will work with dynamic subaddresses?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,216
463
Hello,

The ability to use subaddresses for email is documented at:

Email Accounts - Documentation - cPanel Documentation

Here's the text from this document:

Email subaddresses
This feature, also known as plus addressing, allows senders to route a message directly to the folder of a mailbox.

Email subaddresses use the [email protected] format, where username represents the username of the mailbox and folder represents the folder's name.

For example, if you send a message to [email protected], the mailserver will route the message to the Important folder in the [email protected] mailbox.

Notes:
  • If the folder does not already exist, the system will create that folder.
  • You must subscribe to the folder in your email or webmail client for the folder to appear.
As far as forwarders, one potential workaround is to setup a global email filter:

Global Email Filters - Documentation - cPanel Documentation

You could setup the filter so that if the header matches a specific prefix, it performs a set action. Note that you may need to utilize a regular expression in your custom filter rule:

Help needed with Global Filters (body regex)

Thank you.