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.

Deleting messages after forwarding

Discussion in 'E-mail Discussions' started by Shredsec, Aug 8, 2013.

  1. Shredsec

    Shredsec Registered

    Joined:
    Aug 7, 2013
    Messages:
    0
    Likes Received:
    0
    Trophy Points:
    0
    cPanel Access Level:
    Website Owner
    I have set up lots of email forwarding but can't work out how to automatically delete the emails received in the first account after they have been forwarded to the destination account.
     
  2. ThinIce

    ThinIce Well-Known Member

    Joined:
    Apr 27, 2006
    Messages:
    346
    Likes Received:
    7
    Trophy Points:
    18
    Location:
    Disillusioned in England
    cPanel Access Level:
    Root Administrator
    The easiest way to address this (provided you don't want to retain the copy of the message) is to delete the first mailbox entirely and retain this address solely as a forwarder.
     
  3. lanquest-it

    lanquest-it Member

    Joined:
    Apr 9, 2008
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Funny this. I have a client that's asking the very same question.

    The problem is that their mailbox users use the account to send emails.

    I have tested the Forwarders, Account Level Filtering and User Level Filtering options and in all cases the email still arrives in the first mail account inbox.

    In the case of using the Account Level Filtering and User Level Filtering options.
    Even if you set the second action to "Discard Message". The email still arrives in the first mailbox.

    Is this a bug? How can this be achieved?
     
  4. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    They could use their cPanel username & password to send emails.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Rather than setting up a forwarder, you could utilize the "User Level Filtering" option for the first email address. Setup a rule to redirect the email sent to the first address, and then have the additional rule discard the message.

    Thank you.
     
  6. lanquest-it

    lanquest-it Member

    Joined:
    Apr 9, 2008
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Hi Michael,

    I've mentioned in my post. We tested that scenario using both the Account Level Filtering and User Level Filtering options setting the second action to "Discard Message".

    If the mailbox exists, the email is still being sent to the 1st mailbox after being forwarded. Message".

    I've even setup with just the action "Discard Message". The email still arrives in the mailbox.

    Hence why I'm asking if this is a bug?..
    Surely it's supposed to discard the email after the email is forwarded correct?

    Or perhaps we're all missing a small extra config in Exim somewhere?

    Forgot to add: Our server is running WHM 11.38.1 (build 15) | CPanel 11
     
    #6 lanquest-it, Aug 8, 2013
    Last edited: Aug 8, 2013
  7. lanquest-it

    lanquest-it Member

    Joined:
    Apr 9, 2008
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Hi quietFinn,

    Unfortunately this opens up the whole CPanel to the mailbox holders.
    This is not what the Cpanel account holders want.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I was unable to reproduce the behavior you have described when using the "User Level Filtering" option. It worked as expected and forwarded the email after discarding the message. Could you take a screenshot or let us know the exact actions configured for the filter? Also, could you confirm the forwarder itself is removed when enabling the filter?

    Thank you.
     
  9. lanquest-it

    lanquest-it Member

    Joined:
    Apr 9, 2008
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Hi Michael

    I'm quite surprised with your findings.

    I've tested with just the "Discard Message" option enabled and saved. There's no forwarding setup, the email still lands in the 1st mailbox.

    08-08-2013 17-06-24.jpg

    Would you be so kind to reply with the relevant version and build information for the following so I can compare.

    Exim, CPanel, WHM

    Much appreciated
     
    #9 lanquest-it, Aug 8, 2013
    Last edited: Aug 8, 2013
  10. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    Then create a dummy email account and use that only for authentication.
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Do you have any third-party applications installed that could alter the behavior of Exim? The /var/log/exim_mainlog file should output the filter action. Feel free to open a support ticket so we can take a closer look:

    Submit A Ticket

    You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  12. lanquest-it

    lanquest-it Member

    Joined:
    Apr 9, 2008
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Thank you Michael. Ticket created.
     
  13. lanquest-it

    lanquest-it Member

    Joined:
    Apr 9, 2008
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Hi Guys,

    The solution was this.

    If you look at the screenshot provided, you'll see the rule is based on if the email address "Equals" whatever@whatever.com

    08-08-2013 17-06-24.jpg

    Change it to "Contains".
    Now the whole thing works as it should.

    That's it. Hell knows why this doesn't work with the Equals rule if the sender uses just the email address, you would expect it to work right?
     
  14. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Thank you for sharing the solution. Yes, in my testing, using "equals" worked without issue. However, using "contains" should have no negative effects if it provides the desired behavior.

    Thank you.
     
Loading...

Share This Page