Skip to main content

Filtered forwarder?

Comments

12 comments

  • km9
    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.

    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.
    0
  • km9
    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.

    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.
    0
  • cPanelMichael
    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.

    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.
    0
  • km9
    Michael, any comment on my message #3 above? Why doesn't this stop after the first successful delivery?
    0
  • cPanelMichael
    Michael, any comment on my message #3 above? Why doesn't this stop after the first successful delivery?

    Could you post a screenshot of the specific filter rule you are adding, as it appears in the cPanel UI? Thank you.
    0
  • km9
    46563 Maybe it's just me misunderstanding this, from 3. Exim Filters above: If at least one significant delivery is set up, the filter is considered to have handled the entire delivery arrangements for the current address, and no further processing of the address takes place.
    0
  • cPanelMichael
    Hello @km9, Regarding this filter:
    if not first_delivery and error_message then finish endif #Test if not delivered then deliver "me@example.com[/EMAIL]" save "$home/mail/domain.com/emailaccount/" 660 endif

    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:
    #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.
    0
  • PL_K
    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".
    0
  • cPanelMichael
    Hello @PL_K, Could you post a screenshot of how the filter you created looks in cPanel? Thank you.
    0
  • PL_K
    Hello @PL_K, Could you post a screenshot of how the filter you created looks in cPanel? Thank you.

    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.
    0
  • cPanelMichael
    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.

    I'm happy to see you were able to address the issue. Thank you for updating us with the outcome.
    0
  • km9
    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:
    #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.

    Thanks. That makes absolute sense now.
    0

Please sign in to leave a comment.