When receiving mail from relay server, amavis/spamassassin do almost no checks

Discussion in 'Server Operation' started by rst, May 28, 2016.

  1. rst

    rst New Member HowtoForge Supporter

    Hi,
    I am looking into decreasing the amount of spam received. I already followed some great tutorials about implementation of postgrey and rbl services and must say, this helps a lot!

    However I noted the following, snip from a spam mail I received. (I removed some information, this i have included between <thesebrackets>):

    Code:
    X-Spam-Status: No, score=0.8 tagged_above=-9999 required=4.2
        tests=[BAYES_50=0.8] autolearn=ham
    Received: from <myserver> ([<myIp>])
        by localhost (<myserver> [127.0.0.1]) (amavisd-new, port 10024)
        with ESMTP id BipSRhb3IfLu for <884d6bc77@<oneofmydomains>>;
        Fri, 27 May 2016 12:37:56 +0200 (CEST)
    Received: from relay0.<myhostingproviderdomain> (relay0.<myhostingproviderdomain> [IPv6:<someipv6address>])
        by <myserver> (Postfix) with ESMTPS id 8106430F552
        for <884d6bc77@<oneofmydomains>>; Fri, 27 May 2016 12:37:56 +0200 (CEST)
    Received: from 212.183.200.185.static.user.ono.com (212.183.200.185.static.user.ono.com [212.183.200.185])
        by relay0.<myhostingproviderdomain> (Postfix) with ESMTP id 3rGMsw138gz12Nj
        for <884d6bc77@<oneofmydomains>>; Fri, 27 May 2016 12:37:55 +0200 (CEST)
    Date: Fri, 27 May 2016 12:37:55 +0200
    What happens here is that my hosting provider runs a relay server that I use. Should my own mail server be down for whatever reason, the hosting provider will accept e-mail on my behalf and later forward this to my server using their relay0 server. It seems however that the delivery checks done by Postfix / Amavisd-new / SpamAssassin are done against the relay0 server of my hostingprovider instead of against the original sender.

    Is there a way I can alter this behaviour for the case where I receive this mail from the relay0server so that it looks at the received header before the relay0 server was involved? I'd normally first Google this type of thing, but I have noooo idea as to what my search term should be for this specific case.

    Any help would be appreciated!

    Tnx,
    Robin
     
    Last edited: May 28, 2016

Share This Page