Hi,

>> 7. Is there any auto_whitelist feature?

>Not currently, but you could write one...

well, this morning I did not know that I would be learning python in
the evening... your code definitely gives me enough motivation to dig
deeper into python! I looked into greylist.py and found on line 42 (!)

<code>
# should not be greylisted (could be your customer database)
_whitelistMailAddresses = anydbm.open(_sendersDir +        
   '/greylist_whitelistMailAddresses', 'c')
</code>

Seems like Georg was already thinking of whitelisting in greylist...

How to get the recipient addresses of mails sent by autheticated users
into this _whitelistMailAddresses ?

What would be the right place for this action? 

The greylist module will usually work after whitelist_auth to affect
all senders, that are not authenticated, so if I want to catch the
recipients authenticated senders want to send to, whitelist_auth would
be the last possibilty to do that.

So I just need to add a few lines in whitelist_auth.py before 
return '200 Ok' that do:

- get the recipient addresses
- write this addresses to _whitelistIPAddresses, what is used in     
  greylist.py

recipients = courier.control.getRecipients(controlFileList)

should do first, but how do I write this to the
greylist_whitelistMailAddresses file?

will
anydbm.write(_sendersDir + '/greylist_whitelistMailAddresses', 'c')
do it? hell, I have to learn python!!! ;)

Seems like at this point the code must be changed a little bit to
allow the greylist_whitelistMailAddresses and the other files used to
be defined in pythonfilter.conf to be accessible across modules.

At this point we also could change the greylist_whitelistMailAddresses
file to be one file per domain, to avoid the overhead operating on one
huge file and have only the relevant information for only the actual
senders domain. 

An if statement could make sense before return '200 Ok' in
whitelist_auth.py to check, if writing to the whitelist file is
needed, triggered by a config statement...

*sigh* - I do not speak python so I can not see other implications and
problems that could come up here... what do you say? 

Thank you very much for your attention!

Tommy

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to