I sent this originally to the trac mailing list, but the more I look at it the more I think this is a getmail or other issue, so I wondered if anyone here had any ideas?
I want to read an IMAP folder and inject into trac. (I'm using the packages in the Ubuntu 11.04 repos (trac 0.11).) I have things working so that I can manually inject into trac:
echo "Subject:xx\n\nxx" | email2trac -p myproject
.. but when I try injecting from getmail I'm getting errors:
msg 1/5 (72687 bytes) msgid 646810065/INBOX/6 from <myemail> 2011-05-20 17:22:33 Delivery error (command email2trac 3118 error (1, )) (etc)
I'm not exactly what you'd call proficient in either trac or getmail, which doesn't help.
My getmailrc file contains: [destination] type=MDA_external path=/usr/bin/email2trac arguments = ("--project myproject", "-f /etc/email2trac.conf")
.. and I'm just running it manually from the same directory as the config ("getmail -g.")
My email2trac config has varied a bit with my experiments but it currently reads as follows - an anyone spot the obvious flaw in my setup?
[DEFAULT] project: /path/to/trac/default debug: 1 umask: 022 spam_level: 5 reply_all : 0 mailto_link: 0 email_header: 0 trac_version: 0.11 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 log_file: /path/to/trac/email2trac.log log_level: INFO
[myproject] project: /path/to/trac/myproject spam_level: 1 enable_syslog: 1
On 24 May 11:16, Mark Rogers wrote:
<snippety class="zealous" description="getmail + trac not co-operating"/>
I'm not exactly what you'd call proficient in either trac or getmail, which doesn't help.
My getmailrc file contains: [destination] type=MDA_external path=/usr/bin/email2trac arguments = ("--project myproject", "-f /etc/email2trac.conf")
NOTE: EVERYTHING BELOW IS A GUESS!
I'd changes that to:
[destination] type=MDA_external path=/usr/bin/email2trac arguments=("--project", "myproject", "-f", "/etc/email2trac.conf")
If that works, then the issue is simple, it's that email2trac is getting an option of "--project myproject" as one argument rather than 2.
You could test it on the command line by throwing something through to /usr/bin/email2trac "--project myproject" "-f /etc/email2trac.conf")
I'm also assuming that the user your running getmail as is allowed to use email2trac.
Hope that helps,
On 24/05/11 11:28, Brett Parker wrote:
NOTE: EVERYTHING BELOW IS A GUESS!
I like your guesses!
I'd changes that to:
[destination] type=MDA_external path=/usr/bin/email2trac arguments=("--project", "myproject", "-f", "/etc/email2trac.conf")
If that works, then the issue is simple, it's that email2trac is getting an option of "--project myproject" as one argument rather than 2.
Spot on! Thanks