Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Change forwarded email metadata

Discussion in 'E-mail Discussions' started by Dav987, Jan 11, 2018.

  1. Dav987

    Dav987 Member

    Joined:
    Jan 11, 2018
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    US
    cPanel Access Level:
    Website Owner
    I am looking to change the metadata of an email (specifically, the sender's address and subject) when it is forwarded to another account. It seems this is not a native function, but I assume I can accomplish this task by using a script, and just piping the messages to it. However, I have not idea how to actually make this work. I noticed on this thread: Email Forward to PHP Script a discussion on how to process email messages, so would I be starting with something like that? What would the actual manipulation script look like? What language should I even be using, PHP or pearl?

    Thank you!
     
  2. Dav987

    Dav987 Member

    Joined:
    Jan 11, 2018
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    US
    cPanel Access Level:
    Website Owner
    Actually, I don't even really need to change the subject. Primarily, I need to change the sender information to protect their privacy.
     
  3. Dav987

    Dav987 Member

    Joined:
    Jan 11, 2018
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    US
    cPanel Access Level:
    Website Owner
    Also, I should apparently specify that the end goal is to push these messages to a single off-site email address. I know it sounds a little crazy, but I am not doing some spoof and spam operation, but just trying to permit one of three already known e-mail addresses (these could be hard-coded) send a message to a forwarder, which will strip out their own e-mail address and replace it with a generic one on the site, then forward it to a single external address (which could also be hard-coded). All of this is for a very specific privacy need.

    I welcome any assistance--thank you!
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,782
    Likes Received:
    1,712
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You could likely achieve this by piping the messages to a PHP script, but help with the coding of such a script isn't something we offer. You will likely find more help on a website such as StackOverflow. EX:

    Email piping with php script

    Of note, you may find the following option under the "Mail" tab in "WHM >> Exim Configuration Manager >> Basic Editor" useful:

    Enable Sender Rewriting Scheme (SRS) Support

    Per it's description:

    This option rewrites sender addresses so that the email appears to come from the forwarding mail server. This allows forwarded email to pass an SPF check on the receiving server.

    Thank you.
     
    Dav987 likes this.
  5. Dav987

    Dav987 Member

    Joined:
    Jan 11, 2018
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    US
    cPanel Access Level:
    Website Owner
    That sounds very much like what I need at the bare minimum. However, I can't find it. For e-mail options, I have the following sections:
    • Email Accounts
    • Forwarders
    • Email Routing
    • Autoresponders
    • Default Address
    • Track Delivery
    • Global Email Filters
    • Email Filters
    • Authentication
    • Address Importer
    • Apache SpamAssassin™
    • Email Marketing
    • Encryption
    • Configure Greylisting
    • Calendars and Contacts
    • Email Disk Usage
    Unfortunately, cpanel is being hosted by a 3rd party, so my options are somewhat limited. The first place I looked was under "forwarders" but found nothing of use (except for the option to set up or remove them). Any thoughts?

    Thank you again for at least giving me something promising to work on!
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,782
    Likes Received:
    1,712
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    That option is available in Web Host Manager, and only accessible by your web hosting provider if your on a shared hosting plan. You could contact them to see if it's something they will consider enabling.

    Thank you.
     
    Dav987 likes this.
  7. Dav987

    Dav987 Member

    Joined:
    Jan 11, 2018
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    US
    cPanel Access Level:
    Website Owner
    Thanks, I am already in contact with them, and they have not been very helpful. With what you have told me, and have been able to ask more directly about this specifically. I will seen see if it is a matter of ignorance or obstinance.

    Again, thank you!
     
    cPanelMichael likes this.
  8. Dav987

    Dav987 Member

    Joined:
    Jan 11, 2018
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    US
    cPanel Access Level:
    Website Owner
    Okay, they have refused to enable it "for security reasons." At least now I know that I need to find another provider. Thank you for your assistance!
     
Loading...

Share This Page