[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SMTP Server MAIL FROM:<> lockout + Perl development question

Hi Folks,

I have a situation that I know the entire MX pool and final delivery 
server addresses for a number of domains.  Now before I look into SPF 
I'd like to plug a hole based on a single simple presumption:

1) I may block all incoming mail for all domains I am the authorative 
mail server for, with a whitelist of specific domains coming from their 
respective MX pools.

So I'd like to add rules, purely for examination of the MAIL FROM:<> 
line like:

mydomain1.com accept from any_authed_user
mydomain1.com accept from []
mydomain1.com accept from []
mydomain1.com reject all_others

mydomain2.com accept from authed_user where username = mydomain1
mydomain2.com accept from []
mydomain2.com accept from []
mydomain2.com reject all_others

I can think of no reason that an email should be returned back to the MX 
group or final delivery server, unless a user was using a 3rd party 
gateway to inject the message. (which would violate SPF ?) and in that 
case I would like to make them the exception to the rule and allow them 
existing behavious "mydomain1.com accept from all".

My whole point here is not necessarly to reduce SPAM (since another way 
will be found) but to plug up something that just been bugging me for 
years.  Think of this a bit like anti-spoofing filters used with IP, I'm 
authorative for all email for a bunch of domain and therefore getting 
message back into that domain is done in a controlled manner and no one 
can spoof.

Everyone hates spam, and I'm sure everyone hates spam even more when it 
appears to be coming from you personally and your own SMTP gateway let 
it in :).

I'm interested as to how close I can get to what I want with what is 
already today. The rest of my wants I'm willing to write up through the 
use of the Perl API / Hooks which brings me into...

I have looked at the new smtpserver and am really happy there is some 
Perl integration already started, and this question is more to Matti, 
would he embrace futher development of this interface for inclusion in 
the main tree.

I'd like to add a 3 tier Perl object hierachy, one for the master 
smtpserver (the long running daemon) persistant across smtpserver 
children, one for each smtpserver child (serving a paritcular connection 
instance, persistant across messages and rcpts), one for each 
message/RSET state (persistant across the message).

Plus a while bunch of ifdef hooks for things I'd like to do stuff at.

I'll provide a set of sample perl stub code for example how to connect 
it to a DBI database.

I'll try to be 100% compatiable with current basic stub I've peeked at 
so far.



Darryl L. Miles

To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to majordomo@nic.funet.fi