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.

spamassassin problems after modifying exim.conf

Discussion in 'General Discussion' started by dee_at_candl, Oct 21, 2004.

  1. dee_at_candl

    dee_at_candl Active Member

    Joined:
    May 12, 2004
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Hello All,

    I am facing a weird issue..

    I have a WHM 9.9.3 cPanel 9.9.6-R10 RedHat Enterprise 3 i686 - WHM X v3.1.0 box which has heavy mailing.

    Everything was going perfect till I had to edit the /etc/exim.conf to route mails for a particular domain to their new Exchange box which is set on another location.

    This is what I did:

    smart_host_route:
    driver= manualroute
    transport = remote_smtp
    route_list = domain.com mail-1.domain.com bydns


    Now the mails are being routed properly and without any issues to the Exchange server, but they are not being scanned by SPAMASSASSIN. I have no idea why this is happening, the above code is placed below :

    sa_localuser:
    driver = accept
    check_local_user
    headers_add="${perl{gensaheader}{$local_part}}"
    condition = "${perl{checkusersa}{$local_part}{$received_protocol}}"
    domains = ! lsearch;/etc/userdomains
    transport = local_sa_delivery


    I also tried to change the code's location to see if it works out (I am not well versed with EXIM), but no joy.

    Any ideas why this the mails are not being scanned by Spamassassin now? I've just now updated my WHM to latest stable build just hoping to sort out this issue.. have tried to do a search on this forum but couldn't find much information.

    Help is much appriciated..

    Thanks in Advance.
     
    #1 dee_at_candl, Oct 21, 2004
    Last edited: Oct 21, 2004
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I believe that the way cPanel implemented SpamAssassin, any email that is forwarded (i.e. not delivered locally) will never be touched by SpamAssassin. If you want that, then you're going to have to look at something like MailScanner which scans all email.
     
  3. dee_at_candl

    dee_at_candl Active Member

    Joined:
    May 12, 2004
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
  4. dee_at_candl

    dee_at_candl Active Member

    Joined:
    May 12, 2004
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Okay, am trying out the mailscanner.. looks very good indeed.. but facing some trouble when I edited the exim.conf post installation to add the "smart_host_route" rule. Looks like it is not working..

    Trying to figure it out...
     
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    If you modify exim.conf you should run the following afterwards:

    /scrpts/mailscannerupdate

    This copies /etc/exim.conf to /etc/exim_outgoing.conf (and makes some required modifications).

    Alternatively, you can just modify exim_outgoing.conf manually.
     
  6. dee_at_candl

    dee_at_candl Active Member

    Joined:
    May 12, 2004
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Thanks!

    I am going through the MailScanner docs at the moment.

    It's indeed a good application :)

    Will keep posted about how everything goes..
     
  7. dee_at_candl

    dee_at_candl Active Member

    Joined:
    May 12, 2004
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Hey,

    Mailscanner is working fine now, but am facing a big problem with the defunct processes, every now and then I see some extra [MailScanner <defunct>] processes.. looks like they keep increasing every 2 mins or so.

    Yeah I did try /scripts/mailscannerupdate and updated the exim_outgoing.conf according to my needs, and Mailscanner does scans every message, but spamassassin doesnt.. did a ps -ef | grep "spamassassin" and found no process listed either..

    Am again going through the documents, but if anyone has faced these two issues, I would be very thankfull for your insights..
     
  8. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    The defunct processes for MailScanner are perfectly normal and you can ignore them.

    MailScanner accesses SpamAssassin through the Mail::SpamAssassin perl module(s) and so you won't see it any spamassassin processes running.
     
  9. dee_at_candl

    dee_at_candl Active Member

    Joined:
    May 12, 2004
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Thanks Chirpy! :)

    It is indeed a big help, and I was getting worried about those defunct processes..

    Do I need to install spamassassin again? The thing is I've properly made all changes in the mailscanner.conf and spam rules located in /rules folder, still spam is being slipped.. I dunno why.. just want the mailscanner to scan only one domain but unfortunately nothing is being scanned as it looks like.

    Is there anything in particular you can point to? I am right now going again through all the documents and configurations to find what I've left....

    Yeah spamassassin is disabled through CPANEL.

    Much thanks.
     
  10. dee_at_candl

    dee_at_candl Active Member

    Joined:
    May 12, 2004
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Oct 26 10:41:27 ns1 MailScanner[29245]: New Batch: Forwarding 1 unscanned messages, 8439 bytes
    Oct 26 10:41:27 ns1 MailScanner[29245]: Unscanned: Delivered 1 messages


    Is this happening due to the 'smart_host_route' set in exim_outgoing.conf? :confused:
     
  11. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    No, it must be that you don't have it configured for scanning. Could you tell me what you have for these values in MailScanner.conf:

    Virus Scanning =
    Spam Checks =
    Use SpamAssassin =
     
  12. dee_at_candl

    dee_at_candl Active Member

    Joined:
    May 12, 2004
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Here goes:

    Virus Scanning = %rules-dir%/virus.scanning.rules

    Virus scanning is turned off.. Here's the text from %rules-dir%/virus.scanning.rules:
    FromOrTo: default no


    Spam Checks = %rules-dir%/spam.scanning.rules
    To: *@mydomain.com yes



    Use SpamAssassin = %rules-dir%/spam.scanning.rules
    To: *@mydomain.com yes

    Thanks.

    P.S. Mainly I want to use the Mailscanner for SA purpose as CPANEL doesn't let their SA scan my forwarded mail..
     
  13. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Hi,

    If you're not going to use virus scanning, I would suggest that you set:

    Virus Scanning = no

    Also, there should be a default FromOrTo line at the bottom of the spam.scanning.rules file - you should make sure that it is the last line and not anywhere else, which would cause this problem:

    FromOrTo: default no
     
  14. dee_at_candl

    dee_at_candl Active Member

    Joined:
    May 12, 2004
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Thanks again.

    Yeah I made the necessary changes in the MailScanner.conf.

    I think the problem is occuring due to my 'smart_host_route' which is forwarding the mail to the Exchange server without scanning.. :(

    Just trying to figure out wheather I have to tweak exim....
     
  15. dee_at_candl

    dee_at_candl Active Member

    Joined:
    May 12, 2004
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Oct 27 13:52:11 ns1 MailScanner[24646]: Message 1CMnHe-0006Qg-4y from 63.247.91.202 (bla@blabla.com) to mydomain.com is spam, SpamAssassin (score=1001.571, required 4.5, GTUBE 1000.00, HTML_MESSAGE 0.00, MISSING_SUBJECT 1.57)


    Oct 27 13:52:11 ns1 MailScanner[24646]: Spam Checks: Found 1 spam messages
    Oct 27 13:52:11 ns1 MailScanner[24646]: Spam Actions: message 1CMnHe-0006Qg-4y actions are deliver


    Any idea? Anyone?

    Here goes the /rules/spam.action.rules

    # To: *@mydomain.com deliver
    To: *@mydomain.com delete
    FromOrTo: default delete

    Thanks for your efforts..
     
  16. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    There's something not right here ;) Are you stopping and restarting MailScanner whenever you make a change to your MailScanner.conf or ruleset files? Do you just have the one MailScanner installation, not two by mistake ;) ?
     
  17. dee_at_candl

    dee_at_candl Active Member

    Joined:
    May 12, 2004
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Strange, now it's working fine..

    All I need to fix now is the SA score and hits.. will get it done. :) Dunno what was wrong I rewrote the rules and got it fixed.

    Yeah I did restart Mailscanner everything I changed something ;) And no.. there are no more than one installations :)


    Thanks indeed for all your help Chirpy :D Many thanks!
     
  18. dee_at_candl

    dee_at_candl Active Member

    Joined:
    May 12, 2004
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Hey Chirpy! :)

    Have a small query...

    Right now am running latest Mailscanner with Exim. But the problem is very little amount of spam is detected. My client told me that he's still recieving much spam.

    Any idea where I might be going wrong?

    The current scores in Mailscanner.conf are as below:

    Required SpamAssassin Score = 3.5

    High SpamAssassin Score = 8



    Any idea where I might be wrong?

    Thanks :)
     
  19. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Could depend on a lot of factors. I'll PM you a contact address if you can email me your MailScanner.conf file and I'll check it for you.
     
  20. dee_at_candl

    dee_at_candl Active Member

    Joined:
    May 12, 2004
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Sure :)

    I'll do that.. and thank you very much for your support!
     
Loading...

Share This Page