Modify

Opened 17 years ago

Closed 17 years ago

Last modified 15 years ago

#22 closed defect (worksforme)

configuration for postfix+trac under apache+email2trac0.10 under ubuntu server

Reported by: Denis <denis@…> Owned by: bas
Priority: major Milestone:
Component: email2trac Version: 0.1
Keywords: Cc:

Description

hi,

i really need your help. i know there is explanations on the wiki but
i
didn't understood them well.
postfix has is own user (for example titi).
one another user run apache and can launch trac-admin(for example
toto).
root can launch trac-admin too(for example tutu).
i created an alias in /etc/aliases for toto to launch email2trac
directly por the project toto. this file is owned by tutu in 644
rights
when i launch the test in tutu user and give the project toto in
argument, with the example mail it works.
when in user tutu i send the example by mail to toto, it doesnt work
and
i have this error in syslog :

Aug 28 17:52:34 crewhub email2trac: IOError: [Errno 13] Permission
denied: '/home/toto/www/trac/VERSION'
Aug 28 17:53:45 crewhub email2trac: Traceback (most recent call last):
Aug 28 17:53:45 crewhub email2trac:   File "/usr/bin/email2trac", line
1060, in ?     env = Environment(settings['project'], create=0)
Aug 28 17:53:45 crewhub email2trac:   File
"/var/lib/python-support/python2.4/trac/env.py", line 126, in
__init__     self.verify()
Aug 28 17:53:45 crewhub email2trac:   File
"/var/lib/python-support/python2.4/trac/env.py", line 174, in verify
fd = open(os.path.join(self.path, 'VERSION'), 'r')


Do you have an idea of misconfiguration ?
Can you give me a procedure to make it works ?

i wait for your answer. thanx a lot.

Denis ROY

Attachments (0)

Change History (16)

comment:1 Changed 17 years ago by Denis

  • id set to 22

This message has 0 attachment(s)

comment:2 Changed 17 years ago by anonymous

  • Version changed from 0.9.5 to 0.1

comment:3 Changed 17 years ago by anonymous

another question is, which is the good command line to use in the alias postfix file ?

comment:4 Changed 17 years ago by bas

  • Status changed from new to assigned
  • Summary changed from configuration for postfix+trac under apache+email2trac0.10 under ubuntu server to configuration for postfix+trac under apache+email2trac0.10 under ubuntu server

Denis,

first of all how did yoy build the package? with configure or the debian way? Are the MTA_USER and the TRAC_USER defaults oke for your installation. if not you have to use the command line options in configure, eg:

./configure --with-mta_user=titi --with_trac_user=apache_userid

If you use run_email2trac in your /etc/aliases file is has to be suid root. When i read the error message it means it does not have the right permissions. Just read the documentation carefully for instalation and email configuration. It is all there

Good luck

comment:5 Changed 17 years ago by anonymous

