1 if msgdata.get('dlist'):
2 threadID = msgdata['thread_id']
3 syslog('info', "threadID = %d", threadID)
4 to_line = '%s-%d@%s' % (mlist.real_name.lower(),
threadID,
mlist.host_name)
5 syslog('info', "to_line = %s", to_line)
6 del msg['To']
7 msg['To'] = to_line
8 syslog('info', "Set msg['To'] to '%s'", msg['To'])
This correctly changes the "To" field of the message from etest-new@hostname to etest-<threadID>@hostname, as shown by the log:
- Mar 18 13:29:55 2002 (4600) threadID = 19
- Mar 18 13:29:55 2002 (4600) to_line = [EMAIL PROTECTED]
- Mar 18 13:29:55 2002 (4600) Set msg['To'] to '[EMAIL PROTECTED]'
- Mar 18 13:29:55 2002 (4600) to_line = [EMAIL PROTECTED]
The problem is I don't see why line 6 above is necessary. When I comment it out, however, I get the incongruous logfile entry:
- Mar 18 13:36:04 2002 (4640) threadID = 20
- Mar 18 13:36:04 2002 (4640) to_line = [EMAIL PROTECTED]
- Mar 18 13:36:04 2002 (4640) Set msg['To'] to '[EMAIL PROTECTED]'
- Mar 18 13:36:04 2002 (4640) to_line = [EMAIL PROTECTED]
Thank you.
Ellen Spertus