Changeset 226


Ignore:
Timestamp:
10/13/08 11:26:09 (14 years ago)
Author:
bas
Message:

email2trac.py.in:

  • added recipient_list parameter, closes #77
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r225 r226  
    3232    Author: Bas van der Vlies, jon dot wbstr at gmail dot com
    3333
     34  * added recipient_list parameter.  If set then only mail is accepted if
     35    to-field matches. This only uses when people use a drop box to accept
     36    emai for several email addresses, (closes #77)
     37    Author: Bas van der Vlies, jon dot wbstr at gmail dot com
    3438
    3539  * alternate notify template did not work for trac version 0.11
  • trunk/email2trac.py.in

    r223 r226  
    413413                """
    414414                Get the default author name and email address from the message
    415                 """
     415                """
     416
     417                self.email_to = self.email_to_unicode(message['to'])
     418                self.to_name, self.to_email_addr = email.Utils.parseaddr (self.email_to)
    416419
    417420                self.email_from = self.email_to_unicode(message['from'])
     
    814817                        if self.DEBUG > 1 :
    815818                                print 'Message rejected : %s in black list' %(self.email_addr)
     819                        return False
     820
     821                if self.email_header_acl('recipient_list', self.to_email_addr, True):
     822                        if self.DEBUG > 1 :
     823                                print 'Message rejected : %s not in recipient list' %(self.to_email_addr)
    816824                        return False
    817825
Note: See TracChangeset for help on using the changeset viewer.