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.

Why can't Exim and Procmail work together?

Discussion in 'E-mail Discussions' started by MikeLewin, Dec 1, 2011.

  1. MikeLewin

    MikeLewin Member

    Joined:
    Dec 1, 2011
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Ok, this is totally out of desperation, read a thousand posts online, tried loads of variations, but not one resolution.

    SHOULD be very simple (yeah right) but so far spent 4 full days trying to get exim to simply pipe incoming mail to a domains .procmailrc without success.

    tried exim.conf several versions of procmail: and procmail_pipe: directives and transports, but nothing happens

    tried editing .forward file in $HOME folder (same as .procmailrc), doesn't even seem to see it. (I know cause I wrote a directive that told it 'go to heck' and no error anywhere..)

    I've tried editing etc/vfilters file, no mail appears at all, and I get 'missing or malformed local part (expected word or "<") ' errors, which nobody seems to have an answer for..

    Has ANYONE at all been able to get a sitewide procmailrc to work?

    Im not talking about editing forwards per email address within cpanel or anything, that's just plain stupid, espeically for a client with 100 email addresses, all being spammed by v!agra emails.

    All I want is 'all emails@thedomain get sent to procmailrc folder in that accounts home folder'. the recipe then takes over and routes / filters, etc

    I cannot understand why cpanel has painted its users into a corner by not allowing a different MTA, I have nothing but contempt for exim after all this garbage and lack of answers.

    Sorry, but I have better things to do than spend about 30 hrs trying to get 1 thing working..

    any help would be greatly appreciated

    Oh, I'm on a hostgator dedicated server BTW, with WHM and cpanel, exim, centos 5.
     
    #1 MikeLewin, Dec 1, 2011
    Last edited: Dec 1, 2011
  2. MikeLewin

    MikeLewin Member

    Joined:
    Dec 1, 2011
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    OK, FINALLY got it to work, Just so any future visitors want to know (since any other mentions on here are 2002-2004 threads..) here's how I FINALLY got it to work (Dec 2011).

    1. forget exim.conf.. nothing works right (or does anything at all) if you try to edit that sucker.. (plus it resets to default if you do the wrong thing in cpanel)

    2. forget .forward files, seems they're ignored too..

    FIND YOUR VFILTERS file.. /etc/vfilters/yourdomain.com

    edit that (or make it if there isn't one) and add the following (change paths etc as required)

    # Exim Filter
    if $header_to: contains "yourdomain.com"
    then
    pipe "/usr/bin/procmail -Y -a /home/youraccount/.procmailrc"
    endif

    change paths as necessary, but DO NOT MISS OUT the # Exim filter at the beginning or exim will error.
    took me ages to find THAT little missing nugget

    you can also change the IF line to be an exact email address, or from ($header_from) email address (e.g. if you only want stuff from "sexypants.net" to go to your procmailrc (who doesn't?))

    you can also have multiple IF/THENs, they will be executed in order..

    I hope that saves someone as much pain as I've endured..
     
Loading...

Share This Page