i configured it in the debian way. do i have options to past when i build the package ? my MTA_USER is postfix (i think it's the default) but TRAC_USER is custom.

what is your best advice ? keep run_email2trac in a postfix alias file ?

thanx for your answers and your time.

comment:6 Changed 17 years ago by anonymous

my trac version is 0.10.3 and i use email2trac 0.10

comment:7 Changed 17 years ago by anonymous

oh sorry... i just seen the mta-user was nobody... i will try to do a manual configure or midfy the build-package.

comment:8 Changed 17 years ago by bas

oke, you can also edit the debian/rules file and add:

DEB_CONFIGURE_EXTRA_FLAGS := --enable-python --with-trac_user=<apache_user_id> --with-mta-user=<mat_user_id>

Just follow the test procedure in the email configuration wiki page. I use run_email2trac in /etc/aliases

comment:9 Changed 17 years ago by anonymous

hi again,

i made the debian package with the right users. i use this line in my /etc/aliases : ticket: |"/usr/bin/run_email2trac --project=myproject"

the command email2trac --project=myproject function and create the ticket

when i do a "mail ticket < msg.txt" i don't have an error anymore in trac.log but i receive a mail like that :


I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can delete your own text from the attached returned message.

The mail system

<ticket@…> (expanded from <ticket>): Command died with status

254: "/usr/bin/run_email2trac --project=crewhub"


any idea oh what's going on ?

comment:10 Changed 17 years ago by anonymous

the command "email2trac --project=myproject < msg.txt " work and create the ticket (orry for teh error in the message before

comment:11 Changed 17 years ago by bas

If i read the source of run_email2trac.c:

  if ( caller !=  MTA->pw_uid ) {
    if ( DEBUG ) printf("Invalid caller UID (%d)\n",caller);
    return -2;     /* 254 : Invalid caller */
  }

The user you configured for MTA is wrong.

comment:12 Changed 17 years ago by anonymous

a question :

root 8202 0.0 0.1 4956 1584 ? Ss Sep06 0:02 /usr/lib/postfix/master postfix 21673 0.0 0.1 5000 1688 ? S Sep06 0:00 \_ qmgr -l -t fifo -u postfix 21679 0.0 0.2 5012 2076 ? S Sep06 0:00 \_ tlsmgr -l -t unix -u -c postfix 14465 0.0 0.1 4964 1580 ? S 11:04 0:00 \_ pickup -l -t fifo -u -c postfix 14863 0.0 0.1 4960 1536 ? S 11:22 0:00 \_ anvil -l -t unix -u -c postfix 14960 0.0 0.3 5572 3112 ? S 11:28 0:00 \_ smtpd -n smtp -t inet -u -c -o content_filter spamassassin postfix 14961 0.0 0.2 5100 2096 ? S 11:28 0:00 \_ trivial-rewrite -n rewrite -t unix -u -c postfix 14967 0.0 0.2 5156 2204 ? S 11:28 0:00 \_ cleanup -z -t unix -u -c postfix 14970 0.0 0.2 5160 2192 ? S 11:28 0:00 \_ cleanup -z -t unix -u -c postfix 14971 0.0 0.1 4968 1604 ? S 11:28 0:00 \_ pipe -n spamassassin -t unix user=spamd argv=/usr/bin/spamc -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient} postfix 14977 0.0 0.1 4964 1892 ? S 11:28 0:00 \_ virtual -t unix

for you my MTA user is root or postfix ??? i thought it was postfix...

comment:13 Changed 17 years ago by anonymous

root      8202  0.0  0.1   4956  1584 ?        Ss   Sep06   0:02 /usr/lib/postfix/master
postfix  21673  0.0  0.1   5000  1688 ?        S    Sep06   0:00  \_ qmgr -l -t fifo -u
postfix  21679  0.0  0.2   5012  2076 ?        S    Sep06   0:00  \_ tlsmgr -l -t unix -u -c
postfix  14465  0.0  0.1   4964  1580 ?        S    11:04   0:00  \_ pickup -l -t fifo -u -c
postfix  14863  0.0  0.1   4960  1536 ?        S    11:22   0:00  \_ anvil -l -t unix -u -c
postfix  14960  0.0  0.3   5572  3112 ?        S    11:28   0:00  \_ smtpd -n smtp -t inet -u -c -o content_filter spamassassin
postfix  14961  0.0  0.2   5100  2096 ?        S    11:28   0:00  \_ trivial-rewrite -n rewrite -t unix -u -c
postfix  14967  0.0  0.2   5156  2204 ?        S    11:28   0:00  \_ cleanup -z -t unix -u -c
postfix  14970  0.0  0.2   5160  2192 ?        S    11:28   0:00  \_ cleanup -z -t unix -u -c
postfix  14971  0.0  0.1   4968  1604 ?        S    11:28   0:00  \_ pipe -n spamassassin -t unix  user=spamd argv=/usr/bin/spamc -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
postfix  14977  0.0  0.1   4964  1892 ?        S    11:28   0:00  \_ virtual -t unix

better this way... :-)

comment:14 Changed 17 years ago by bas

Denis,

Just do a simple test:

  • edit /etc/aliases and add bas: |"/var/tmp/test"
  • vi /var/tmp/test
    #!/bin/sh
    
    /usr/bin/id > /var/tmp/postfix_id
    
  • chmod 755 /var/tmp/test
  • mail bas
  • cat /var/tmp/postfix_id

Hope this helps

comment:15 Changed 17 years ago by anonymous

yes this help me a lot !

cat /tmp/postfix_id uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)

thanx, i will rebuild my package and sending bask to you the result.

comment:16 Changed 17 years ago by anonymous

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

it works !!!

thanx a lot for your precious help ! i close the ticket.

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.