Changes between Version 9 and Version 10 of Email2tracInstallation/Windows
- Timestamp:
- 03/25/08 02:55:37 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Email2tracInstallation/Windows
v9 v10 4 4 = Email2trac on Windows = 5 5 6 Using email2trac on Windows requires three components -- A way to receive/gather email, the email2trac script, and a script or batch file that will schedule email2trac to process emails (i.e. automate the process). 6 Using email2trac on Windows requires three components: 7 1 A way to receive/gather email 8 2 The email2trac script 9 3 a script or batch file that will schedule email2trac to process emails (i.e. automate the process). 7 10 8 11 == Email component == 9 12 10 This will vary depending on whether the email server and Trac are on the same server. If they are not on the same server, a way to gather the email is necessary. Two common options are to install the built-in SMTP server or to use an email gathering tool such as Fetchmail. 13 Options for email component depend on whether Trac is installed on a server that already handles email. 14 * Trac server doesn't handle email: Two common options are to install the built-in SMTP server or to use an email client such as Fetchmail. 15 * Trac server handles email (SMTP already in use): Depending on email software, you may be able to configure the server to drop emails in a folder. Otherwise, use an email client such as Fetchmail. 16 * Trac server runs Microsoft Exchange: Exchange has no easy option to drop emails in a folder, you must use an email client such as Fetchmail. 11 17 12 18 === Built-in Windows SMTP server === 13 19 14 Install the SMTP server (NOT the POP server), so that emails are received and left as files in the "drop" folder. This is the way the email server hands off email between the two services. In a way, email2trac performs the distribution functions normally handled by POP. To install the SMTP service via Windows Components:20 Install the SMTP server, but not the POP server, so that emails are received and left as files in the "drop" folder. This is the way the email server hands off email between the two services. In a way, email2trac performs the distribution functions normally handled by POP. To install the SMTP service via Windows Components: 15 21 16 22 * Open Add/Remove Programs (Start->Control Panel->Add or Remove Programs) … … 18 24 * Check the box next to SMTP Service, click "OK", "OK", "Next", "Finish". 19 25 20 If any additional configuration is needed, configuration can be done inthe IIS Manager (Start->Control Panel->Admistrative Tools->Internet Information Services (IIS) Manager).26 The SMTP Service should be configured to receive emails out of the box. If you have problems, check that the service is running (Start->Control Panel->Admistrative Tools->Services), and set any software firewalls to allow incoming connections to port 25. Additional configuration can be done using the IIS Manager (Start->Control Panel->Admistrative Tools->Internet Information Services (IIS) Manager). 21 27 22 Sample configuration of "Default SMTP Virtual Server": 23 * Domain Name: trac-server.domain.com 24 * Type: Local (Default) 25 * Drop folder: C:\Inetpub\mailroot\Drop (.eml files) 26 * Email address: xxx@trac-server.domain.com 28 Default configuration of "Default SMTP Virtual Server": 29 * Domains 30 * Domain Name: trac-server.domain.com 31 * Type: Local (Default) 32 * Drop folder: C:\Inetpub\mailroot\Drop 33 * Many more options under "Default SMTP Virtual Server", right-click, "Properties". 27 34 28 In this configuration, anything sent to the email address with the trac-server subdomain should be automatically forwarded from the email server to the local SMTP server. If your Trac email address is formatted differently or is not forwarded automatically, you will need to configure your main email server to do so.35 In this configuration, anything sent to an email address with the trac-server subdomain (xxx@trac-server.domain.com) should be automatically forwarded from the email server to the local SMTP server. If you would like your Trac email address to be formatted differently, you will need to configure your main email server to forward mail sent to your designated Trac email address to the trac-server subdomain. You may need to configure your main email server if it does not properly forward emails to your Trac server. 29 36 30 37 === Fetchmail === … … 76 83 }}} 77 84 78 The tmpdir can be anything, but should already exist . The trac_version variable is important if you're running trac 0.11 so that you don't receive an error like "str object is not callable". See [https://subtrac.sara.nl/oss/email2trac/ticket/34] for more information about the background of this one.85 The tmpdir can be anything, but should already exist; be sure the user who will run email2trac has write permissions to this directory. The trac_version variable is important if you're running trac 0.11 so that you don't receive an error like "str object is not callable". See [https://subtrac.sara.nl/oss/email2trac/ticket/34] for more information about the background of this one. 79 86 80 87 == Process Automation == 81 88 82 Automation of email processing is dependent upon your email setup.89 Use Scheduled Tasks to automate email2trac. This works in two parts: a batch file (dependent on email setup) and a scheduled task to run said batch file at regular intervals. 83 90 84 === B uilt-in Windows SMTP server ===91 === Batch for Built-in Windows SMTP server === 85 92 86 93 Create a batch file (e.g. C:/projects/email2trac/email2trac.bat) to process emails in the "drop" folder. … … 92 99 }}} 93 100 94 Change the paths or email file extension as necessary to reflect your setup. Then use Windows Scheduled Tasks to run this batch file on an automated basis.101 Change the paths as necessary to reflect your setup. This version assumes email2trac.py is in the same directory as the batch file and python is in your PATH. 95 102 96 === Fetchmail ===103 === Batch for Fetchmail === 97 104 98 105 Create a batch file (e.g. C:/projects/email2trac/email2trac.bat) that calls fetchmail, specifying the path to the fetchmail configuration file and, optionally, a logfile to log the fetchmail process. … … 102 109 }}} 103 110 104 Use Windows Scheduled Tasks to run the batch file on an automated basis. 111 === Scheduled Task === 105 112 106 Note: This content came from [http://groups.google.com/group/trac-users/browse_thread/thread/6877a04f2d5ff2cb/ a discussion] on the Trac Users Group. A big thanks to Matthew Carlson for his detailed help. 113 The Scheduled Task Wizard is pretty straightforward, but the repetition settings are pretty buried. To create the Scheduled Task: 107 114 108 - Nicole Swan (nicole DOT swan AT gmail.com) 115 1 Start the Scheduled Task Wizard(Start > Control Panel > Scheduled Tasks > Add Scheduled Task). Click "Next >". 116 2 Use "Browse..." to select the batch file you just created as the program you wish to run. 117 3 Give the task a name, select "Daily". Click "Next >". 118 4 Set "Start time:" to 12:00 AM, "Perform this task:" to "Every Day", "Start date:" to current date. Click "Next >". 119 5 Enter a user. I had problems running the task as the unprivileged user that runs tracd, so I set myself as the user (definitely not as secure, but our Trac is on our local intranet). Click "Next >". 120 6 Check "Open advanced properties..." and click "Finish". The edit task dialog will pop up. 121 7 Click "Schedule" tab, then "Advanced...". 122 8 Check "Repeat task", set "Every:" to your desired interval. Set "Duration:" to 24 hours. 123 9 Click "OK", "OK" to close the dialogs. 124 125 Test your task by right-clicking it and selecting "Run". You should see a command-line window briefly appear running your batch file. Check your Trac to make sure you have new tickets. 126 127 ---- 128 129 Note: This content came from [http://groups.google.com/group/trac-users/browse_thread/thread/6877a04f2d5ff2cb/ a discussion] on the Trac Users Group. Also, see [http://functionalelegant.blogspot.com/2008/03/email2trac-on-windows.html Matthew's summary]. A big thanks to Matthew Carlson for his detailed help. 130 131 Authored by Nicole Swan (nicole DOT swan AT gmail.com) and Matthew Carlson (calrsom AT gmail.com).