Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#312 closed defect (fixed)

Disto test email doesn't import

Reported by: stephen.a.cochran@… Owned by: bas
Priority: normal Component: EmailtoTracScript
Severity: normal Keywords:
Cc: stephen.a.cochran@… Trac Release: 0.9

Description (last modified by athomas)

Getting a similar error as described in one of the other tickets, but applying the patch didn't fix the problem. The following is reported by sendmail:

Apr 14 11:58:44 dev sendmail[32129]: k3EFwitv032128: to="|run_email2trac --project=turingTime", ctladdr=<turingtime-trac@dev.dartmouth.edu> (8/0), delay=00:00:00, xdelay=00:00:00, mailer=prog, pri=32429, dsn=5.3.0, stat=unknown mailer error 254
Apr 14 11:58:44 dev sendmail[32129]: k3EFwitv032128: k3EFwitv032129: DSN: unknown mailer error 254

when trying to submit the included test email.

Attachments (0)

Change History (12)

comment:1 Changed 8 years ago by athomas

  • Component changed from TracHacks to EmailtoTracScript
  • Description modified (diff)
  • Owner changed from athomas to bas

Presumably you meant this for the EmailtoTracScript, not TracHacks itself.

comment:2 Changed 8 years ago by anonymous

  • Cc stephen.a.cochran@… added
  • Owner changed from bas to anonymous
  • Status changed from new to assigned

The patch in #220 is not for sendmailm but to fix the Notify problem in trac version 0.10. Can you run without the suid program and can email2trac directly in the alias file. Does sendmail run as root or another user?

comment:3 Changed 8 years ago by bas

  • Owner changed from anonymous to bas
  • Status changed from assigned to new

comment:4 Changed 8 years ago by anonymous

Sendmail runs as root for incoming connections and as smmsp for running local queues. I think the suid program might be needed, majordomo required the same setup.

I can try removing the run_email2trac program from the process and point the alias directly at email2trac.py if that's what you're suggesting.

comment:5 Changed 8 years ago by bas

  • Status changed from new to assigned

That is what i meaning pointing directly to email2trac.py.

comment:6 Changed 8 years ago by stephen.a.cochran@…

Changing the link to "ln -s /usr/local/bin/email2trac /etc/smrsh/email2trac"

The error in maillog changed to:

Apr 14 23:10:31 dev sendmail[32530]: k3F3AVMG032529: to="|email2trac --project=turingTime", ctladdr=<turingtime-trac@…> (8/0), delay=00:00:00, xdelay=00:00:00, mailer=prog, pri=32429, dsn=5.3.0, stat=unknown mailer error 1
Apr 14 23:10:31 dev sendmail[32530]: k3F3AVMG032529: k3F3AVMG032530: DSN: unknown mailer error 1

comment:7 Changed 8 years ago by anonymous

Is there a way to call email2trac directly? Can I pipe the msg.txt directly to email2trac?

comment:8 Changed 8 years ago by anonymous

Turns out email2trac is exiting with status 1, which is the error being reported to sendmail and logged. Here's the output from running email2trac manually:

root@dev:/usr/local/bin>./email2trac < msg.txt
TD: saving email to /var/tmp/msg.txt
Traceback (most recent call last):

File "./email2trac", line 645, in ?

tktparser.parse(sys.stdin)

File "./email2trac", line 343, in parse

author, email_addr = self.set_reply_fields(tkt, msg)

File "./email2trac", line 275, in set_reply_fields

if self.notification:

AttributeError: 'TicketEmailParser' object has no attribute 'notification'

comment:9 Changed 8 years ago by anonymous

Can you try this patch:

               if self.get_config('notification', 'smtp_enabled') in ['true']:
                        self.notification = 1
+               else:
+                       self.notification = 0

comment:10 Changed 8 years ago by anonymous

Yep, that fixed it thanks. I checked back to my config file, notification isn't in there (or in the sample included on the main wiki page).

Thanks

comment:11 Changed 8 years ago by anonymous

The patch is checked in. Thanks for testing

comment:12 Changed 8 years ago by bas

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in trunk and new version

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from bas. Next status will be 'closed'.
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.