Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 23
  1. #1
    Member
    Join Date
    Sep 2004
    Posts
    18

    Question email filtering

    hello everyone,

    I host my domain using cpanel 9. The email filtering seems quite limited; I know I have access to filter options in Horde and squirrelmail but I always get my mail via pop to my mail client so need to rely on the powers of cpanel's filters in some ways;

    my current conundrum is:
    I need to filter mail sent to a certain email address on my domain in such a way that some of it (with a specific subject line content) goes to the inbox for that account whilst the rest of the mail gets discarded or maybe sent somewhere else. But this seems impossible to set up, partly because the filter options are quite basic and I seem to have no control over the ordering of the filters.

    is there a way to achieve my aim? Do I need to manually download and edit the filters.gz file with some way or technique then re-upload it? i'm already familiar with a similar technique for setting my alias file for various programs and mail lists.

    Or do I need to find and install some extra mail management software of some kind in my hosting? (or ask my host to?)

    thanks a lot for any help - I'm all out of ideas here,

    lee
    england

  2. #2
    Member
    Join Date
    Sep 2004
    Posts
    18

    Default

    hello everyone,

    (second and last posting of this in case anyone who can help missed the first one)

    I host my domain using cpanel 9. The email filtering seems quite limited; I know I have access to filter options in Horde and squirrelmail but I always get my mail via pop to my mail client so need to rely on the powers of cpanel's filters in some ways;

    my current conundrum is:
    I need to filter mail sent to a certain email address on my domain in such a way that some of it (with a specific subject line content) goes to the inbox for that account whilst the rest of the mail gets discarded or maybe sent somewhere else. But this seems impossible to set up, partly because the filter options are quite basic and I seem to have no control over the ordering of the filters.

    is there a way to achieve my aim? Do I need to manually download and edit the filters.gz file with some way or technique then re-upload it? i'm already familiar with a similar technique for setting my alias file for various programs and mail lists.

    Or do I need to find and install some extra mail management software of some kind in my hosting? (or ask my host to?)

    thanks a lot for any help - I'm all out of ideas here,

    lee
    england

  3. #3
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Unless you're the server administrator (if not contact them) then you can always directly edit the domains /etc/vfilters/domain.com file and use the full strength of exims filtering system:
    http://www.exim.org/exim-html-4.40/d...ilter_toc.html
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  4. #4
    Member
    Join Date
    Sep 2004
    Posts
    18

    Question

    thanks for that,

    i'm just a web hosting client on someone else's server. I could ask the host guy for help but I think he may (reasonably) be unwilling to start taking custom filter requests.

    Is there no other way I can get more flexibility out of the cpanel options? I'm guessing not. Shame that the filter options are quite basic.

    lee

  5. #5
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    It is unfortunate, but it's tricky to get a great deal of functionality out of a web-based interface for something that is essentially a mini programming language. I guess your best bet would be to see if your hosting provider would help you more by looking into the filters for you.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  6. #6
    Member
    Join Date
    Sep 2004
    Posts
    18

    Question

    Thanks again,

    The server's OS is FreeBSD so maybe I can find a compatible email client I can install in my webspace to act on mails, before I then pop from that to my pc. I'm on good terms with my hosting guy but he's so busy doing paid work (he's also a programmer) that I know he won't be able to help me at the drop of a hat. In the past, I tentatively looked into Mutt but wasn't sure if it was compatible or had any idea how to install it in my webspace anyway.

    Do you or anyone else know of a relevant piece of software which would work with my cpanel email accounts? All I really need it to do is pop from my domain's accounts with filtering including delete/discard options. I would then like to pop from the resulting inbox to my pc's Thunderbird. The main drive behind all this is to stop most spam and virus emails from getting through my domain in the first place. I would achieve this by applying specific filters to specific accounts, where there is guaranteed and unique sender/subject/body content.

    I think I'm kind of looking for an executable version of Horde, or something ...

    Many thanks,
    lee
    Last edited by lee.; 09-21-2004 at 07:47 AM.

  7. #7
    Member
    Join Date
    Sep 2004
    Posts
    18

    Default

    further afterthoughts:

    I have access to and currently use aliases, cron jobs and wget;
    maybe these could be useful in conjunction with my last mail?

    lee

  8. #8
    Member
    Join Date
    Sep 2004
    Posts
    18

    Question

    hello again,

    Does anyone know how / if / in which order i can add one or more cpanel email filters to achieve _all_ the following:

    email from a specific person to a specific address to go there directly;
    all other email to the same address to be piped to a unique file destination;
    email from the same person above to a second specific address to go there directly;
    all other email to the second address to be piped to a second unique file destination.

    If I don't hear from anyone, I'll assume you don't think it's possible.

    Thanks a lot,
    Lee

  9. #9
    Member
    Join Date
    Jun 2004
    Posts
    76

    Default

    I dunno, but I just can't help but think this would be possible using Exim filter rules?

    Now this is just me throwing out an initial idea, but possibly a .forward file constructed like...

    Code:
    # Exim filter
    if $header_from: contains "foo@bar.com" and
       $header_to: contains "user1@yourdomain.com" then
       deliver user2@yourdomain.com
    This could handle the multiple cases you're speaking of. Haven't tested yet. Maybe when the dentist is done working me over today I will though

    Those more familiar with Exim... is this a possible solution?
    Last edited by picoyak; 10-08-2004 at 08:56 AM.

  10. #10
    Member
    Join Date
    Sep 2004
    Posts
    18

    Default

    hello,

    thanks; jonathan recently advised me to try and get my host to adjust the exim filters for me but he seems to be unwilling to do so.

    is a .forward file part of exim or is it something separate I could upload somewhere in my hosting? I also have access to my forwarders and aliases if that's any use or relevant here.

    By the way, good luck with the dentist - i went for a check yesterday because I knew something was wrong and it turns out I need a filling. Have to wait a couple of weeks for the proper filling but a temporary one's been put in with no pain involved at all in doing that.

    lee

  11. #11
    Member
    Join Date
    Jun 2004
    Posts
    76

    Default

    Well according to the exim docs, it's just a normal .forward file in your home directory. So assuming you have shell access then you could create or edit that.

    I did just test, and no dice. I must be missing a piece of the puzzle someplace. Maybe a Sieve filter would be more appropriate. This must be possible somehow. If so, I'm gonna find out. The mail server isn't allowed to win!

    Now... where's my toothbrush?

  12. #12
    Member
    Join Date
    Sep 2004
    Posts
    18

    Question

    hello again,

    Thanks for looking into it for me; I really wouldn't have much idea where to start myself.

    By the way, I don't have shell access unless I ask for it; in which case it's always easier if I get my host to do whatever the issue is.

    lee

  13. #13
    Member
    Join Date
    Sep 2004
    Posts
    18

    Lightbulb

    Just in case it helps, I'll explain why I want to do this;
    I want to use the perl demime program on my mailing lists which I host, but posts from webtv subscribers (aghhh) throw a spanner in the works. This is because I need to set the relevant demime option to allow webtv's reply 'attachments', but this then produces an ugly section of full headers inline in the mail.

    So, after much (and continuing) fiddling about, the only practical solution (?) seems to be to somehow force webtv posts to go directly to the mail list alias so that demime doesn't act on them at all, whilst all the other subscribers' posts should be piped to demime then onto the mailing list.

    It may be an extra complication here that I want to demime 2 or more different lists, and the webtv subscribers need to be able to write directly into any of them. ie each list of course has its own mail-to address and relevant mail list alias.

    So to summarise, I need this:

    All mails sent to all (but finite amount of) mail lists should be piped via demime to the appropriate list, except for any mails from webtv subscribers which should go directly to the appropriate list.

    My mailing manager is Mailgust and the style of my aliases are as follows, where the incoming mail triggers a mailgust perl file to activate the cron and mail retrieval:

    list@domain.com: "|/home/mycpanellogin/www/mailgust/dbcron.pl 9" (for eg)

    I can work the demime pipe successfully by having the alias as: (all one line)

    list@mydomain.com: |/home/mycpanellogin/www/demime.pl '|/home/mycpanellogin/www/mailgust/dbcron.pl 9'


    I hope all that hasn't thrown everything into confusion now ...

    lee

  14. #14
    Member
    Join Date
    Sep 2004
    Posts
    18

    Lightbulb

    Just in case anyone's interested, I spoke to my host and did some exim learning, and have succeeded in my aim by creating and uploading a filter as shown below. It's my first attempt at an exim filter so I appreciate it may be excessively long.


    # Exim filter
    if
    $header_from: contains "webtv" and
    $header_to: contains "list@mydomain.com"
    then
    pipe "/home/mycpanellogin/www/mailgust/dbcron.pl 1"
    endif
    if
    $header_from: does not contain "webtv" and
    $header_to: contains "list@mydomain.com"
    then
    pipe "/home/mycpanellogin/www/demime.pl '|/home/mycpanellogin/www/mailgust/dbcron.pl 1'"
    endif

    ... then the same section again but specific to my other mail list address.

    lee

  15. #15
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Excellent stuff. Well done for cracking it
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

Similar Threads & Tags
Similar threads

  1. Replies: 11
    Last Post: 05-11-2012, 12:38 PM
  2. Email Filtering
    By frankfer in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 08-27-2007, 09:37 AM
  3. Email filtering
    By oeriksen in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-31-2006, 03:53 PM
  4. Email filtering
    By h8r in forum E-mail Discussions
    Replies: 4
    Last Post: 04-16-2006, 03:18 PM
  5. Email Filtering
    By TBucketMan in forum E-mail Discussions
    Replies: 3
    Last Post: 12-30-2004, 02:06 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube