Modify

Opened 9 years ago

Closed 6 years ago

#257 closed setup (fixed)

email2trac : OperationalError: SQL logic error or missing database

Reported by: anonymous Owned by: bas
Priority: minor Milestone:
Component: email2trac Version: 2.1.0
Keywords: Cc:

Description (last modified by bas)

Hi,

installed email2trac: ./configure -with-trac_user=apache --with-mta_user=nobody

in to /etc/alias file I put: msupport: "|/usr/local/bin/run_email2trac --project=margusja"

[14:52:53 root@arendus bin :/usr/local/bin]# /usr/local/bin/email2trac < /tmp/msg.txt saving email to /tmp/tmppyJ_Ff.email2trac writing body to /tmp/tmpNSvy4Q.email2trac [14:53:21 root@arendus bin :/usr/local/bin] And a new ticket appears into database.

And the typical case - I can't create ticket via e-mail.

here is my email2trac.conf:

[DEFAULT]
project: /var/www/trac/margusja
debug: 99
log_type: file
log_file: /tmp/email2trac.log
log_level: DEBUG
umask: 022
spam_level: 5
reply_all : 0
mailto_link: 0
umask: 022
email_header: 0
trac_version: 0.12
enable_syslog : 1
alternate_notify_template :
alternate_notify_template_update :
drop_spam : 0
verbatim_format: 1
strip_signature: 0
email_quote: >
strip_quotes: 0
ignore_trac_user_settings: 0
lack_list: MAILER-DAEMON@
drop_alternative_html_version: 1
python_egg_cache: /tmp

[margusja]
project: /var/www/trac/margusja/
spam_level: 5

[okia]
project: /var/www/trac/okia/
spam_level: 5

in maillog:

2011-07-29T14:32:08.816598+03:00 arendus postfix/local[12388]: 4E942398018: to=<msupport@arendus.okia.ee>, relay=local, delay=0.5, delays=0.01/0.01/0/0.48, dsn=5.3.0, status=bounced (Command died with status 1: "/usr/local/bin/run_email2trac --project=margusja". Command output: saving email to /tmp/tmpUSSSI_.email2trac writing body to /tmp/tmphDAvFH.email2trac saving email to /tmp/tmpRcebZ9.email2trac writing body to /tmp/tmpZH0dUJ.email2trac )}}}

