Changeset 304


Ignore:
Timestamp:
01/11/10 15:54:50 (14 years ago)
Author:
bas
Message:

Prevent setting the reporter to the ticket email address

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r303 r304  
    5252    - For a new ticket and reply_all is set.
    5353    - If the ticket CC field is updated via the subject line.
     54
     55   Also prevent setting the reporter address to the ticket email
     56   address.
     57
    5458   closes #172
    5559   Reported by: otto at bergerdata dot de
  • trunk/debian/changelog

    r303 r304  
    5353     - For a new ticket and reply_all is set.
    5454     - If the ticket CC field is updated via the subject line.
     55
     56    Also prevent setting the reporter address to the ticket email
     57    address.
     58
    5559    closes #172
    5660    Reported by: otto at bergerdata dot de
  • trunk/email2trac.py.in

    r301 r304  
    441441                self.email_name, self.email_addr  = email.Utils.parseaddr(self.email_from)
    442442
    443                 # Trac can not handle author's name that contains spaces
    444                 #
    445                 self.author = self.email_addr
     443                ## Trac can not handle author's name that contains spaces
     444                #  and forbid the ticket email address as author field
     445
     446                if self.author == self.trac_smtp_from:
     447                        self.author = "email2trac"
     448                else:
     449                        self.author = self.email_addr
    446450
    447451                if self.IGNORE_TRAC_USER_SETTINGS:
     
    500504                                        pass
    501505
    502                         ## This address is forbidden for CC-field, cuases mail-loop
    503                         #
    504                         smtp_from = self.get_config('notification', 'smtp_from')
    505 
    506506                        for name,addr in cc_addrs:
    507507               
     
    509509                                #
    510510                                #if addr in to_list:
    511                                 if addr == smtp_from:
     511
     512                                if addr == self.trac_smtp_from:
    512513                                        if self.DEBUG:
    513514                                                print "Skipping %s mail address for CC-field" %(addr)
     
    604605                        if field == 'cc':
    605606
    606                                 smtp_from = self.get_config('notification', 'smtp_from')
    607 
    608607                                cc_list = user_dict['cc'].split(',')
    609608
    610                                 if smtp_from in cc_list:
     609                                if self.trac_smtp_from in cc_list:
    611610                                        if self.DEBUG > 10:
    612                                                 print 'TD: MAIL LOOP: %s is not allowed as CC address' %(smtp_from)
    613                                         cc_list.remove(smtp_from)
     611                                                print 'TD: MAIL LOOP: %s is not allowed as CC address' %(self.trac_smtp_from)
     612                                        cc_list.remove(self.trac_smtp_from)
    614613
    615614                                value = ','.join(cc_list)
     
    1000999                else:
    10011000                        self.notification = 0
     1001
     1002                self.trac_smtp_from = self.get_config('notification', 'smtp_from')
    10021003
    10031004                # Check if  FullBlogPlugin is installed
Note: See TracChangeset for help on using the changeset viewer.