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 / cpanel filters not applied to incoming forwarded mail

Discussion in 'E-mail Discussions' started by nsdesign, Jul 4, 2004.

  1. nsdesign

    nsdesign Active Member

    Joined:
    Jul 22, 2002
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    I have a domain - mydomain.com which is setup in cpanel..
    SpamAssassin runs fine on this domain, so when someone sends mail to "mail@mydomain.com", soamassassin deals with it accordingly...

    However - when someone sends mail to an offserver address (eg: mail@mydomain.net) which is then forwarded to my server address mail@mydomain.com, spamassassin does not appear to run on it.


    Likewise - cpanel mail filters work fine for emails that are sent direct to my server email address, but when emails are forwarded to this address from an off-server address, all mail filter rules are ignored....

    The result is that 90% of all my junk email comes from the off-server address(s) forwarded to my primary address. Unfortunatley its not practical to cease using these external addresses....

    Any ideas?... How can I get spamassassin and cpanel filters to check these emails?...

    Thanks for any advice

    Gary
     
  2. nsdesign

    nsdesign Active Member

    Joined:
    Jul 22, 2002
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    bump.
     
  3. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    Are you using the default catch-all (your main email account) to receive the forwarded messages?
     
  4. nsdesign

    nsdesign Active Member

    Joined:
    Jul 22, 2002
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Yes... ultimately the main email account does receive all the forwarded mail.

    ie: I have gary@outsideaddress.com forwarded to gary@serverdomain.com , But gary@serverdomain.com is no more than a forwarder to the main account...

    (note that I have the default address set to :blackhole:)

    Does this help explain things?..
    Gary
     
  5. ttremain

    ttremain Well-Known Member

    Joined:
    Feb 16, 2003
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    Gary,

    I've seen the same problem... For nearly a year... If the email uses a forwarder to an off server account, Spamassassin does not test it first.

    Until today, I was running an older exim.conf file, that worked, but I never knew why (nor did I have sufficient time to go line by line to figure it out.)

    This change fixes that problem, but I cannot guarantee it doesn't cause more problems. Maybe someone can but in here and add their two cents.

    In exim.conf, find:

    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


    In the "domains =" line, if you remove the "!" or the entire line altogether,
    then stop and restart exim, suddenly Spamassassin will parse off server
    forwards.

    Can someone say why? Or what this might break?
     
  6. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    I don't get it. You have all mail forwarded to the main email account and yet your main email account is set to :blackhole:? Then how do you get your mail?
     
  7. nsdesign

    nsdesign Active Member

    Joined:
    Jul 22, 2002
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Thanks ttremain ,

    I'll look into the suggested changes you have advised....

    Goodmove, to explain: I have my "default mail" set to blackhole... not my main account email address. The Default mail is for "unrouted mail"... Since the main account email IS a pop3 box, then it's fine.

    Cheers
    Gary
     
Loading...

Share This Page