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.

Cpanel exim set up a mail relay for spam filtering

Discussion in 'E-mail Discussions' started by Remm, Sep 12, 2012.

  1. Remm

    Remm Member

    Joined:
    Sep 12, 2012
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Cambridge, Ontario, Canada
    cPanel Access Level:
    Root Administrator
    Okay here's the problem:

    I'm using cpanel. I am trying to set up spamtitan. If anyone has done this before than that should be enough information to answer the question, comically enough.

    Now for the longer explanation...

    I can have the MX record set to the spamtitan's ip. My spamtitan server is on cloud so it sends to the ip of the cloud server, spamtitan reads that it is okay and sends it back to my domain. This is where the problem persists. What next?

    Like.. It gets sent back by spamtitan but it hits the MX record again and causes a loop-->failed mail.

    If anyone can solve that problem I'll be set.



    Now for the exim attempt shenanigans...

    But even at that I'm not sure if the smarthost is actually catching anything or not. It should be able to tell if my spamtitan cloud server is the one sending the mail, correct?

    Therefore could I not leave the MX record pointing at my domain/mailserver and have a smarthost that sends ALL MAIL except for the mail that has been sent by my spamtitan cloud to my spamtitan cloud?

    Incoming mail --> my server --> not from spamtitan, therefore --> cloud spamtitan server --> my server --> is from spamtitan, therefore --> received to mail

    Which would be:

    smart_route:
    driver = manualroute
    route_list = !184.175.65.142 184.175.65.142
    transport = remote_smtp

    Ttrying this exact thing now gets me an 'infinite' loop. I figure this is because the '!184.175.65.142' part is faulty. Why? I can only presume that it is because when spamtitan sends the email back to my domain it does not have any attached identified that says "yes I am from 184.175.65.142". Would this be correct? If so, how would I remedy this?

    Long story short, I have no idea what I am doing after spending 3 weeks on it. Please help ;_;
     
  2. Remm

    Remm Member

    Joined:
    Sep 12, 2012
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Cambridge, Ontario, Canada
    cPanel Access Level:
    Root Administrator
    I *guess* it could be that I'm returning it to the domain and not something else? Like.. I'm telling spamtitan to send it to domain.com or mail.domain.com... would this be in fact wrong? Should I be telling it to go somewhere else (so it goes STRAIGHT to the mail?)
     
  3. Remm

    Remm Member

    Joined:
    Sep 12, 2012
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Cambridge, Ontario, Canada
    cPanel Access Level:
    Root Administrator
    I'll bounty this on stack/faultOverflow for a total of 400 rep if I can get any answers on this if that's any incentive. Rather begging for an answer at this point. :(
     
  4. Lik

    Lik Member
    PartnerNOC

    Joined:
    Dec 9, 2008
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    If you want only to scan *incoming* emails on SPAM/Junk then all you need it to point DNS MX records for your domains to spamtitan appliance. Just make sure you select "Local Mail Exchanger" in "Email Routing" section during DNS zone modification. It will put domains to /etc/localdomains, thus Exim will still consider domains as local and allow your scripts to send emails without sender verification failed error.

    In this case the only side-effect which may be noticed will occur during email delivery from the configured on the server domains to spam-protected domains - emails will not leave the server but considered as local delivery (thus bypassing spamtitan filter).

    Another case if you want to scan all (incoming/outgoing) emails with spamtitan appliance. In addition to DNS MX records update you will need to configure mail relay (aka smarthost) to relay all outgoing emails via spamtitan appliance. Example of smarthost configuration you may find at http://forums.cpanel.net/f43/relay-all-mail-through-spam-filtering-appliance-155390.html forum thread.
     
  5. dreas

    dreas Active Member

    Joined:
    Nov 19, 2008
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Amsterdam, The Netherlands
    Lik is very correct :) You indicate to also want to configure cPanel ONLY to accept email from Spamtitan (to prevent direct spam). [URL="https://my.spamexperts.com/kb/31/Accept-email-only-from-the-Hosted-Cloud-filter-nodes.html]This link[/URL] may help with that.
     
  6. Remm

    Remm Member

    Joined:
    Sep 12, 2012
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Cambridge, Ontario, Canada
    cPanel Access Level:
    Root Administrator
    Oh. How cute. It needed to be set to a local mail exchanger. I never saw this noted in all my searches. Damnit, but thank you very much. I'm going to go seppuku now.
     
  7. Lik

    Lik Member
    PartnerNOC

    Joined:
    Dec 9, 2008
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    @Remm, have you managed to configure your bundle with spamtitan? It would be nice if you share some results with community.
     
  8. Remm

    Remm Member

    Joined:
    Sep 12, 2012
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Cambridge, Ontario, Canada
    cPanel Access Level:
    Root Administrator
    It was literally that I had automatically detect configuration for my record that pointed to the spamtitan cloud. Despite the fact that it is the cloud it needs to be set to Local Mail Exchanger.

    I guess I can go into detail and that it is good to note that after this is set up you will have some problems. Blackberries contacting the mail server will probably be blocked now. Other than that about 5% of general mail will be getting blocked.

    The final 5% I went WHM >> Main >> Service Configuration >> Exim Configuration Manager and I have set Sender Verification Callouts to off

    Lastly you'll have to turn off the ratelimit code chunk in exim advanced if you have a limit problem.
    (SMTP Response: host mail.coquette.com[96.30.55.144] refused to talk to me: 451-The server has reached its limit for processing requests from your host. 451 Please try again later.)
    Alternately you can try adding the following line to your exim configuration: smtp_accept_max = 500

    For the blackberry problem I can't remember. I removed something from exim. Good luck


    Also, had nothing to do with smarthosts.
     
Loading...

Share This Page