#40 closed setup (fixed)
Lost in config - emails not arriving at trac
Reported by: | Johan | Owned by: | bas |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | email2trac | Version: | 0.1 |
Keywords: | Cc: |
Description
I've read and reread the docs, but I'm obviously missing something. I can't get email2trac setup properly.
running email2trac --project=alarmsystem < msg.txt produces the message TD: saving email to /tmp/tmp6TmF-f.email2trac - I don't have write access to /var/lib/trac/alarmsystem/db/, fair enough. If I run the command as root it works, and I get the new ticket in trac.
It's after this I'm lost, when trying to send an email to create the ticket.
What address does it get sent to? Should that address be a user on the system? An existing user? A new user?
As far as I understand it, I have fetchmail fetching mail from the server, and postfix delivers it. Should I use:
bugs: | "/usr/local/bin/run_email2trac --project=alarmsystem" - for postfix
or
mda "/usr/local/bin/run_email2trac" - for fetchmail
The mta_user needs to be configured for each one, and I've checked that that's set correctly when I try this.
So far I've tried creating a new email - bugs@.org.uk, and a new user - bugs - who recieves the email. This works, it's simple enough for me to handle!
I add the alias in postfix, and nothing actually happens. The user bugs still recieves the emails without them appearing in trac. If I change the alias to do something else with the emails, such as forward them to someone else, that works as anticipated. So postfix is doing its job, I think.
What step have I missed? What am I not understanding?
Ubuntu feisty trac 0.10.3-1 email2trac 0.10
Attachments (0)
Change History (7)
comment:1 Changed 16 years ago by bas
- Status changed from new to assigned
comment:2 Changed 16 years ago by bas
Johan,
Do your run trac standalone or via the web and how did you configure email2trac?
First of all the email2trac must have write access to the trac database. I shall describe my setup and maybe this will clarify things. For email2trac i have setup an email address:
email2trac@sara.nl
On our trac machine have made an alias:
email2trac: |"/usr/bin/run_email2trac --project email2trac"
On the trac machine i run postfix/apache setup. So i have configured email2trac to use for mta_user : nobody trac_user : www-data
run_email2trac is suid root so it will switch the from mta_user (postifx) to the trac_user (apache). This user has write access to the trac database.
Hopefully it is more clear ~
comment:3 Changed 16 years ago by bas
- Type changed from defect to setup
comment:4 Changed 16 years ago by anonymous
trac runs via the web - apache2.
I changed the permissions of /var/lib/trac/alarmsystem/attachments/ which was causing email2trac --project=alarmsystem < msg.txt to fail. That now works.
I configured email2trac --with-mta_user=postfix, and left trac-user as the default.
The postfix alias is
bugs: |"/usr/local/bin/run_email2trac --project=alarmsystem"
I note that the path is different. After installation email2trac etc was in /usr/local/bin, as per the defaults, but the Mail server configuration instructions assume it's all in /usr/bin.
email2trac.conf:
[DEFAULT] project: /var/lib/trac/alarmsystem debug: 10 trac_version: 0.10 enable_syslog : 1
comment:5 Changed 16 years ago by bas
It depends where you installed email2trac for the path. In the web documentation the email2trac is is installed in /usr/bin, this is an example.
The default user for postfix is nobody. So you are fine with the defaults. can you recompile email2trac and try it again.
comment:6 Changed 16 years ago by Johan
- Resolution set to fixed
- Status changed from assigned to closed
Oh, for crying out loud...
I did as you suggested, it still didn't work.
I'd made a bigger mistake than that.
I wasn't updating the aliases db when adding the email2trac alias. For some reason I was doing it when I tested other aliases.
Many thanks for your help, even if it was my stupidity!
(Though I would suggest having all the documentation refer to the same locations, example or not.)
comment:7 Changed 16 years ago by bas
Good to hear that it works ;-)
Johan,
On our trac machine have made an alias: