Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] idea for poor man's SPF

2005-05-31 by Martin Paul

> From: manu@...
> > Martin Paul <martin@...> wrote:
> > 
> > Comments anyone, or a volunteer to implement it ?
> 
> You did, didn't you? :-)

I just knew I shouldn't have asked .. :)

> What will be the name of this option?

Maybe "matchhostfrom", as it would basically check whether the
sender host (its domain name really) matches the from address
(again, the domain, after the @).

For a start, I implemented the matchhostfrom function that does
the actual work. I'll attach the code - it contains a main()
function for testing purposes. Here's a small testing shell script:

#!/bin/sh

gcc -Wall -o matchhostfrom matchhostfrom.c

echo "### MATCH"
./matchhostfrom mailhost.domain.com user@...
./matchhostfrom mailhost.domain.com '<user@...>'
./matchhostfrom mailhost.domain.com 'USER@...'
./matchhostfrom mailHOST.domain.COM 'user@...'
./matchhostfrom ' mailhost.domain.com ' ' <USER@... > '

echo "### NO MATCH"
./matchhostfrom spam.com user@...
./matchhostfrom domain.com user@...
./matchhostfrom 123.dsl.domain.com user@...
./matchhostfrom domain.com.org user@...
./matchhostfrom domain.com user@...
./matchhostfrom '[12.34.56.78]' user@...
./matchhostfrom host.domain.com '<>'
./matchhostfrom localhost '<user@...>'

Still, I'd prefer you to actually integrate this into milter-greylist
as an option. I guess it needs small changes to multiple conf* files
(lex/yacc/conf.[ch]), and my main problem would be to decide into which 
mlfi_* function and where exactly to put it. 

mp.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.