Opened 15 years ago
Closed 15 years ago
#150 closed setup (fixed)
One email address per project
Reported by: | julio.martinez@… | Owned by: | bas |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | email2trac | Version: | 0.70 |
Keywords: | Cc: |
Description
Hello,
Thanks for this great project, it is very useful for us.
I have various Trac projects working well on the same box and I would like to use a different email address per project. up until now we have only need to use email2trac in one project, is it possible to use for another one?
As I said before /etc/email2trac.conf is setup and happily working for the "trac-systems" and I would like to add "trac-sdlc" (the last 5 lines) but no luck.
These are the config files
Thank you.
[DEFAULT] project: /home/trac/trac-environments/trac-systems/ debug: 0 umask: 011 spam_level: 0 reply_all : 1 mailto_link: 0 ticket_update : 1 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: 1 email_quote: > strip_quotes: 0 ignore_trac_user_settings: 0 black_list: MAILER-DAEMON@ binhex: warn applesingle: warn appledouble: warn [trac-systems] default_componenet : Desktop default_priority : 5 - Lowest default_type : Issue default_version : 0.70 [trac-sdlc] default_componenet : Unknown default_priority : major default_type : defect default_version : 0.70
$ cat /home/sdlcmail2trac/.fetchmailrc server mail.example.org proto IMAP user sdlc-trac pass passwd mda "/usr/bin/email2trac"
# cat trac-sdlc/conf/trac.ini ... [notification] smtp_always = true smtp_from = sdlc-trac@example.org smtp_replyto = sdlc-trac@example.org smtp_server = localhost ticket_subject_template = Auto Generated Ticket #$ticket.id: $summary ...
$ /usr/bin/fetchmail -v fetchmail: 6.3.6 querying mailserver.us.org (protocol IMAP) at Tue 22 Sep 2009 12:59:55 PM BST: poll started Trying to connect to 192.9.200.18/143...connected. fetchmail: IMAP< * OK (Linux/i686) IMAP4rev1 service is ready fetchmail: IMAP> A0001 CAPABILITY fetchmail: IMAP< * CAPABILITY IMAP4rev1 CHILDREN IDLE LITERAL+ MULTIAPPEND NAMESPACE UIDPLUS QUOTA STARTTLS AUTH=CRAM-MD5 AUTH=LOGIN AUTH=PLAIN AUTH=DIGEST-MD5 AUTH=GSSAPI ACL RIGHTS=texkbn fetchmail: IMAP< A0001 OK Done CAPABILITY fetchmail: IMAP> A0002 STARTTLS fetchmail: IMAP< A0002 OK Done STARTTLS fetchmail: Issuer Organization: fetchmail: Issuer CommonName: mail.example.org fetchmail: Server CommonName: mail.example.org fetchmail: mail.example.org key fingerprint: F7:3E:B1:27:57:05:E1:D5:93:7A:DB:51:CD:0F:73:57 fetchmail: Server certificate verification error: self signed certificate fetchmail: IMAP> A0003 CAPABILITY fetchmail: IMAP< * CAPABILITY IMAP4rev1 CHILDREN IDLE LITERAL+ MULTIAPPEND NAMESPACE UIDPLUS QUOTA AUTH=CRAM-MD5 AUTH=LOGIN AUTH=PLAIN AUTH=DIGEST-MD5 AUTH=GSSAPI ACL RIGHTS=texkbn fetchmail: IMAP< A0003 OK Done CAPABILITY fetchmail: mail.example.org: upgrade to TLS succeeded. fetchmail: IMAP> A0004 AUTHENTICATE GSSAPI fetchmail: IMAP< A0004 NO Failed AUTHENTICATE fetchmail: Sending credentials fetchmail: Error exchanging credentials fetchmail: IMAP< * BAD Error: Parsing string fetchmail: IMAP> A0005 * fetchmail: IMAP> A0006 AUTHENTICATE CRAM-MD5 fetchmail: IMAP< A0005 BAD Error: Unexpected item fetchmail: could not decode BASE64 challenge fetchmail: IMAP> A0007 * fetchmail: IMAP> A0008 LOGIN "sdlc-trac" * fetchmail: IMAP< + PDMzNjM4NTIzMDEuMTIxMDY4ODZAbWFpbC5tYWdsYWJzLm5ldD4= fetchmail: IMAP< A0006 BAD Error: Expected char CR not found fetchmail: IMAP< A0008 OK Done LOGIN fetchmail: IMAP> A0009 SELECT "INBOX" fetchmail: IMAP< * FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent) fetchmail: IMAP< * 1 EXISTS fetchmail: IMAP< * 0 RECENT fetchmail: IMAP< * OK [UNSEEN 1] First unseen message fetchmail: IMAP< * OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags fetchmail: IMAP< * OK [UIDNEXT 2] Predicted next UID fetchmail: IMAP< * OK [UIDVALIDITY 1530465953] UIDs valid fetchmail: IMAP< A0009 OK [READ-WRITE] Done SELECT fetchmail: IMAP> A0010 EXPUNGE fetchmail: IMAP< A0010 OK Done EXPUNGE fetchmail: IMAP> A0011 SEARCH UNSEEN NOT DELETED fetchmail: IMAP< * SEARCH 1 fetchmail: IMAP< A0011 OK Done SEARCH 1 message for sdlc-trac at mail.example.org. fetchmail: IMAP> A0012 FETCH 1 RFC822.SIZE fetchmail: IMAP< * 1 FETCH (RFC822.SIZE 557) fetchmail: IMAP< A0012 OK Done FETCH fetchmail: IMAP> A0013 FETCH 1 RFC822.HEADER fetchmail: IMAP< * 1 FETCH (RFC822.HEADER {551} reading message sdlc-trac@mail.example.org:1 of 1 (551 header octets) # fetchmail: IMAP< ) fetchmail: IMAP< A0013 OK Done FETCH fetchmail: IMAP> A0014 FETCH 1 BODY.PEEK[TEXT] fetchmail: IMAP< * 1 FETCH (BODY[TEXT] {6} (6 body octets)* fetchmail: IMAP< ) fetchmail: IMAP< A0014 OK Done FETCH fetchmail: MDA returned nonzero status 1 not flushed fetchmail: IMAP> A0015 LOGOUT fetchmail: IMAP< * BYE AXIGEN IMAP4rev1 service is logging out fetchmail: IMAP< A0015 OK Done LOGOUT fetchmail: 6.3.6 querying mail.example.org (protocol IMAP) at Tue 22 Sep 2009 12:59:56 PM BST: poll completed fetchmail: normal termination, status 0
Attachments (0)
Change History (4)
comment:1 Changed 15 years ago by bas
- Status changed from new to assigned
comment:2 Changed 15 years ago by Julio Martinez <julio.martinez@…>
Hello, I have done what has been recommended, but when I execute "email2trac --project trac-systems" or "email2trac --project trac-sdlc" it will hang and never stop, unless I cancel the command with Ctrl+C
==> /var/log/messages <== Sep 23 15:42:31 trac email2trac: Traceback (most recent call last): Sep 23 15:42:31 trac email2trac: File "/usr/bin/email2trac", line 1466, in ? tktparser.parse(sys.stdin) Sep 23 15:42:31 trac email2trac: File "/usr/bin/email2trac", line 827, in parse m = email.message_from_file(fp) Sep 23 15:42:31 trac email2trac: File "/usr/lib/python2.4/email/__init__.py", line 52, in message_from_file return Parser(*args, **kws).parse(fp) Sep 23 15:42:31 trac email2trac: File "/usr/lib/python2.4/email/Parser.py", line 65, in parse data = fp.read(8192) Sep 23 15:42:31 trac email2trac: KeyboardInterrupt
Still when using fetchmail, I will get the following error. Complaining because there is no line project in the [DEFAULT] section of /etc/email2trac.conf
- /usr/bin/fetchmail -v
fetchmail: 6.3.6 querying mail.example.org (protocol IMAP) at Wed 23 Sep 2009 04:05:19 PM BST: poll started Trying to connect to 192.9.200.18/143...connected. fetchmail: IMAP< * OK mail-7.1.1 (Linux/i686) IMAP4rev1 service is ready fetchmail: IMAP> A0001 CAPABILITY fetchmail: IMAP< * CAPABILITY IMAP4rev1 CHILDREN IDLE LITERAL+ MULTIAPPEND NAMESPACE UIDPLUS QUOTA STARTTLS AUTH=CRAM-MD5 AUTH=LOGIN AUTH=PLAIN AUTH=DIGEST-MD5 AUTH=GSSAPI ACL RIGHTS=texkbn fetchmail: IMAP< A0001 OK Done CAPABILITY fetchmail: IMAP> A0002 STARTTLS fetchmail: IMAP< A0002 OK Done STARTTLS fetchmail: Issuer Organization: fetchmail: Issuer CommonName: mail.example.org fetchmail: Server CommonName: mail.example.org fetchmail: mail.example.org key fingerprint: F7:3E:B1:27:57:05:E1:D5:93:7A:DB:51:CD:0F:73:57 fetchmail: Server certificate verification error: self signed certificate fetchmail: IMAP> A0003 CAPABILITY fetchmail: IMAP< * CAPABILITY IMAP4rev1 CHILDREN IDLE LITERAL+ MULTIAPPEND NAMESPACE UIDPLUS QUOTA AUTH=CRAM-MD5 AUTH=LOGIN AUTH=PLAIN AUTH=DIGEST-MD5 AUTH=GSSAPI ACL RIGHTS=texkbn fetchmail: IMAP< A0003 OK Done CAPABILITY fetchmail: mail.example.org: upgrade to TLS succeeded. fetchmail: IMAP> A0004 AUTHENTICATE GSSAPI fetchmail: IMAP< A0004 NO Failed AUTHENTICATE fetchmail: Sending credentials fetchmail: Error exchanging credentials fetchmail: IMAP< * BAD Error: Parsing string fetchmail: IMAP> A0005 * fetchmail: IMAP> A0006 AUTHENTICATE CRAM-MD5 fetchmail: IMAP< A0005 BAD Error: Unexpected item fetchmail: could not decode BASE64 challenge fetchmail: IMAP> A0007 * fetchmail: IMAP> A0008 LOGIN "sdlc-trac" * fetchmail: IMAP< + PDI3MjU5NzU3NTkuMTIyMDQ0MTBAbWFpbC5tYWdsYWJzLm5ldD4= fetchmail: IMAP< A0006 BAD Error: Expected char CR not found fetchmail: IMAP< A0008 OK Done LOGIN fetchmail: IMAP> A0009 SELECT "INBOX" fetchmail: IMAP< * FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent) fetchmail: IMAP< * 1 EXISTS fetchmail: IMAP< * 0 RECENT fetchmail: IMAP< * OK [UNSEEN 1] First unseen message fetchmail: IMAP< * OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags fetchmail: IMAP< * OK [UIDNEXT 2] Predicted next UID fetchmail: IMAP< * OK [UIDVALIDITY 882909] UIDs valid fetchmail: IMAP< A0009 OK [READ-WRITE] Done SELECT fetchmail: IMAP> A0010 EXPUNGE fetchmail: IMAP< A0010 OK Done EXPUNGE fetchmail: IMAP> A0011 SEARCH UNSEEN NOT DELETED fetchmail: IMAP< * SEARCH 1 fetchmail: IMAP< A0011 OK Done SEARCH 1 message for sdlc-trac at mail.example.org. fetchmail: IMAP> A0012 FETCH 1 RFC822.SIZE fetchmail: IMAP< * 1 FETCH (RFC822.SIZE 561) fetchmail: IMAP< A0012 OK Done FETCH fetchmail: IMAP> A0013 FETCH 1 RFC822.HEADER fetchmail: IMAP< * 1 FETCH (RFC822.HEADER {559} reading message sdlc-trac@mail.example.org:1 of 1 (559 header octets) fetchmail: IMAP< ) fetchmail: IMAP< A0013 OK Done FETCH fetchmail: IMAP> A0014 FETCH 1 BODY.PEEK[TEXT] fetchmail: IMAP< * 1 FETCH (BODY[TEXT] {2} (2 body octets)fetchmail: IMAP< ) fetchmail: IMAP< A0014 OK Done FETCH email2trac.py -- Email tickets to Trac. A simple MTA filter to create Trac tickets from inbound emails. Copyright 2005, Daniel Lundin <daniel@edgewall.com> Copyright 2005, Edgewall Software Changed By: Bas van der Vlies <basv@sara.nl> Date : 13 September 2005 Descr. : Added config file and command line options, spam level detection, reply address and mailto option. Unicode support Changed By: Walter de Jong <walter@sara.nl> Descr. : multipart-message code and trac attachments The scripts reads emails from stdin and inserts directly into a Trac database. MIME headers are mapped as follows: * From: => Reporter => CC (Optional via reply_all option) * Subject: => Summary * Body => Description * Component => Can be set to SPAM via spam_level option How to use ---------- * Create an config file: [DEFAULT] # REQUIRED project : /data/trac/test # REQUIRED debug : 1 # OPTIONAL, if set print some DEBUG info spam_level : 4 # OPTIONAL, if set check for SPAM mail reply_all : 1 # OPTIONAL, if set then fill in ticket CC field umask : 022 # OPTIONAL, if set then use this umask for creation of the attachments mailto_link : 1 # OPTIONAL, if set then [mailto:<>] in description mailto_cc : basv@sara.nl # OPTIONAL, use this address as CC in mailto line ticket_update: 1 # OPTIONAL, if set then check if this is an update for a ticket trac_version : 0.9 # OPTIONAL, default is 0.10 [jouvin] # OPTIONAL project declaration, if set both fields necessary project : /data/trac/jouvin # use -p|--project jouvin. * default config file is : /etc/email2trac.conf * Commandline opions: -h,--help -f,--file <configuration file> -n,--dry-run -p, --project <project name> -t, --ticket_prefix <name> SVN Info: $Id: email2trac.py.in 253 2009-01-28 08:25:08Z bas $ No Trac project is defined in the email2trac config file. fetchmail: MDA returned nonzero status 1 not flushed fetchmail: IMAP> A0015 LOGOUT fetchmail: IMAP< * BYE AXIGEN IMAP4rev1 service is logging out fetchmail: IMAP< A0015 OK Done LOGOUT fetchmail: 6.3.6 querying mail.example.org (protocol IMAP) at Wed 23 Sep 2009 04:05:20 PM BST: poll completed fetchmail: normal termination, status 0
comment:3 Changed 15 years ago by bas
do you execute it in the command line:
- email2trac --project trac-systems
Then it reads its outout from stdin. To test it you can use smaple message that is included in the source:
- email2trac --project trac-systems < msg.txt
No you have to adjust the fetchmail rc file to:
server mail.example.org proto IMAP user sdlc-trac pass passwd mda "/usr/bin/email2trac --project trac-systems"
I am not using fetchmail, but this should work
comment:4 Changed 15 years ago by bas
- Resolution set to fixed
- Status changed from assigned to closed
No reply
remove the following line for the [DEFAULT] section:
move this line to: [trac-systems]
I do not know how you configure this but i assume sdlc-trac is in :
so you have to define in the section [trac-sdlc]:
see also: