2

I'm trying to use Email Filters in cPanel on mxroute to work around misbehaving sites that don't support email plus addressing (as described here). In short, replacing the "+" with another character that's commonly accepted like "-" and forwarding it just like it were a "+".

The rule part works great:

Any Recipient - matches regex
me-(.*?)@mydomain.com

However, when I try to save the following action:

Redirect to email
me+$1@mydomain.com

I get the following error:

Filter destination paths cannot contain mailboxes that start with the “~” character or contain the following characters: “@”, “$”, “"”, and “\0”

It lets me save when I change it to me@mydomain.com, but that's not what I want since it prevents the email from being stored in the appropriate folder. I'd also rather not create a separate rule for each possible email address.

I figured I'd be able to do this with regex since I thought cPanel Email Filters were just a UI over Exim (which appears to support rewrite patterns).

Is this possible using Email Filters? Does the UI accept the pattern in some other format? Is there another way to do this in cPanel with limited access like is present in mxroute?

  • This email misbehaviour is a real bug-bear of mine. So many web forms are misconfigured and prevent valid email addresses. – Willtech May 21 '18 at 13:22
-1

Why not create a cpanel forwarder? me@example.com -> me+whatever@example.com and you then use me@example.com where you need to.

FWIW, you could even do this in gmail. If you had an email example@gmail.com, in settings > accounts and forwarders you can forward that to me+whatever@example.com, In this case example@gmail.com is what you publish.

If you want to take it one step further, if you could get me@gmail.com a valid email address is me+whatever@gmail.com so it kind of matches the original, and you could publish that. This method is useful if you sign up at various sites, you can track if they pass on your email address e.g. me+stackexchange@gmail.com

| improve this answer | |
  • Sounds like you're describing doing the opposite of what I'm asking. I'm wanting to give a service provider that doesn't support plus signs a different, but similar email and have cPanel forward it to the plus address (e.g. me-finance.wellsfargo@mydomain.com goes to me+finance.wellsfargo@mydomain.com). I said - because it's more supported than +. – Taylor Buchanan Apr 19 '18 at 6:50
  • @TaylorBuchanan No I'm not. Re-read what I said. Your non + email address will forward to your + email address. – Steve Apr 20 '18 at 7:12
  • I've read what you said. Please explain how forwarding me@example.com to me+whatever@example.com does anything I'm asking. That's exactly what is stated in your first paragraph. If you're suggesting I forward every variation of - email separately, I clearly stated this in my question: "I'd also rather not create a separate rule for each possible email address." – Taylor Buchanan Apr 20 '18 at 12:10
  • 1
    I think that's where the misunderstanding lies. You don't create email plus addresses. They are implicitly supported by cPanel. See here under Email subaddresses. – Taylor Buchanan Apr 21 '18 at 1:11
  • 1
    The problem is that many, many incorrectly written web forms and the like will not accept a valid email address like me+whatever@gmail.com so, the OP wants to submit me-whatever@gmail.com and have it handed as if it had the +. – Willtech May 21 '18 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.