Modify

Opened 7 years ago

Last modified 7 years ago

#418 assigned setup

Email doesn't create tickets

Reported by: ashford@… Owned by: bas
Priority: major Milestone:
Component: email2trac Version: 2.11.0
Keywords: Cc:

Description

Hi,

I'm having a problem with the 'email2trac' software.  I expect it's a
problem with my configuration, but I have no idea where.  I've gone
through the docs and tickets and made the changes that I thought would
help, making some progress (thanks to ticket 279), but I'm now at a
standstill (nothing in the audit.log file).

I'm currently running V2.11 of email2trac on a free Amazon EC2 instance
running Amazon Linux.


Installation procedure (run as ROOT):
# Install email2trac
mkdir work
cd work
wget ftp://ftp.surfsara.nl/pub/outgoing/email2trac.tar.gz
tar xzf email2trac.tar.gz
cd email2trac-*
./configure --with-mta_user=editors --with-trac_user=apache
make
make install
cd ../..
rm -rf work


Invocation:
Because the incoming email is generated from a forum as PMs, the "From"
on the incoming message is meaningless, and I need to extract the
originator from the content of the message.  To do this, I use a
.forward file to send the message to a script to filter/modify incoming
messages.  That script creates a "valid" (I hope) message and sends it
to the email2trac script, as follows:
/usr/local/bin/run_email2trac -d -v < ${TMP}/message.out 2>&1 >
/tmp/email2trac.log

A sample of the message.out file is:
 From: testuser
Date: Thu, 03 Aug 2017 03:10:32 +0000
Message-Id: <4u1zhunt3szu.1VytYN2dZNyn-FOlnrAlkw2@tracking.mydomain.com>
Subject: New ticket

  ID test #6

Are there additional header lines that I need to include?

The /tmp/email2trac.log file always ends up empty, and there's no
information in the SYSLOG file.

How can I get more information out of email2trac, so that I can resolve
this?

Thank you.

Peter Ashford

Attachments (0)

Change History (9)

comment:1 Changed 7 years ago by bas

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

Do no need to run run_email2trac can you run:

  • `email2trac -d < $(TMP)/meessage.out

The run_emailtrac is used with a real MTA to switch users, but is not neeeded

comment:2 Changed 7 years ago by ashford@…

Requested change made.  Still no ticket generated.  Still an empty log
file, but with an updated timestamp.

Also:
# sestatus
SELinux status:                 disabled
#

On 2017-08-03 02:36, email2trac wrote:

comment:3 Changed 7 years ago by bas

That is strange. It must display something:

  • email2trac -d -v < msg.txt

the msg.txt is the one shipped in the distro. If this one works then it is the format of the message, I suspect the space in fron of From:

 From ...

comment:4 Changed 7 years ago by ashford@…

The space in front of the "From" was a copy/paste error.

Running 'email2trac -d -v < msg.txt' generated:
2017-08-03 15:12:40,766 email2trac test: Found trac version: 1.2
2017-08-03 15:12:40,894 email2trac test: Loading environment
/data/trac/hpcv/project/test
2017-08-03 15:12:40,894 email2trac test: trac error: No Trac environment
found at /data/trac/hpcv/project/test
[Errno 2] No such file or directory:
'/data/trac/hpcv/project/test/VERSION'

I get similar output from interactively running from the 'message.out'
file I create.  I don't know why it has problems with the output
redirection, but I'll look into that later.


The /etc/email2trac.conf file is root/root/644 and contains:
[DEFAULT]
project: /var/www/trac
debug: 0
black_list: MAILER-DAEMON@
drop_spam : 0
drop_alternative_html_version: 1
email_quote: >
html2text_cmd:
ignore_trac_user_settings: 0
inline_properties: 1
reply_all: 0
spam_level: 5
strip_quotes: 0
strip_signature: 0
ticket_update: 1
ticket_update_by_subject: 1
umask: 022
verbatim_format: 1


On 2017-08-03 09:02, email2trac wrote:

comment:5 Changed 7 years ago by ashford@…

Ran 'strace' on email2trac and found that it was using
'/usr/local/etc/email2trac.conf' as the configuration file instead of
'/etc/email2trac.conf'.

Copied the configuration file and received an error about the Trac
Environment.

Fixed the 'project' path in the configuration file and am now getting a
permission error when accessing the db.

For testing, I set the db to 666 and the directory to 777.  The ticket
was created.

Tried through the script and no ticket was created or log file contents.

Returned to using 'run_email2trac' and it works.

My test case is now fully functional.  I encountered a minor error in
the documentation (path for the configuration file) and a problem with
'-d' and '-v' output when being redirected.


On 2017-08-03 09:02, email2trac wrote:

comment:6 Changed 7 years ago by bas.vandervlies@…

Glad that you solved the problem.  The defaults for configure is
/usr/local/etc. If you use the deb/rpm package it is /etc

--
Bas van der Vlies

comment:7 Changed 7 years ago by ashford@…

The two default locations should probably be listed on your
Configuration page.  That would have helped me avoid this issue.

Do you have any ideas on the output redirection issue?

Thank you.

Peter Ashford


On 2017-08-03 11:19, email2trac wrote:

comment:8 Changed 7 years ago by bas

In the installation page it is mentioned:

I will look into the redirection issue.

comment:9 Changed 7 years ago by bas

  • Version changed from 2.8.4 to 2.11.0

Add Comment

Modify Ticket

Change Properties
Action
as assigned The owner will remain bas.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from bas to the specified user. Next status will be 'new'.
Author


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

 
Note: See TracTickets for help on using tickets.