Modify

Opened 13 years ago

Closed 9 years ago

#112 closed defect (fixed)

no notification for tickets which created by email although always_cc is set

Reported by: winnie@… Owned by: bas
Priority: major Milestone: 0.80
Component: email2trac Version: 0.4
Keywords: Cc:

Description

Hey,

If I create a new ticket via a email no notification is send to the email listed in always_cc is send. This is quite stupid since it would be cool to know if someone has create a new ticket.

If I create a ticket via webinterface the notification works of course

Attachments (0)

Change History (30)

comment:1 Changed 13 years ago by bas

  • Status changed from new to assigned

When i am back from holidays i will llok into it, did you enabled in trac.ini:

      smtp_enabled = true
      smtp_always_cc = test@test.nl

comment:2 Changed 13 years ago by bas

is the same problem as described in #113?

comment:3 Changed 13 years ago by anonymous

Same with the version r253.

comment:4 Changed 13 years ago by anonymous

That is strange because i also use smtp_always_cc for different projects and encounter no problem at all. Maybe one of the plugins is causing these side effect. What version of trac do you use? This ny serup:

notification]
always_notify_reporter = true
smtp_always_cc = basv@sara.nl
smtp_enabled = true
smtp_from = email2trac@sara.nl
smtp_port = 25
smtp_replyto = email2trac@sara.nl

comment:5 Changed 13 years ago by winnie@…

Well.. I guess I found the issue: you've to set a python egg cache which is writeable for the user trac (or the webpage) is running for. With setting the cache to /tmp everything works fine.

The mainquestion for me is now: Why the hell the normal notifications via web worked.. but via email2trac not?

comment:6 Changed 12 years ago by bas

  • Milestone set to 0.80

the enviroment is set by the MTA and the other is set via your WEBSERVER, maybe we must always set the python egg cache

comment:7 Changed 12 years ago by bas

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

comment:8 Changed 10 years ago by thomas.schabetsberger@…

This ticket has been closed years ago. Although I am figuring out exactly this problem. Trac works well. I have configured the smtp_always_cc address and I receive notifications on any changes.

However I do not recieve anything when a ticket has been created by email2trac. Also the reporter or the owner are not notified. It seams that no email is going out in this case.

When I modify such a ticket via the web form, everything goes right and notifications are sent out.

Based on the previous comment I gave the .egg-cache 777 rights and restarted Apache, which did not solve the problem.

Do you have a hint for me where I should have a look on?

comment:9 Changed 10 years ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:10 follow-up: Changed 10 years ago by bas

There is nothing in the trac.log. And do you use run_email2trac. If yes can you try the [--eggcache=<directory>] option for run_email2trac. This set the python egg cache directory environment variable. The setting in email2trac.conf iss tool late.

I forgot to document it. It is now also fixed in the wiki

comment:11 in reply to: ↑ 10 Changed 10 years ago by bas

Replying to bas:

There is nothing in the trac.log. And do you use run_email2trac. If yes can you try the [--eggcache=<directory>] option for run_email2trac. This set the python egg cache directory environment variable. The setting in email2trac.conf iss tool late.

I forgot to document it. It is now also fixed in the wiki

Did this suggestion solved your problem?

comment:12 Changed 10 years ago by thomas.schabetsberger@…

Thank you for your answer. Adding --eggcache=<directory> results in fetchmail errors. Thats what I have in my fetchmailrc:

poll mail.med-home.com protocol IMAP username "trac-ticket" password "xxxxxxxx"
mda "/usr/local/bin/run_email2trac --eggcache=/var/data/trac/.egg-cache"

And thats the error I receive now:

fetchmail: MDA returned nonzero status 1

comment:13 Changed 10 years ago by thomas.schabetsberger@…

Now I played around, removed the --eggcache option when calling the run_email2trac in fetchmailrc. In /var/log/syslog I know get this:

webtek)root@minerva:/var/lib/fetchmail# tail -f /var/log/syslog
Jan  7 01:35:01 minerva email2trac trac: Failure sending notification on creation of ticket #423: Can't extract file(s) to egg cache  The following error occurred while trying to extract file(s) to the Python egg cache:    [Errno 13] Permission denied: '/var/lib/fetchmail/.python-eggs'  The Python egg cache directory is currently set to:    /var/lib/fetchmail/.python-eggs  Perhaps your account does not have write access to this directory?  You can change the cache directory by setting the PYTHON_EGG_CACHE environment variable to point to an accessible directory. 
Jan  7 01:35:02 minerva sSMTP[5807]: Sent mail for root@webtek.at (221 Bye.) uid=101 username=fetchmail outbytes=708

this looks much better than before. But how can I solve this now?

comment:14 Changed 10 years ago by bas

Just set the egg cache directory to /var/tmp where fetchmail and trace both has write access.

comment:15 Changed 10 years ago by thomas.schabetsberger@…

poll mail.med-home.com protocol IMAP username "trac-ticket" password "xxxxxxxxx"
mda "/usr/local/bin/run_email2trac --eggcache=/var/tmp"

Delivers a "fetchmail: MDA returned nonzero status 1". Also, no tickets are created anymore from emails. If I remove the --eggcache option, then tickets are created again, but no emails are sent and the error message from above re-appears.

comment:16 Changed 10 years ago by bas

Just be sure can you test 2 scenarios:

  1. chmod 777 /var/lib/fetchmail/.python-egg . So everybody can write and read there

or:

  1. Make in /var/tmp a directory .python-egg with permission 777 and set the eggcache option again

Do you have a notification plugin installed that may cause this side effect?

