Modify

Opened 12 years ago

Last modified 11 years ago

#10490 new defect

installation instructions refer to non-existent mail2trac script

Reported by: richard.lyders@… Owned by: Olivier ANDRE
Priority: normal Component: MailToTracPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description (last modified by Ryan J Ollos)

Versions: Trac 1.0, python 2.7.3, Ubuntu 12.04.1 LTS

It appears that the documentation does not match the code in svn. Something appears to be out of syc.

I installed MailToTracPlugin per MailToTracPlugin: easy_install http://trac-hacks.org/svn/mailtotracplugin/0.12/plugin

The instructions refer to a trac-admin command, a bash script (mail2tracAdmin) calling trac-admin...The bash script, mail2tracAdmin may be called by an MTA (e.g. postfix).

When detailing the install for Postfix, it is noted that The mail2trac script takes a -p command line argument for the path to the project environment.

The problem is that there is no existence of any "mail2trac" script. Is this refering to the "mail2tracAdmin" bash script? I've tried to use the "mail2tracAdmin" bash script in place of the non-existent "mail2trac" script, but the "mail2tracAdmin" bash script does not accept a "-p" command line argument as noted for the "mail2trac script". I've tried to leave of the "-p" argument with no success. I've tried about every combination of arguments and commands that might make sense to no avail. I've replaced the "mail2trac" script with python /path/to/mail2trac/email2trac.py as suggested by ethan.jucovy at gmail on http://www.gossamer-threads.com/lists/trac/users/43284?do=post_view_threaded#43284. This still has not resulted in success.

I've begun to debug email2trac.py but it just starts and then ends without calling any of the methods/procedures defined in the file. I am now very experienced at python, so it is a struggle to figure out why nothing is happening.

I was initially having permission problems because the "nobody" user needed permission to run the required files, so I gave access as needed. No more permission problems reported.

I installed postfix per: https://help.ubuntu.com/community/Postfix

Everything tests out fine for postfix. The alias was setup correctly as it is triggered when the email is sent to the server. I am able to send emails to the server and the "email2trac.py" script is triggered, but it just does't do anything. I've

This is the setup I am using for the alias:

nano /etc/aliases ...
    trac: "| python /usr/local/lib/python2.7/dist-packages/mail2trac-1-py2.7.egg/mail2trac/email2trac.py -p /var/opt/trac/projects/alasg"

The instructions instruct me to add the following alias, but:

"mail2trac" does not exist, so that was not an option:
    foo: "| /path/to/mail2trac -p /var/trac/bar"

I downloaded mail2tracAdmin script and then tried to make use of it in the alias, but that failed to work as it appears to accept different parameters (eg, doesn't accept "-p")

    foo: "| /var/opt/trac/projects/alasg/plugins/mail2tracAdmin -p /var/opt/trac/projects/alasg"

I've tried to run a test on the command-line just to see if I can make sense of the parameters and output using the following:

python /usr/local/lib/python2.7/dist-packages/mail2trac-1-py2.7.egg/mail2trac/email2trac.py -p $TRAC_ALASG_HOME <<EOF
Subject: this is my subject
This is my email body text.
.
EOF

...however, the above appears to result in no commands being run within the email2trac.py python script. I've inserted debugging to find out what is going on, but it appears nothing is going on. None of the procedures within the file appear to be executed.

I'm willing to try more, but I am not sure how far to go down any of these roads. Let me know if you see something I have done wrong. Thanks.

Attachments (0)

Change History (2)

comment:1 Changed 12 years ago by Ryan J Ollos

Description: modified (diff)

Attempt to make text more readable.

comment:2 Changed 11 years ago by dave@…

We're supposed to run mail2tracAdmin /path/to/trac, without -p. Check that you have all the smtp settings correctly set up, like smtp_enabled = true. The rest is described in the installation instructions.

The direct ivocation works here with the mail2tracAdmin script if you add a To: (trac) and From: (yourself) fileds, and your account has the same address set up.

HTH

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Olivier ANDRE.

Add Comment


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

 
Note: See TracTickets for help on using tickets.