debug:
{{{
2011-07-29 14:57:52,378 email2trac : Found trac version: 0.12
2011-07-29 14:57:52,515 email2trac : Loading environment /var/www/trac/margusja/
2011-07-29 14:57:52,616 email2trac : Main function parse
2011-07-29 14:57:52,626 email2trac : function get_message_parts()
2011-07-29 14:57:52,626 email2trac : 	 Message part: Main-Type: text
2011-07-29 14:57:52,626 email2trac : 	 Message part: Content-Type: text/plain
2011-07-29 14:57:52,626 email2trac : function inline_part()
2011-07-29 14:57:52,627 email2trac : function unique_attachment_names()
2011-07-29 14:57:52,627 email2trac : function get_body_text()
2011-07-29 14:57:52,628 email2trac : function debug_attachments
2011-07-29 14:57:52,630 email2trac : function email_to_unicode
2011-07-29 14:57:52,630 email2trac : function email_to_unicode
2011-07-29 14:57:52,632 email2trac : function email_header_acl: white_list
2011-07-29 14:57:52,632 email2trac : white_list not defined, all messages are allowed.
2011-07-29 14:57:52,632 email2trac : function email_header_acl: black_list
2011-07-29 14:57:52,632 email2trac : black_list not defined, all messages are allowed.
2011-07-29 14:57:52,633 email2trac : function email_header_acl: recipient_list
2011-07-29 14:57:52,633 email2trac : recipient_list not defined, all messages are allowed.
2011-07-29 14:57:52,633 email2trac : function email_to_unicode
2011-07-29 14:57:52,633 email2trac : subject: test
2011-07-29 14:57:52,634 email2trac : function ticket_update_by_subject
2011-07-29 14:57:52,634 email2trac : function new_ticket
2011-07-29 14:57:52,643 email2trac : function set_reply_fields
2011-07-29 14:57:52,643 email2trac : function set_ticket_fields
2011-07-29 14:57:52,643 email2trac : trac[summary] = 
2011-07-29 14:57:52,643 email2trac : trac[reporter] = 
2011-07-29 14:57:52,644 email2trac : trac[owner] = 
2011-07-29 14:57:52,644 email2trac : trac[description] = 
2011-07-29 14:57:52,644 email2trac : trac[type] = defect
2011-07-29 14:57:52,644 email2trac : used type = defect
2011-07-29 14:57:52,644 email2trac : trac[status] = 
2011-07-29 14:57:52,644 email2trac : trac[priority] = major
2011-07-29 14:57:52,644 email2trac : used priority = major
2011-07-29 14:57:52,645 email2trac : trac[milestone] = 
2011-07-29 14:57:52,645 email2trac : trac[component] = 
2011-07-29 14:57:52,645 email2trac : trac[resolution] = None
2011-07-29 14:57:52,645 email2trac : trac[keywords] = 
2011-07-29 14:57:52,645 email2trac : trac[cc] = 
2011-07-29 14:57:52,645 email2trac : trac[time] = 
2011-07-29 14:57:52,645 email2trac : trac[changetime] = 
2011-07-29 14:57:52,646 email2trac : trac[estimatedhours] = 0
2011-07-29 14:57:52,646 email2trac : used estimatedhours = 0
2011-07-29 14:57:52,646 email2trac : trac[hours] = 0
2011-07-29 14:57:52,646 email2trac : used hours = 0
2011-07-29 14:57:52,646 email2trac : trac[billable] = 1
2011-07-29 14:57:52,646 email2trac : used billable = 1
2011-07-29 14:57:52,646 email2trac : trac[totalhours] = 0
2011-07-29 14:57:52,647 email2trac : used totalhours = 0
2011-07-29 14:57:52,647 email2trac : function update_ticket_fields
2011-07-29 14:57:52,647 email2trac : user_field	 totalhours = 0
2011-07-29 14:57:52,647 email2trac : ticket_field	 totalhours = 0
2011-07-29 14:57:52,647 email2trac : user_field	 hours = 0
2011-07-29 14:57:52,647 email2trac : ticket_field	 hours = 0
2011-07-29 14:57:52,647 email2trac : user_field	 priority = major
2011-07-29 14:57:52,647 email2trac : ticket_field	 priority = major
2011-07-29 14:57:52,648 email2trac : user_field	 billable = 1
2011-07-29 14:57:52,648 email2trac : ticket_field	 billable = 1
2011-07-29 14:57:52,648 email2trac : user_field	 estimatedhours = 0
2011-07-29 14:57:52,648 email2trac : ticket_field	 estimatedhours = 0
2011-07-29 14:57:52,648 email2trac : user_field	 type = defect
2011-07-29 14:57:52,648 email2trac : ticket_field	 type = defect
2011-07-29 14:57:52,648 email2trac : function get_message_parts()
2011-07-29 14:57:52,649 email2trac : 	 Message part: Main-Type: text
2011-07-29 14:57:52,649 email2trac : 	 Message part: Content-Type: text/plain
2011-07-29 14:57:52,649 email2trac : function inline_part()
2011-07-29 14:57:52,649 email2trac : function unique_attachment_names()
2011-07-29 14:57:52,649 email2trac : function get_body_text()
2011-07-29 14:57:52,655 email2trac : Traceback (most recent call last):

2011-07-29 14:57:52,655 email2trac :   File "/usr/local/bin/email2trac", line 2467, in <module>
    tktparser.parse(sys.stdin)

2011-07-29 14:57:52,655 email2trac :   File "/usr/local/bin/email2trac", line 1660, in parse
    self.new_ticket(m, subject, spam_msg)

2011-07-29 14:57:52,655 email2trac :   File "/usr/local/bin/email2trac", line 1125, in new_ticket
    self.id = tkt.insert()

2011-07-29 14:57:52,655 email2trac :   File "/usr/lib/python2.5/site-packages/trac/ticket/model.py", line 226, in insert
    @self.env.with_transaction(db)

2011-07-29 14:57:52,655 email2trac :   File "/usr/lib/python2.5/site-packages/trac/db/api.py", line 82, in transaction_wrapper
    ldb.rollback()

2011-07-29 14:57:52,655 email2trac :   File "/usr/lib/python2.5/site-packages/trac/db/sqlite_backend.py", line 286, in rollback
    self.cnx.rollback()

2011-07-29 14:57:52,656 email2trac : OperationalError: SQL logic error or missing database

2011-07-29 14:57:52,657 email2trac : function get_message_parts()
2011-07-29 14:57:52,657 email2trac : 	 Message part: Main-Type: text
2011-07-29 14:57:52,658 email2trac : 	 Message part: Content-Type: text/plain
2011-07-29 14:57:52,658 email2trac : function inline_part()
2011-07-29 14:57:52,658 email2trac : function unique_attachment_names()
2011-07-29 14:57:52,658 email2trac : function get_body_text()
2011-07-29 14:57:52,659 email2trac : function debug_attachments 
}}}

