My incoming mail server is checking SPF and adds a line in the headers accordingly. However sometimes previous servers are adding similar headers so there is multiple Received-SPF headers.
Received-SPF: Softfail... Received: from ... Received: by ... Sender: ... Received: by ... Received: by ... Received: by ... Received: by ... Received-SPF: pass ... Received: by ...
I have a procmail filter to sort incoming mail according to its SPF status but it does not currently account for where in the headers it appears.
Can I make rules taking into account where in the headers a line appears? Or are there other tools suitable for this?
Is there a way to distinguish between headers added by the incoming server, above the first(last added) Received header, and headers added by another server.