comment:17 Changed 10 years ago by anonymous

I always get Spam errors, i am not able to post.

comment:18 Changed 10 years ago by bas

You always post as anonymous. Just fill in a valid email address or send a reply by mail. With subject line intact.

comment:19 follow-up: Changed 10 years ago by bas

Thank you for your reply. Both scenarios have the same result: fetchmail: MDA returned nonzero status 1

Starting fetchmail from commandline (not via cron), which brings up the following:

(webtek)fetchmail@minerva:/var/tmp$ fetchmail -f /etc/fetchmailrc
1 message for trac-ticket at mail.med-home.com.
reading message trac-ticket@mail.med-home.com:1 of 1 (1034 header octets).
email2trac.py -- Email -> TRAC tickets

A MTA filter to create Trac tickets from inbound emails.

first proof of concept from:
 Copyright 2005, Daniel Lundin <daniel@edgewall.com>
 Copyright 2005, Edgewall Software

Authors:
  Bas van der Vlies <basv@sara.nl>
  Walter de Jong <walter@sara.nl>

How to use
----------
 * See https://subtrac.sara.nl/oss/email2trac/

 * Commandline opions:
                -h,--help
                -d, --debug 
                -f,--file  <configuration file>
                -n,--dry-run
                -p, --project <project name>
                -t, --ticket_prefix <name>

SVN Info:
        $Id: email2trac.py.in 582 2011-12-20 10:38:10Z bas $

option --eggcache not recognized
fetchmail: MDA returned nonzero status 1
 (613 body octets) not flushed
(webtek)fetchmail@minerva:/var/tmp$

I am wondering about "option --eggcache not recognized" as I think I have the latest version.

comment:20 in reply to: ↑ 19 Changed 10 years ago by bas

option --eggcache not recognized fetchmail: MDA returned nonzero status 1

(613 body octets) not flushed

(webtek)fetchmail@minerva:/var/tmp$ }}}

I am wondering about "option --eggcache not recognized" as I think I have the latest version.

--eggcache is only supported by: run_email2trac. Can you set this in your email2trac.conf file:

python_egg_cache : /var/tmp

It is on:

Maybe we must also make a command line option, like run_email2trac

comment:21 Changed 10 years ago by thomas.schabetsberger@…

Sorry, but I am always using run_email2trac, never directly email2trac.

/etc/fetchmailrc:

poll mail.med-home.com protocol IMAP username "trac-ticket" password "xxxxxxxxx"
mda "/usr/local/bin/run_email2trac --eggcache=/var/tmp/.python-egg"

This delivers the above output.

comment:22 Changed 10 years ago by thomas.schabetsberger@…

/usr/local/etc/email2trac.conf

[DEFAULT]
project: /var/data/trac
debug: 0
umask: 022
spam_level: 5
reply_all : 0
mailto_link: 0
umask: 022
email_header: 0
trac_version: 0.12
enable_syslog : 1
alternate_notify_template :
alternate_notify_template_update :
drop_spam : 0
verbatim_format: 1
strip_signature: 0
email_quote: >
strip_quotes: 0
ignore_trac_user_settings: 0
black_list: MAILER-DAEMON@
drop_alternative_html_version: 1
ticket_update: 1
python_egg_cache : /var/tmp

comment:23 Changed 10 years ago by thomas.schabetsberger@…

Also, if I call "run_email2trac with the option from commandline, I receive the same error.

(webtek)fetchmail@minerva:/var/tmp$ run_email2trac --eggcache=/var/tmp/.python-egg

email2trac.py -- Email -> TRAC tickets

A MTA filter to create Trac tickets from inbound emails.

first proof of concept from:
 Copyright 2005, Daniel Lundin <daniel@edgewall.com>
 Copyright 2005, Edgewall Software

Authors:
  Bas van der Vlies <basv@sara.nl>
  Walter de Jong <walter@sara.nl>

How to use
----------
 * See https://subtrac.sara.nl/oss/email2trac/

 * Commandline opions:
                -h,--help
                -d, --debug 
                -f,--file  <configuration file>
                -n,--dry-run
                -p, --project <project name>
                -t, --ticket_prefix <name>

SVN Info:
        $Id: email2trac.py.in 582 2011-12-20 10:38:10Z bas $

option --eggcache not recognized

comment:24 Changed 10 years ago by bas

Which version of email2trac do you use?

11:42 itrac.irc.sara.nl:/root 
root# strings /usr/bin/run_email2trac  | grep eggcache
--eggcache

comment:25 Changed 10 years ago by thomas.schabetsberger@…

(webtek)root@minerva:/usr/local/bin# strings run_email2trac | grep eggcache
--eggcache

I think I am running version 2.4.7 - have just updated before I started posting. How can I find that out?

comment:26 Changed 10 years ago by bas

I shall make an option that will display the version. The documentation is wrong. I still use old command line parsing options for the C-program ( to be compatible with other flavors of Unix). Use:

--eggcache /var/tmp

Note: without the =

comment:27 follow-up: Changed 10 years ago by thomas.schabetsberger@…

That was the reason. Problem solved. Ticket creation and sending of notification is now working. Thanks a lot!!

comment:28 in reply to: ↑ 27 Changed 10 years ago by bas

Replying to thomas.schabetsberger@…:

That was the reason. Problem solved. Ticket creation and sending of notification is now working. Thanks a lot!!

Your Welcome :-D. After my vacation i will make a FAQ about the most common problems.

comment:29 Changed 9 years ago by bas

created FAQ

comment:30 Changed 9 years ago by bas

  • Resolution set to fixed
  • Status changed from reopened to closed

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.