Pegasus Mail & Mercury

Welcome to the Community for Pegasus Mail and
The Mercury Mail Transport System, the Internet's longest-serving PC e-mail system!
Welcome to Pegasus Mail & Mercury Sign in | Join | Help
in
Home Blogs Forums Downloads Pegasus Mail Overview Mercury Overview

How do I forward selected email?

Last post 07-25-2008, 22:06 by subelman. 8 replies.
Sort Posts: Previous Next
  •  07-23-2008, 21:22

    • subelman is not online. Last active: 01-07-2009, 20:31 subelman
    • Top 75 Contributor
    • Joined on 05-10-2007
    • Los Angeles, California
    • Member
    • Points 335

    How do I forward selected email?

    I'm trying to configure Mercury/32 (v4.52) so that some (but not all) of my wife's incoming email gets copied to her BlackBerry. Here's what I tried:

    1) Verified that email sent to user@blackberry.net shows up in her Blackberry.

    2) Created a filter, user.rul, that forwards to the BlackBerry all mail that does NOT have "xxxxx" in the Subject:

           if subject contains "xxxxx" exit rule processing
           always forward to user@blackberry.net

    3) Created a Marcury alias, blackberry@mydomain.com that is aliased to
                    filter:c:\mercury\user.rul

    4) Tested that the filter and alias combination works as expected:

       Mail sent to blackberry@mydomain.com (the alias)
        a) if Subject contains xxxxx, mail is dropped (as expected)
        b) Otherwise, mail is sent to user@blackberry.net (as expected)

    5) Create a FORWARD file for user@mydomain.com that forwards incoming email to the alias:
         Forward-To: blackberry@mydomain.com
         Deliver-Also: Y

    6) Tested by sending email to user@mydomain.com
       a) All incoming email is delivered to user@mydomain.com inbox (as expected)
       b) All incoming email is sent to filter (as seen in the Mercury Core window) but is always dropped - independent of the Subject line

    I have to be doing something dumb, but I can't see what it is.


  •  07-23-2008, 23:25

    Re: How do I forward selected email?

    I'm having a bit of chaos following what you mean. Does user@mydomain.com have both a forward file and an always filter rule, and this combination does not work with only subject filtering or with any filter trigger?
    Kind regards / Peter
  •  07-24-2008, 0:36

    • subelman is not online. Last active: 01-07-2009, 20:31 subelman
    • Top 75 Contributor
    • Joined on 05-10-2007
    • Los Angeles, California
    • Member
    • Points 335

    Re: How do I forward selected email?

    The user, user@mydomain.com, has a FORWARD file, that forwards the email to the Mercury alias 'blackberry@mydomain.com'.

    This alias is associated with a filter (as far as I know, you can only associate filters with aliases and not with users).

    The problem is that if I send email to the alias, the email is processed by the filter and sent on to the blackberry, but if I send email to the user, the email seems to be processed by the filter, but it does not get sent on to the blackberry.

     

  •  07-24-2008, 17:32

    Re: How do I forward selected email?

    I'm not sure I follow what you are doing.  I would simply use a global rule looking for the users email address AND the matching subject and forward it to the blackberry account/address.  Here's one where I'm matching an email address and header and forwarding to an external address.  The addresses have been munged.  The mail is delivered to the local account and forwarded to an external account.

    If header "FCT" contains "address@mydomain.com" LogicalAnd ""
    If expression headers matches "*Content-Type: text/calendar*" Forward "address@otherdomain.com"

    Am I missing something about what you are trying to do? 


    Thomas R. Stephenson
    San Jose, California
    Member of Pegasus Mail Support Team
  •  07-24-2008, 19:56

    • subelman is not online. Last active: 01-07-2009, 20:31 subelman
    • Top 75 Contributor
    • Joined on 05-10-2007
    • Los Angeles, California
    • Member
    • Points 335

    Re: How do I forward selected email?

    Here's what I'm trying to accomplish:

    The current arrangement is that all her incoming email is delivered to her regular Mercury inbox. In addition to that, a copy of ALL the email is being forwarded to the BlackBerry by means of a FORWARD file. This works, but can be improved.

    It would be nice if she could have SOME of the email NOT copied to the BlackBerry. For example, she's subscribed to several newsletters. She doesn't need them on the BlackBerry, and can read them later, when she fires up Pegasus at home. Sending those on to the BlackBerry just clutters up its limited display. It's easy to make a list of senders or subject lines that should NOT be copied to the BlackBerry.

    My idea was to create some sort of filter that decides if each incoming email should be copied to the BlackBerry or not, but that ALWAYS saves ALL her incoming email in the Mercury inbox.

    Any suggestions on how to do this?

     
    Thanks
     

     

  •  07-24-2008, 20:14

    Re: How do I forward selected email?

    Dump the forward file and aliases and add the following to your rules.mer.  This pair of rules looks for the email address in the To: Cc: fields AND if .TRUE. will forward the message to the blackberry email address if the subject contains the text XXXXX.  Is this not what you are trying to do?

    If header "CT" contains "email@mydomain.com" LogicalAnd ""
    If header "S" contains "XXXXXX" Forward "user@blackberry.com"

    When I work with "crackberry" users though I generally set the second rule to look at the SIZE of the message and only forward it if is less than a specified size.  I've found that "crackberry" users want to get all of their mail via the "crackberry" if at all possible.  ;-)

     


     


    Thomas R. Stephenson
    San Jose, California
    Member of Pegasus Mail Support Team
  •  07-25-2008, 0:41

    • subelman is not online. Last active: 01-07-2009, 20:31 subelman
    • Top 75 Contributor
    • Joined on 05-10-2007
    • Los Angeles, California
    • Member
    • Points 335

    Re: How do I forward selected email?

    Thomas:

    Your idea almost works. But remember that what I have is a list of things that should NOT be forwarded to the BlackBerry .Everything else needs to be forwarded. Therefore the rules.mer has to look more or less like this:

    # if mail is not for wife. dont send to her BB
    If NOT header "CT" contains "wife@mydomain.com" Goto "skipBB"
    # Mail for wife - dont send cartoons and newsletters to BB
    If header "S" contains "Daily Cartoon" Goto "skipBB"
    If header "F" contains "newsletters@news.com" Goto "skipBB"
    # Everything else goes to BB
    Always Forward "wife@blackberry.net"
    # Continue processing
    Label "skipBB"

    But now, if someone sends an email with a BCC to my wife, it will not be sent to her BlackBerry, even though it was not a cartoon or a newsletter.

    The beauty of using the FORWARD file is that this file is processed after Mercury has resolved which inbox gets the email, so the BCC issue has been taken care of. 

     

  •  07-25-2008, 3:56

    Re: How do I forward selected email?

    You seem to know what mail you do not want forwarded so why not why not simply create a dist list with the addresses that you do not want forwarded and then do a list can type filter for the second part. You can also MOVE these messages to a separate account and the forward everything that goes to the original account using the FORWARD file.
    The beauty of using the FORWARD file is that this file is processed after Mercury has resolved which inbox gets the email, so the BCC issue has been taken care of.
    But that did not work because mail from the server to the alias was discarded to prevent looping. The only way the forward file would work is to keep the mail that you do not want forwarded from being delivered to this account.

    Thomas R. Stephenson
    San Jose, California
    Member of Pegasus Mail Support Team
  •  07-25-2008, 22:06

    • subelman is not online. Last active: 01-07-2009, 20:31 subelman
    • Top 75 Contributor
    • Joined on 05-10-2007
    • Los Angeles, California
    • Member
    • Points 335

    Re: How do I forward selected email?

    I figured it out.  My wife's inbox is "wife". I created an alias "wife@mydomain.com", which is associated with a filter file, "wife.rul".

    The filter file puts all the email in the "wife" inbox, and then selectively forwards emails to the BlackBerry:

    # First save all email in the Pegasus inbox
    Always Copy "wife"
    # Now select which email get dropped
    If header "S" contains "Daily Comics" Exit ""
    If header "FE" contains "newsletters@news.com" Exit ""
    # Anything else is forwarded to the BB
    Always Forward "wife@blackberry.net"

    When delivering email to "wife@mydomain.com", Mercury always uses the alias, so all email, including BCC goes through the alias. 

    As Thomas suggested, I did use a list type filter for the list of senders that should not be forwarded.

     

View as RSS news feed in XML

Copyright © 2007 David Harris / Peter Strömblad. All Rights Reserved. | Terms of Use | Privacy Statement
Questions/Problems with community.pmail.com? | Visit our Hoster: PraktIT | Pegasus Mail Home Page