Changeset 301 for trunk


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

prevent mail loop, closes #172

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/debian/changelog

    r300 r301  
    4949   Fixed by    : Bas van der Vlies
    5050
    51  * Prevent a mail loop for new tickets when ticket email address is set
    52    in CC and reply_all is set.
     51 * Prevent mail loop. We could set the CC ticket field to
     52   the ticket email address.
     53    - For a new ticket and reply_all is set.
     54    - If the ticket CC field is updated via the subject line.
     55   closes #172
    5356   Reported by: otto at bergerdata dot de
    5457   Fixed vy   : Bas van der Vlies
  • trunk/email2trac.py.in

    r300 r301  
    578578                           2) Set default value for field (use_default=1)
    579579                """
     580                if self.DEBUG:
     581                        print "TD: update_ticket_fields"
    580582
    581583                # Build a system dictionary from the ticket fields
     
    591593                                pass
    592594
    593                 # Check user supplied fields an compare them with the
     595                ## Check user supplied fields an compare them with the
    594596                # system one's
    595597                #
     
    597599                        if self.DEBUG >= 10:
    598600                                print  'user_field\t %s = %s' %(field,value)
     601
     602                        ## To prevent mail loop
     603                        #
     604                        if field == 'cc':
     605
     606                                smtp_from = self.get_config('notification', 'smtp_from')
     607
     608                                cc_list = user_dict['cc'].split(',')
     609
     610                                if smtp_from in cc_list:
     611                                        if self.DEBUG > 10:
     612                                                print 'TD: MAIL LOOP: %s is not allowed as CC address' %(smtp_from)
     613                                        cc_list.remove(smtp_from)
     614
     615                                value = ','.join(cc_list)
     616                               
    599617
    600618                        if sys_dict.has_key(field):
Note: See TracChangeset for help on using the changeset viewer.