Opened 10 years ago
Closed 10 years ago
#333 closed setup (fixed)
replying email not working
Reported by: | kshetriamrit@… | Owned by: | bas |
---|---|---|---|
Priority: | critical | Milestone: | |
Component: | email2trac | Version: | 2.7.0 |
Keywords: | Cc: |
Description
After replying email sent from trac, no comment is seen. Also I see a lot of *trac.email2trac* files in my /tmp folder that contains message replied to notification mail.
Attachments (0)
Change History (16)
comment:1 Changed 10 years ago by bas
comment:2 Changed 10 years ago by anonymous
I installed trac in unix system (Ubuntu). I am not allowed to see the log file. But one more info if that helps. email2trac --project=tracproj < msg.txt is not working either. This is from my customer side. Many email are on tmp file and we are not able to respond to them.
comment:3 Changed 10 years ago by bas
This is to little info for me to determine what your problem is. If this is not working:
- email2trac --project=tracproj < msg.txt
Then you did not configure email2trac properly. You can add start email2trac in debug mode:
- email2trac --help
- email2trac --debug --project=tracproj < msg.txt
comment:4 follow-up: ↓ 5 Changed 10 years ago by anonymous
my trac and email2trac might not be updated (company implementation)
i get following message
sudo email2trac --debug --project=ticket < mail.txt 2014-01-09 08:58:05,038 email2trac trac: Found trac version: 0.12 2014-01-09 08:58:05,156 email2trac trac: Loading environment /opt/trac 08:58:05 Trac[env] INFO: -------------------------------- environment startup [Trac 0.12.2] -------------------------------- /usr/local/lib/python2.6/dist-packages/acct_mgr/pwhash.py:13: DeprecationWarning: the md5 module is deprecated; use hashlib instead import md5, sha /usr/local/lib/python2.6/dist-packages/acct_mgr/pwhash.py:13: DeprecationWarning: the sha module is deprecated; use the hashlib module instead import md5, sha 2014-01-09 08:58:05,459 email2trac trac: Main function parse 2014-01-09 08:58:05,469 email2trac trac: saving email to /tmp/tmphxEPnr.trac.email2trac 2014-01-09 08:58:05,473 email2trac trac: function get_message_parts() 2014-01-09 08:58:05,473 email2trac trac: Message part: Main-Type: multipart 2014-01-09 08:58:05,473 email2trac trac: Message part: Content-Type: multipart/alternative 2014-01-09 08:58:05,473 email2trac trac: Message part: Main-Type: text 2014-01-09 08:58:05,473 email2trac trac: Message part: Content-Type: text/plain 2014-01-09 08:58:05,474 email2trac trac: function inline_part() 2014-01-09 08:58:05,474 email2trac trac: unicode filename: None 2014-01-09 08:58:05,474 email2trac trac: raw filename: None 2014-01-09 08:58:05,474 email2trac trac: function check_filename_length: 2014-01-09 08:58:05,474 email2trac trac: function strip_signature 2014-01-09 08:58:05,474 email2trac trac: function strip_quotes 2014-01-09 08:58:05,474 email2trac trac: function inline_properties 2014-01-09 08:58:05,475 email2trac trac: Message part: Main-Type: text 2014-01-09 08:58:05,475 email2trac trac: Message part: Content-Type: text/html 2014-01-09 08:58:05,475 email2trac trac: function inline_part() 2014-01-09 08:58:05,475 email2trac trac: Skipping alternative HTML message 2014-01-09 08:58:05,475 email2trac trac: function unique_attachment_names() 2014-01-09 08:58:05,476 email2trac trac: function get_body_text() 2014-01-09 08:58:05,476 email2trac trac: function debug_body: 2014-01-09 08:58:05,476 email2trac trac: writing body to /tmp/tmphxEPnr.trac.email2trac.body 2014-01-09 08:58:05,476 email2trac trac: function debug_attachments 2014-01-09 08:58:05,478 email2trac trac: function get_sender_info 2014-01-09 08:58:05,479 email2trac trac: function email_to_unicode 2014-01-09 08:58:05,479 email2trac trac: email name: <original_email_address_removed>, email address: <original_email_address_removed> 2014-01-09 08:58:05,746 email2trac trac: Traceback (most recent call last): 2014-01-09 08:58:05,746 email2trac trac: File "/usr/local/bin/email2trac", line 2592, in <module> tktparser.parse(sys.stdin) 2014-01-09 08:58:05,746 email2trac trac: File "/usr/local/bin/email2trac", line 1651, in parse self.get_sender_info(m) 2014-01-09 08:58:05,746 email2trac trac: File "/usr/local/bin/email2trac", line 370, in get_sender_info (u.lower() + '@' + self.smtp_default_domain.lower() == self.email_addr.lower()) 2014-01-09 08:58:05,746 email2trac trac: AttributeError: 'NoneType' object has no attribute 'lower' 2014-01-09 08:58:05,747 email2trac trac: saving email to /tmp/tmp6nB_ZA.trac.email2trac 2014-01-09 08:58:05,748 email2trac trac: function get_message_parts() 2014-01-09 08:58:05,748 email2trac trac: Message part: Main-Type: multipart 2014-01-09 08:58:05,749 email2trac trac: Message part: Content-Type: multipart/alternative 2014-01-09 08:58:05,749 email2trac trac: Message part: Main-Type: text 2014-01-09 08:58:05,749 email2trac trac: Message part: Content-Type: text/plain 2014-01-09 08:58:05,749 email2trac trac: function inline_part() 2014-01-09 08:58:05,749 email2trac trac: unicode filename: None 2014-01-09 08:58:05,749 email2trac trac: raw filename: None 2014-01-09 08:58:05,749 email2trac trac: function check_filename_length: 2014-01-09 08:58:05,749 email2trac trac: function strip_signature 2014-01-09 08:58:05,749 email2trac trac: function strip_quotes 2014-01-09 08:58:05,750 email2trac trac: function inline_properties 2014-01-09 08:58:05,750 email2trac trac: Message part: Main-Type: text 2014-01-09 08:58:05,750 email2trac trac: Message part: Content-Type: text/html 2014-01-09 08:58:05,750 email2trac trac: function inline_part() 2014-01-09 08:58:05,750 email2trac trac: Skipping alternative HTML message 2014-01-09 08:58:05,750 email2trac trac: function unique_attachment_names() 2014-01-09 08:58:05,750 email2trac trac: function get_body_text() 2014-01-09 08:58:05,750 email2trac trac: function debug_body: 2014-01-09 08:58:05,751 email2trac trac: writing body to /tmp/tmp6nB_ZA.trac.email2trac.body 2014-01-09 08:58:05,751 email2trac trac: function debug_attachments
comment:5 in reply to: ↑ 4 Changed 10 years ago by bas
Replying to anonymous:
my trac and email2trac might not be updated (company implementation)
i get following message
2014-01-09 08:58:05,478 email2trac trac: function get_sender_info 2014-01-09 08:58:05,479 email2trac trac: function email_to_unicode 2014-01-09 08:58:05,479 email2trac trac: email name: <original_email_address_removed>, email address: <original_email_address_removed>
}}}
Is this an valid email adres name@domain?
> 2014-01-09 08:58:05,746 email2trac trac: Traceback (most recent call last): > > 2014-01-09 08:58:05,746 email2trac trac: File "/usr/local/bin/email2trac", line 2592, in <module> > tktparser.parse(sys.stdin) > > 2014-01-09 08:58:05,746 email2trac trac: File "/usr/local/bin/email2trac", line 1651, in parse > self.get_sender_info(m) > > 2014-01-09 08:58:05,746 email2trac trac: File "/usr/local/bin/email2trac", line 370, in get_sender_info > (u.lower() + '@' + self.smtp_default_domain.lower() == self.email_addr.lower()) > > 2014-01-09 08:58:05,746 email2trac trac: AttributeError: 'NoneType' object has no attribute 'lower' > > }}} This is an python error what did you defined in your trac.ini notification section for: * smtp_default_domain * or maybe be the variable 'u' is empty. Can you try to replace the offending line with: {{{ (u and (u.lower() + '@' + self.smtp_default_domain.lower() == self.email_addr.lower())) }}}
comment:6 Changed 10 years ago by anonymous
if you are talking about "<original_email_address_removed>", yes it is a valid email address. user@…
comment:7 Changed 10 years ago by bas
Ok. my reply was broken did you read:
> 2014-01-09 08:58:05,746 email2trac trac: File "/usr/local/bin/email2trac", line 370, in get_sender_info > (u.lower() + '@' + self.smtp_default_domain.lower() == self.email_addr.lower()) > > 2014-01-09 08:58:05,746 email2trac trac: AttributeError: 'NoneType' object has no attribute 'lower' >
This is an python error what did you defined in your trac.ini notification section for:
- smtp_default_domain
- or maybe be the variable 'u' is empty. Can you try to replace the offending line with:
(u and (u.lower() + '@' + self.smtp_default_domain.lower() == self.email_addr.lower()))
comment:8 Changed 10 years ago by anonymous
I have just domain name as smtp_default_domain not in format user@… just domain.com
How can I change code for that?
comment:9 Changed 10 years ago by anonymous
Also same trac config was working before. This happened few days back. Nothing was changed during that period.
comment:10 Changed 10 years ago by bas
That is strange, You did not install a new plugin or use another plugin for authentication. I see acct_mgr warning in your output.
Are able to edit email2trac? If yes
- edit email2trac.conf
- locate the offening line, linenumber 370
- replace it with mine suggestion
comment:11 Changed 10 years ago by anonymous
thanks changing email2trac source did the work. But can we track down what caused problem? just for backlog incase it repeat in future?
comment:12 Changed 10 years ago by bas
Then i will apply the fix to the trunk version of email2trac.
I really do not know what caused the problem. This function looks in the trac project database to find a matching user for a give email address (from addres mail). Maybe the database has some invalid values.
Or did you changed your email2trac.conf:
- https://oss.trac.surfsara.nl/email2trac/wiki/Email2tracConfiguration
- did you set ignore_trac_user_settings
comment:13 Changed 10 years ago by bas
Al your crashed emails are in /tmp and you can feed them to email2trac to recover them.
comment:14 follow-up: ↓ 15 Changed 10 years ago by anonymous
As of the log message, acct_mgr package was changed. change to meet requirement. except from that, neither trac.ini nor email2trac.conf file was changed.
For crashed emails, does email2trac manage for duplicate ticket/email or do we have to handle?
and many many thanks for the support :)
comment:15 in reply to: ↑ 14 Changed 10 years ago by bas
Replying to anonymous:
As of the log message, acct_mgr package was changed. change to meet requirement. except from that, neither trac.ini nor email2trac.conf file was changed.
maybe acct_mgr is causing the problem. this will handle the user settings in the database. The email2trac crash is in this section.
For crashed emails, does email2trac manage for duplicate ticket/email or do we have to handle?
email2trac will not filter out duplicate emails.
and many many thanks for the support :)
Your are welcome
comment:16 Changed 10 years ago by bas
- Resolution set to fixed
- Status changed from new to closed
In 644:
Then email2trac crashed. On which OS did you installed trac? If unix then there must be an exception error in the syslog files.