Attachments (0)

Change History (20)

comment:1 Changed 9 years ago by margus@…

created a new trac environment. After it it worked - I cant send an email and create a ticket.

comment:2 Changed 9 years ago by margus@…

Sorry. Now I CAN create an ticket via email.

comment:3 Changed 9 years ago by bas

  • Status changed from new to assigned
  • Type changed from defect to setup

What was the problem or fix. Something to do with permissions?

comment:4 Changed 9 years ago by anonymous

At the moment I am not sure. It works if I use a new trac setup. It won't if I use one old trac database. I have to include the e-mail2trac functionality with old database, so I let you know if I have more information.

comment:5 Changed 9 years ago by margus@…

Looks like email2trac depends from db schema. When I installed a new trac env - it worked. When I used old one (already installed some plugins that changed db schema ) it didn't work. So, is there possibility to see sql commands that plugin sends to db?

comment:6 Changed 9 years ago by bas

I use the trac function to initialize the database. We have also some plugins that change the database and they do not interfere with email2trac. In the past we had also this problem and we had a corrupt database that was triggered by email2trac but not via de web interface.

Or can you also enable the plugins on the new database and see which plugin is problematic. Are there no errors in the trac.log?

comment:7 Changed 9 years ago by margus@…

Here is session when I send an e-mail to create a ticket:

2011-08-01 11:19:33,891 Trac[env] INFO: -------------------------------- environment startup [Trac 0.12.2] --------------------------------
2011-08-01 11:19:33,907 Trac[loader] DEBUG: Loading TracXMLRPC from /usr/lib/python2.5/site-packages/TracXMLRPC-1.1.2_r0-py2.5.egg
2011-08-01 11:19:33,918 Trac[loader] DEBUG: Loading customfieldadmin.api from /usr/lib/python2.5/site-packages/TracCustomFieldAdmin-0.2.6_r0-py2.5.egg
2011-08-01 11:19:33,919 Trac[loader] DEBUG: Loading customfieldadmin.customfieldadmin from /usr/lib/python2.5/site-packages/TracCustomFieldAdmin-0.2.6_r0-py2.5.egg
2011-08-01 11:19:33,919 Trac[loader] DEBUG: Loading git from /usr/lib/python2.5/site-packages/TracGit-0.12.0.5dev-py2.5.egg
2011-08-01 11:19:33,932 Trac[loader] DEBUG: Loading timingandestimationplugin from /usr/lib/python2.5/site-packages/timingandestimationplugin-0.7.4-py2.5.egg
2011-08-01 11:19:33,934 Trac[loader] DEBUG: Loading trac.about from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,935 Trac[loader] DEBUG: Loading trac.admin.console from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,936 Trac[loader] DEBUG: Loading trac.admin.web_ui from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,938 Trac[loader] DEBUG: Loading trac.attachment from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,938 Trac[loader] DEBUG: Loading trac.db.mysql from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,946 Trac[loader] DEBUG: Loading trac.db.postgres from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,947 Trac[loader] DEBUG: Loading trac.db.sqlite from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,956 Trac[loader] DEBUG: Loading trac.mimeview.patch from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,956 Trac[loader] DEBUG: Loading trac.mimeview.pygments from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,963 Trac[loader] DEBUG: Skipping "trac.mimeview.pygments = trac.mimeview.pygments [pygments]": ("DistributionNotFound: Pygments>=0.6" not found)
2011-08-01 11:19:33,963 Trac[loader] DEBUG: Loading trac.mimeview.rst from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,969 Trac[loader] DEBUG: Skipping "trac.mimeview.rst = trac.mimeview.rst [rest]": ("DistributionNotFound: docutils>=0.3" not found)
2011-08-01 11:19:33,969 Trac[loader] DEBUG: Loading trac.mimeview.silvercity from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,975 Trac[loader] DEBUG: Skipping "trac.mimeview.silvercity = trac.mimeview.silvercity [silvercity]": ("DistributionNotFound: SilverCity>=0.9.4" not found)
2011-08-01 11:19:33,975 Trac[loader] DEBUG: Loading trac.mimeview.txtl from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,981 Trac[loader] DEBUG: Skipping "trac.mimeview.txtl = trac.mimeview.txtl [textile]": ("DistributionNotFound: textile>=2.0" not found)
2011-08-01 11:19:33,981 Trac[loader] DEBUG: Loading trac.prefs from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,982 Trac[loader] DEBUG: Loading trac.search from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,982 Trac[loader] DEBUG: Loading trac.ticket.admin from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,984 Trac[loader] DEBUG: Loading trac.ticket.query from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,984 Trac[loader] DEBUG: Loading trac.ticket.report from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,985 Trac[loader] DEBUG: Loading trac.ticket.roadmap from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,986 Trac[loader] DEBUG: Loading trac.ticket.web_ui from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,986 Trac[loader] DEBUG: Loading trac.timeline from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,987 Trac[loader] DEBUG: Loading trac.versioncontrol.admin from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,988 Trac[loader] DEBUG: Loading trac.versioncontrol.svn_authz from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,989 Trac[loader] DEBUG: Loading trac.versioncontrol.svn_fs from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,990 Trac[loader] DEBUG: Loading trac.versioncontrol.svn_prop from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,990 Trac[loader] DEBUG: Loading trac.versioncontrol.web_ui from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,991 Trac[loader] DEBUG: Loading trac.web.auth from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,994 Trac[loader] DEBUG: Loading trac.web.session from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,995 Trac[loader] DEBUG: Loading trac.wiki.admin from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,995 Trac[loader] DEBUG: Loading trac.wiki.interwiki from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,997 Trac[loader] DEBUG: Loading trac.wiki.macros from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,997 Trac[loader] DEBUG: Loading trac.wiki.web_api from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,997 Trac[loader] DEBUG: Loading trac.wiki.web_ui from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,998 Trac[loader] DEBUG: Loading tracopt.mimeview.enscript from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,999 Trac[loader] DEBUG: Loading tracopt.mimeview.php from /usr/lib/python2.5/site-packages
2011-08-01 11:19:33,999 Trac[loader] DEBUG: Loading tracopt.perm.authz_policy from /usr/lib/python2.5/site-packages
2011-08-01 11:19:34,000 Trac[loader] DEBUG: Loading tracopt.perm.config_perm_provider from /usr/lib/python2.5/site-packages
2011-08-01 11:19:34,000 Trac[loader] DEBUG: Loading tracopt.ticket.commit_updater from /usr/lib/python2.5/site-packages
2011-08-01 11:19:34,002 Trac[loader] DEBUG: Loading tracopt.ticket.deleter from /usr/lib/python2.5/site-packages
2011-08-01 11:19:34,003 Trac[loader] DEBUG: Loading tracsubtickets.api from /usr/lib/python2.5/site-packages/TracSubTicketsPlugin-0.1.0-py2.5.egg
2011-08-01 11:19:34,004 Trac[loader] DEBUG: Loading tracsubtickets.web_ui from /usr/lib/python2.5/site-packages/TracSubTicketsPlugin-0.1.0-py2.5.egg
2011-08-01 11:19:34,004 Trac[loader] DEBUG: Loading webadmin.basics from /usr/lib/python2.5/site-packages
2011-08-01 11:19:34,005 Trac[loader] DEBUG: Loading webadmin.logging from /usr/lib/python2.5/site-packages
2011-08-01 11:19:34,005 Trac[loader] DEBUG: Loading webadmin.perm from /usr/lib/python2.5/site-packages
2011-08-01 11:19:34,005 Trac[loader] DEBUG: Loading webadmin.plugin from /usr/lib/python2.5/site-packages
2011-08-01 11:19:34,006 Trac[loader] DEBUG: Loading webadmin.ticket from /usr/lib/python2.5/site-packages
2011-08-01 11:19:34,007 Trac[loader] DEBUG: Loading webadmin.web_ui from /usr/lib/python2.5/site-packages
2011-08-01 11:19:34,085 Trac[default_workflow] DEBUG: Workflow actions at initialization: {u'resolve': {u'operations': [u'set_resolution'], 'name': u'resolve', 'default': 0, 'newstate': u'closed', 'oldstates': [u'new', u'assigned', u'accepted', u'reopened'], u'permissions': [u'TICKET_MODIFY']}, u'accept': {u'operations': [u'set_owner_to_self'], 'name': u'accept', 'default': 0, 'newstate': u'accepted', 'oldstates': [u'new', u'assigned', u'accepted', u'reopened'], u'permissions': [u'TICKET_MODIFY']}, u'leave': {u'operations': [u'leave_status'], 'name': u'leave', u'default': 1, 'newstate': u'*', 'oldstates': [u'*'], 'permissions': []}, u'reopen': {u'operations': [u'del_resolution'], 'name': u'reopen', 'default': 0, 'newstate': u'reopened', 'oldstates': [u'closed'], u'permissions': [u'TICKET_CREATE']}, u'reassign': {u'operations': [u'set_owner'], 'name': u'reassign', 'default': 0, 'newstate': u'assigned', 'oldstates': [u'new', u'assigned', u'accepted', u'reopened'], u'permissions': [u'TICKET_MODIFY']}, '_reset': {'operations': ['reset_workflow'], 'name': 'reset', 'default': 0, 'newstate': 'new', 'oldstates': [], 'permissions': []}}

