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.

SOLVED Filtered forwarder?

Discussion in 'E-mail Discussions' started by PL_K, Apr 25, 2017.

Tags:
  1. PL_K

    PL_K Registered

    Joined:
    Apr 25, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Multiple
    cPanel Access Level:
    Website Owner
    I've got one user who is the paying owner of a website on Squarespace which I handle some technical stuff for. This is not the main site of our company, but anything technical related to the site is really stuff that should be coming to my inbox. However, anything billing-related should be going to his account. This individual is not very technically oriented and doesn't work well with others, so it's impractical for me to set up forwarding rules on his devices (he's also in the US, where I am in Asia).

    He's one of these guys "it sounds too complicated, so I don't want to do this thing that takes a couple of minutes to save multiple people loads of hassle and confusion over the next few years of collaboration".

    I'd like to set up a forwarder that sends me a copy of all emails from @squarespace.com.

    Our main web account is through a standard "shared" type account with Cpanel access. My options are restricted to Cpanel access and Webmail portal access to his account. I am fully authorized to enter his email account with or without his permission/knowledge, but I don't like working like that and I really, really don't like having a window to his webmail open in my browser so I can monitor responses to tickets I have started that are being sent to him.

    Is there any way to accomplish this from a "shared" type Cpanel account? I have used forwarders extensively and filters as well, but I can't see anything in either of these which will send me a copy.
    I created a filter which found a string, with the action to "Redirect to " my email. It worked and I got the email instantly. However, it didn't leave a copy in his email.

    Which leaves me creating a forwarder for ALL his incoming messages. Which I don't want.
     
  2. km9

    km9 Member

    Joined:
    Apr 5, 2017
    Messages:
    15
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Asia
    cPanel Access Level:
    Root Administrator
    Maybe add another action in the filter after the redirect to deliver to his inbox?

    Edit: No, sorry, this won't work without adding 'unseen' manually into the filter file :-(

    It's a pity this functionality isn't built into the filters gui.
     
    #2 km9, Apr 26, 2017
    Last edited: Apr 27, 2017
  3. km9

    km9 Member

    Joined:
    Apr 5, 2017
    Messages:
    15
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Asia
    cPanel Access Level:
    Root Administrator
    I don't seem to be able to edit any more.

    Anyway, I've just tested this again, and it actually does work. I don't understand why, as the filter it produces has two delivery actions and looks like this:

    if not first_delivery and error_message then finish endif

    #Test
    if
    not delivered
    then
    deliver "me@example.com"
    save "$home/mail/domain.com/emailaccount/" 660
    endif

    I thought once a successful delivery was made it would stop without 'unseen' see "Significant Deliveries" here 3. Exim filter files.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    After you add the "Redirect to Email" rule, add an additional rule for "Deliver to folder" and direct the message to the INBOX folder of the original email address.

    Let us know if that helps.

    Thank you.
     
  5. km9

    km9 Member

    Joined:
    Apr 5, 2017
    Messages:
    15
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Asia
    cPanel Access Level:
    Root Administrator
    Michael, any comment on my message #3 above? Why doesn't this stop after the first successful delivery?
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Could you post a screenshot of the specific filter rule you are adding, as it appears in the cPanel UI?

    Thank you.
     
  7. km9

    km9 Member

    Joined:
    Apr 5, 2017
    Messages:
    15
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Asia
    cPanel Access Level:
    Root Administrator
    upload_2017-5-2_15-11-57.png

    Maybe it's just me misunderstanding this, from 3. Exim Filters above:

     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @km9,

    Regarding this filter:

    It's true the "deliver" action is considered a significant delivery. However, as I understand, Exim will still process the rules in the same filter. For instance, let's say the "deliver" and "save" actions were separated into their own rules like this:

    Code:
    #Test
    if
    not delivered
    then
    deliver "me@example.com"
    endif
    
    #Test2
    if
     $header_to: is "test2@domain.tld"
    then
     save "$home/mail/domain.tld/emailaccount/" 660
    endif
    Then, Exim would not process the "Test2" filter because the "Test" filter included a significant delivery.

    Thank you.
     
  9. PL_K

    PL_K Registered

    Joined:
    Apr 25, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Multiple
    cPanel Access Level:
    Website Owner
    Yeah, as I mentioned above, I am using a "shared" type account. I cannot edit filters manually on this level. I am restricted to only the basic filters. And as of right now, they do not work in a way that allows this.

    I did try to add a second process which redirects the message to the Inbox, hopefully to double the message up before it is released from the function, however it doesn't work.

    My feeling is that it's either an "order of operations" problem, as described above (if/OR, not if/AND). This isn't how it should work. If I + add a function, it shouldn't be an "else". It should be an "and".
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @PL_K,

    Could you post a screenshot of how the filter you created looks in cPanel?

    Thank you.
     
  11. PL_K

    PL_K Registered

    Joined:
    Apr 25, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Multiple
    cPanel Access Level:
    Website Owner
    bwahaha.

    I've discovered my error. With forwarders, the email "to" is assumed, so not added.

    For some reason, I forgot to include the "to", so I only had a rule looking for "From" and sending a copy to me. So I was getting a copy, but for some reason, it wasn't showing up in his email box (odd behavior actually). When I realized this, I added both the "To" condition and the "From" condition and the behavior was correct.

    There was no need to add a second action of Deliver to folder (Inbox).

    My bad.
     
  12. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    I'm happy to see you were able to address the issue. Thank you for updating us with the outcome.
     
  13. km9

    km9 Member

    Joined:
    Apr 5, 2017
    Messages:
    15
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Asia
    cPanel Access Level:
    Root Administrator

    Thanks. That makes absolute sense now.
     
    cPanelMichael likes this.
Loading...

Share This Page