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.

Exim filtering

Discussion in 'General Discussion' started by clefren, Jan 13, 2004.

  1. clefren

    clefren Registered

    Joined:
    Jan 12, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I would like to be able to use the full power of the exim filtering language rather than just the small subset that cPanel provides in email filtering. I have an account on a shared server and so only have full access to my home directory and write access to files owned by me in /etc/vfilters.

    I've tried using a .forward file but the problem is that by the time that it is invoked the only email still to be delivered is for my main box. Beside, the check_local_user line in the driver means that the mail must be to my username. A possible solution would be to add a new driver much closer to the top of the driver list but I'm sure that I'll get it wrong the first time or two and I hate to ask my sys admin to make changes to exim.conf that could break all email on the server.

    Another thought that I had is to rewrite the files in /etc/vfilter. The concern that I have is that the files are automatically generated by cPanel from the .filter file in my home directory and my changes may get wiped out. I would guess that the files are only updated when I add a new filter in cPanel but I hate to just guess at what code is going to do.

    I don't want to try using procmail. There seem to be too many problems with getting it working properly with exim and I find the exim filter language much more readable than procmail.
     
  2. spiff06

    spiff06 Well-Known Member

    Joined:
    Jan 17, 2004
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    I would dearly like to know about this as well.

    procmail has been (sort of) working by piping to /usr/bin/procmail in the .forward, but only on mail coming into the main box.

    Is it possible to set up an exim.conf to allow custom, EXIM filtering on every mail account, and not just the main box?

    - Eric
     
  3. clefren

    clefren Registered

    Joined:
    Jan 12, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Software engineering should not be an experimental science but considering the totally underwhelming response that I've gotten here the only thing that I could do was to try different things and see what worked. If you overwrite the subdomain files in /etc/vfilters then you can use the full power of the exim filtering language rather than the egregous subset the cPanel gives you in email filtering. In addition you can use a different file for each subdomain. There are two main things that you have to beware of:
    1) If you make a mistake in the exim filter file then all of your mail for that subdomain will be deferred. A couple of times cPanel has screwed up the .filter file and I haven't gotten any email. There didn't seem to be any way to fix it using cPanel and I had to resort of doing an edit on the .filter file. It took several days to figure out what was happening the first time but after that I knew what I had to do.
    2) DO NOT USE THE EMAIL FILTERING IN CPANEL!!! If you do then cPanel will overwrite all of the files in /etc/vfilters. Copying the identical file to all of the subdomains seems like a really stupid way to do things. Symbolic links would make things a bit better.
    I hope that others will find this information useful. The main thing that I've added to the exim filter file is a log of the emails that have been deleted and I also write all of them to a file just in case I make a mistake in the filter file and something gets deleted that I would like to see.
    May all spammers live to be 110 years old and may they keep all of their teeth and may every one of those teeth ache.
    Enjoy!
     
Loading...

Share This Page