2011-08-01 11:19:34,086 Trac[api] DEBUG: action controllers for ticket workflow: ['ConfigurableTicketWorkflow']

comment:8 Changed 9 years ago by bas

Can you just skip the email and use the email2trac script on the command line:

  • email2trac -d --project=margusja < msg.txt

msg.txt is include in the source of the package. This is a basic test without an email/alias setup.

PS) Some plugins are not found for this environment, see SKIPPING

comment:9 Changed 9 years ago by margus@…

email2trac -d --project=margusja < msg.txt hangs:

[12:54:07 root@arendus trac :/var/www/trac]# /usr/local/bin/email2trac -d --project=margusja /tmp/msg.txt 
2011-08-01 12:54:10,646 email2trac : Found trac version: 0.12
2011-08-01 12:54:10,788 email2trac : Loading environment /var/www/trac/margusja/
2011-08-01 12:54:10,904 email2trac : Main function parse

comment:10 Changed 9 years ago by anonymous

Sorry, my mistake. command was wrong :( right one and there is a new ticket in trac.

[13:08:14 root@arendus trac :/var/www/trac]# /usr/local/bin/email2trac -d --project=margusja < /tmp/msg.txt 
2011-08-01 13:08:20,269 email2trac : Found trac version: 0.12
2011-08-01 13:08:20,705 email2trac : Loading environment /var/www/trac/margusja/
2011-08-01 13:08:21,040 email2trac : Main function parse
saving email to /tmp/tmppAUWLN.email2trac
2011-08-01 13:08:21,099 email2trac : function get_message_parts()
2011-08-01 13:08:21,099 email2trac : 	 Message part: Main-Type: multipart
2011-08-01 13:08:21,099 email2trac : 	 Message part: Content-Type: multipart/mixed
2011-08-01 13:08:21,100 email2trac : 	 Skipping multipart container
2011-08-01 13:08:21,100 email2trac : 	 Message part: Main-Type: text
2011-08-01 13:08:21,100 email2trac : 	 Message part: Content-Type: text/plain
2011-08-01 13:08:21,100 email2trac : function inline_part()
2011-08-01 13:08:21,109 email2trac : 	 Message part: Main-Type: text
2011-08-01 13:08:21,109 email2trac : 	 Message part: Content-Type: text/plain
2011-08-01 13:08:21,110 email2trac : function inline_part()
2011-08-01 13:08:21,111 email2trac : function unique_attachment_names()
2011-08-01 13:08:21,111 email2trac : function get_body_text()
writing body to /tmp/tmpmxXsK8.email2trac
2011-08-01 13:08:21,112 email2trac : function debug_attachments
2011-08-01 13:08:21,114 email2trac : function email_to_unicode
2011-08-01 13:08:21,115 email2trac : function email_to_unicode
2011-08-01 13:08:21,117 email2trac : function email_header_acl: white_list
2011-08-01 13:08:21,117 email2trac : white_list not defined, all messages are allowed.
2011-08-01 13:08:21,117 email2trac : function email_header_acl: black_list
2011-08-01 13:08:21,117 email2trac : black_list not defined, all messages are allowed.
2011-08-01 13:08:21,117 email2trac : function email_header_acl: recipient_list
2011-08-01 13:08:21,117 email2trac : recipient_list not defined, all messages are allowed.
2011-08-01 13:08:21,118 email2trac : function email_to_unicode
2011-08-01 13:08:21,118 email2trac : subject: Test123
2011-08-01 13:08:21,119 email2trac : function ticket_update_by_subject
2011-08-01 13:08:21,119 email2trac : function new_ticket
2011-08-01 13:08:21,128 email2trac : function set_reply_fields
2011-08-01 13:08:21,128 email2trac : function set_ticket_fields
2011-08-01 13:08:21,128 email2trac : trac[summary] = 
2011-08-01 13:08:21,128 email2trac : trac[reporter] = 
2011-08-01 13:08:21,128 email2trac : trac[owner] = 
2011-08-01 13:08:21,129 email2trac : trac[description] = 
2011-08-01 13:08:21,129 email2trac : trac[type] = defect
2011-08-01 13:08:21,129 email2trac : used type = defect
2011-08-01 13:08:21,129 email2trac : trac[status] = 
2011-08-01 13:08:21,129 email2trac : trac[priority] = Tavatöö
2011-08-01 13:08:21,129 email2trac : used priority = Tavatöö
2011-08-01 13:08:21,129 email2trac : trac[milestone] = 
2011-08-01 13:08:21,130 email2trac : trac[component] = OKIA
2011-08-01 13:08:21,130 email2trac : used component = OKIA
2011-08-01 13:08:21,130 email2trac : trac[resolution] = None
2011-08-01 13:08:21,130 email2trac : trac[keywords] = 
2011-08-01 13:08:21,130 email2trac : trac[cc] = 
2011-08-01 13:08:21,130 email2trac : trac[time] = 
2011-08-01 13:08:21,130 email2trac : trac[changetime] = 
2011-08-01 13:08:21,131 email2trac : trac[estimatedhours] = 0
2011-08-01 13:08:21,131 email2trac : used estimatedhours = 0
2011-08-01 13:08:21,131 email2trac : trac[hours] = 0
2011-08-01 13:08:21,131 email2trac : used hours = 0
2011-08-01 13:08:21,131 email2trac : trac[billable] = 1
2011-08-01 13:08:21,131 email2trac : used billable = 1
2011-08-01 13:08:21,131 email2trac : trac[totalhours] = 0
2011-08-01 13:08:21,131 email2trac : used totalhours = 0
2011-08-01 13:08:21,132 email2trac : function update_ticket_fields
2011-08-01 13:08:21,132 email2trac : user_field	 hours = 0
2011-08-01 13:08:21,132 email2trac : ticket_field	 hours = 0
2011-08-01 13:08:21,132 email2trac : user_field	 totalhours = 0
2011-08-01 13:08:21,132 email2trac : ticket_field	 totalhours = 0
2011-08-01 13:08:21,132 email2trac : user_field	 component = OKIA
2011-08-01 13:08:21,132 email2trac : ticket_field	 component = OKIA
2011-08-01 13:08:21,132 email2trac : user_field	 priority = Tavatöö
2011-08-01 13:08:21,133 email2trac : ticket_field	 priority = Tavatöö
2011-08-01 13:08:21,133 email2trac : user_field	 billable = 1
2011-08-01 13:08:21,133 email2trac : ticket_field	 billable = 1
2011-08-01 13:08:21,133 email2trac : user_field	 estimatedhours = 0
2011-08-01 13:08:21,133 email2trac : ticket_field	 estimatedhours = 0
2011-08-01 13:08:21,133 email2trac : user_field	 type = defect
2011-08-01 13:08:21,133 email2trac : ticket_field	 type = defect
2011-08-01 13:08:21,134 email2trac : function get_message_parts()
2011-08-01 13:08:21,134 email2trac : 	 Message part: Main-Type: multipart
2011-08-01 13:08:21,134 email2trac : 	 Message part: Content-Type: multipart/mixed
2011-08-01 13:08:21,134 email2trac : 	 Skipping multipart container
2011-08-01 13:08:21,134 email2trac : 	 Message part: Main-Type: text
2011-08-01 13:08:21,134 email2trac : 	 Message part: Content-Type: text/plain
2011-08-01 13:08:21,134 email2trac : function inline_part()
2011-08-01 13:08:21,135 email2trac : 	 Message part: Main-Type: text
2011-08-01 13:08:21,135 email2trac : 	 Message part: Content-Type: text/plain
2011-08-01 13:08:21,135 email2trac : function inline_part()
2011-08-01 13:08:21,135 email2trac : function unique_attachment_names()
2011-08-01 13:08:21,136 email2trac : function get_body_text()
2011-08-01 13:08:21,145 email2trac : function html_mailto_link
2011-08-01 13:08:21,146 email2trac : 	mailto link [mailto:"margusja%40okia.ee?Subject=Re%3A%20%235233%3A%20Test123&cc=msupport%40arendus.okia.ee" Reply to: margusja@okia.ee]
2011-08-01 13:08:21,146 email2trac : function attach_attachments()
2011-08-01 13:08:21,214 email2trac : function notify()
[13:08:21 root@arendus trac :/var/www/trac]# 

comment:11 Changed 9 years ago by bas

Then there is an permission problem. Which MTA do you use sendmail, postfix, ..? See:

for postfix there are several solutions. You can check the id of your MTA with a small scriipt:

I shall update the wiki with this check:

vi run_email2trac
#/bin/sh
id >> /var/tmp/sendmail.id
chmod 755 run_email2trac

comment:12 Changed 9 years ago by margus@…

I use postfix and postfix user:group is nobody. I compiled with nobody.

comment:13 Changed 9 years ago by margus@…

./configure -with-trac_user=apache --with-mta_user=nobody

comment:14 Changed 9 years ago by bas

I am clueless. If email2trac is working and run_email2trac not then it must be a permission problem or your database is corrupt. I had the same problem with a trac project. run_email2trac failed and email2trac worked as root.

I dumped and load the database and the problem went away

comment:15 Changed 9 years ago by d.love@…

I'm seeing something similar with an sqlite database, running under postfix on Ubuntu 10.4 with debug output:

...
Aug 10 15:39:51 arc email2trac SGE: function get_body_text()
Aug 10 15:39:51 arc email2trac SGE: Traceback (most recent call last):
Aug 10 15:39:51 arc email2trac SGE:   File "/usr/bin/email2trac", line 2467, in <module>#012    tktparser.parse(sys.stdin)
Aug 10 15:39:51 arc email2trac SGE:   File "/usr/bin/email2trac", line 1660, in parse#012    self.new_ticket(m, subject, spam_msg)
Aug 10 15:39:51 arc email2trac SGE:   File "/usr/bin/email2trac", line 1125, in new_ticket#012    self.id = tkt.insert()
Aug 10 15:39:51 arc email2trac SGE:   File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.2-py2.6.egg/trac/ticket/model.py", line 226, in insert#012    @self.env.with_transaction(db)
Aug 10 15:39:51 arc email2trac SGE:   File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.2-py2.6.egg/trac/db/api.py", line 82, in transaction_wrapper#012    ldb.rollback()
Aug 10 15:39:51 arc email2trac SGE:   File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.2-py2.6.egg/trac/db/sqlite_backend.py", line 286, in rollback#012    self.cnx.rollback()
Aug 10 15:39:51 arc email2trac SGE: OperationalError: cannot rollback - no transaction is active
Aug 10 15:39:51 arc email2trac SGE: function get_message_parts()
...

and the ticket isn't created. If I run run_email2trac on the command line, su'd to nobody, it works. The piped command is being run as nobody.nogroup and run_email2trac appears to be correctly configured to use www-data and nobody, judging by the output of strings on it.

comment:16 Changed 9 years ago by margus@…

Hi, I think i found the problem in my case. mailbox_size_limit = 0 line in postfix configuration helped me.

comment:17 Changed 9 years ago by bas

thanks for the update. I will document it. Maybe it is time for a FAQ

comment:18 Changed 9 years ago by d.love@…

I can confirm the mailbox_size_limit = 0 fix. For what it's worth, when I dropped the run_email2trac invocation in favour of an aliases file owned by www-data, I didn't get the traceback in the debug messages, but still didn't get anything entered into the system.

comment:19 Changed 9 years ago by bas

  • Priority changed from major to minor

thanks for the update. We definitely must update the docs with this info mailbox_size_limit = 0.

I will test the secondary setup for postfix, maybe some permission problem?

comment:20 Changed 6 years ago by bas

  • Description modified (diff)
  • Resolution set to fixed
  • Status changed from assigned to closed

Finally documented in the FAQ

Add Comment

Modify Ticket

Change Properties
Action
as closed The owner will remain bas.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.