Modify

Opened 19 years ago

Closed 18 years ago

#420 closed task (fixed)

errors using email2trac 0.7 with sendmail

Reported by: anonymous Owned by: anonymous
Priority: normal Component: EmailtoTracScript
Severity: normal Keywords:
Cc: Trac Release: 0.9

Description

I have set up the script as described in the install doc and on this site. I am using sendmail with the following line in /etc/aliases: tracproj: |/usr/local/bin/run_email2trac --project=motionbox --component=UI-partner

/usr/local/etc/email2trac.conf looks like:

[DEFAULT]
project: /usr/share/trac/motionbox
debug: 1
umask: 022
spam_level: 4
reply_address: 0
reply_all : 0
mailto_link: 0
umask: 022
email_comment: >
email_header: 1
trac_version: 0.9
alternate_notify_template :
ticket_update: 1

(ticket address: bugs@no-sapm.motionbox.com)
[notification]
smtp_enabled = true
smtp_always_cc = jim@no-sapm.motionbox.com
smtp_server = localhost
smtp_from =  bugs@no-sapm.motionbox.com
always_notify_reporter = true

The email2trac was compiled with ./configure --with-mta_user=root --with-trac_user=emailticket.

These are the errors in /var/log/maillog when I try to send mail to the tracproj user:

Jun  8 18:01:04 repo sendmail[31150]: k58M14OM031150: from=jim, size=45, class=0, nrcpts=1, msgid=<200606082201.k58M14OM031150@repo.motionbox.com>, relay=jim@localhost
Jun  8 18:01:04 repo sendmail[31151]: k58M14sh031151: from=<jim@no-sapm.repo.motionbox.com>, size=332, class=0, nrcpts=1, msgid=<200606082201.k58M14OM031150@repo.motionbox.com>, proto=ESMTP, daemon=MTA, relay=repo.motionbox.com [127.0.0.1]
Jun  8 18:01:04 repo sendmail[31150]: k58M14OM031150: to=tracproj, ctladdr=jim (504/504), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30045, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k58M14sh031151 Message accepted for delivery)
Jun  8 18:01:04 repo smrsh: uid 8: attempt to use "run_email2trac.--project=motionbox.--component=UI-partner" (stat failed)
Jun  8 18:01:04 repo sendmail[31152]: k58M14sh031151: to=|/usr/local/bin/run_email2trac --project=motionbox --component=UI-partner, ctladdr=<tracproj@no-sapm.repo.motionbox.com> (8/0), delay=00:00:00, xdelay=00:00:00, mailer=prog, pri=30544, dsn=5.0.0, stat=Service unavailable
Jun  8 18:01:04 repo sendmail[31152]: k58M14sh031151: k58M14sh031152: DSN: Service unavailable
Jun  8 18:01:04 repo sendmail[31152]: k58M14sh031152: to=<jim@no-sapm.repo.motionbox.com>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31568, dsn=2.0.0, stat=Sent

Perhaps I am making some obvious mistake. If so, would deeply appreciate some guidance toward the correct path.

Attachments (0)

Change History (8)

comment:1 Changed 19 years ago by anonymous

I found that I couldn't get run_email2trac to work. It should be straightforward, but it never seemed to have the right user or permissions. This was occurring even though I set the MTA and Webserver users as instructed to the local users for these services.

I ended up just executing the script directly in the NIS+ tables for the alias. This worked, but there are probably reasons I shouldn't be running it this way...

This was a running on a Solaris 9 Sparc environment and used the Sun v11 compilers.

comment:2 Changed 19 years ago by Alec Thomas

Reporter: changed from jim@… to anonymous

Please don't put invalid E-Mail addresses in the reporter field, it causes delivery failures. If you don't want to put a valid address, put nothing.

comment:3 Changed 19 years ago by anonymous

I use postfix so i have no experience with sendmail. Can you write a document how to configure for sendmail?

Can you send error report for the invalid email-addresses. What is written to the reporter field? Do mean the address that was in this ticket reporter field. I have no control about this system and how can i decide which is valid address?

Regards

comment:4 Changed 19 years ago by anonymous

@athomas, sorry about the fake email addresses.

@anonymous at 17:33:21, the instructions for sendmail can be found here.

SO, one thing I was doing wrong is that smrsh will not run programs except those in /etc/smrsh/.

I ran # ln -s /usr/local/bin/run_email2trac /etc/smrsh/, and changed /etc/aliases to contain the line tracproj: |/etc/smrsh/run_email2trac --project=motionbox --component=UI-partner, then ran newaliases.

The errors are pretty similar to before:

}}} Jun 9 14:18:00 repo sendmail[1361]: k59II0Sa001361: from=jim, size=53, class=0, nrcpts=1, msgid=<200606091818.k59II0Sa001361@…>, relay=jim@localhost Jun 9 14:18:00 repo sendmail[1362]: k59II0He001362: from=<jim@…>, size=340, class=0, nrcpts=1, msgid=<200606091818.k59II0Sa001361@…>, proto=ESMTP, daemon=MTA, relay=tracserver.example.com [127.0.0.1] Jun 9 14:18:00 repo sendmail[1361]: k59II0Sa001361: to=tracproj, ctladdr=jim (504/504), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30053, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k59II0He001362 Message accepted for delivery) Jun 9 14:18:00 repo smrsh: uid 8: attempt to use "run_email2trac.--project=motionbox.--component=UI-partner" (stat failed) Jun 9 14:18:00 repo sendmail[1363]: k59II0He001362: to=|/etc/smrsh/run_email2trac --project=motionbox --component=UI-partner, ctladdr=<tracproj@…> (8/0), delay=00:00:00, xdelay=00:00:00, mailer=prog, pri=30552, dsn=5.0.0, stat=Service unavailable Jun 9 14:18:00 repo sendmail[1363]: k59II0He001362: k59II0He001363: DSN: Service unavailable Jun 9 14:18:00 repo sendmail[1363]: k59II0He001363: to=<jim@…>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31576, dsn=2.0.0, stat=Sent }}}

Mail bounces with an email message coming back like this:

   ----- The following addresses had permanent fatal errors -----
|/etc/smrsh/run_email2trac --project=motionbox --component=UI-partner
    (reason: Service unavailable)
    (expanded from: <tracproj@repo.motionbox.com>)

   ----- Transcript of session follows -----
smrsh: "run_email2trac.--project=motionbox.--component=UI-partner" not available for sendmail pr
ograms (stat failed)
554 5.0.0 Service unavailable

Thanks all, Jim

comment:5 Changed 19 years ago by anonymous

Sorry, that maillog output is

Jun  9 14:18:00 repo sendmail[1361]: k59II0Sa001361: from=jim, size=53, class=0, nrcpts=1, msgid=<200606091818.k59II0Sa001361@repo.motionbox.com>, relay=jim@localhost
Jun  9 14:18:00 repo sendmail[1362]: k59II0He001362: from=<jim@repo.motionbox.com>, size=340, class=0, nrcpts=1, msgid=<200606091818.k59II0Sa001361@repo.motionbox.com>, proto=ESMTP, daemon=MTA, relay=repo.motionbox.com [127.0.0.1]
Jun  9 14:18:00 repo sendmail[1361]: k59II0Sa001361: to=tracproj, ctladdr=jim (504/504), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30053, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k59II0He001362 Message accepted for delivery)
Jun  9 14:18:00 repo smrsh: uid 8: attempt to use "run_email2trac.--project=motionbox.--component=UI-partner" (stat failed)
Jun  9 14:18:00 repo sendmail[1363]: k59II0He001362: to=|/etc/smrsh/run_email2trac --project=motionbox --component=UI-partner, ctladdr=<tracproj@repo.motionbox.com> (8/0), delay=00:00:00, xdelay=00:00:00, mailer=prog, pri=30552, dsn=5.0.0, stat=Service unavailable
Jun  9 14:18:00 repo sendmail[1363]: k59II0He001362: k59II0He001363: DSN: Service unavailable
Jun  9 14:18:00 repo sendmail[1363]: k59II0He001363: to=<jim@repo.motionbox.com>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31576, dsn=2.0.0, stat=Sent

comment:6 Changed 19 years ago by anonymous

Owner: changed from Bas van der Vlies to anonymous
Status: newassigned

Can you try this it is rom ticket #308. I think the wiki page for sendmail must be updated:

Yea, I hate sendmail as well.

Sendmail limits the executables that can be run via aliases to those in a special directory, and runs them using a restricted shell called smrsh. On RH, the default location for the allowed programs is /etc/smrsh.

I tried both a link in that dir to the run_email2trac file and a little shell script that simply calls run_email2trac and passes the params. Both should work, but neither did yet. Majordomo works the same way, and it set up on the machine already so I'll check on that later today.

I found a pretty good walk-through of the problem/solution at http://archives.free.net.ph/message/20030605.105120.74c3bfa8.html

2006-04-15 01:26:49 changed by anonymous 

Well, I was in fact doing the right thing. Here's all the steps to follow post make install

ln -s /usr/local/bin/run_email2trac /etc/smrsh/run_email2trac

in aliases use:

"|run_email2trac —project=…"

Note: Include the quotes, they are necessary. That got me past the sendmail problem. No ticket appeared in the project, but I'll look into that next. Is there a log generated anywhere?

comment:7 Changed 19 years ago by anonymous

Type: defecttask

Everything seems to work. So close it. We have to update the docs for sendmail. Can some one do it?

comment:8 Changed 18 years ago by Bas van der Vlies

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain anonymous.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.