Changes between Version 9 and Version 10 of Email2tracInstallation/Windows


Ignore:
Timestamp:
03/25/08 02:55:37 (13 years ago)
Author:
Matthew Carlson
Comment:

Added my parts from the Trac User discussion

Legend:

Unmodified
Added
Removed
Modified
  • Email2tracInstallation/Windows

    v9 v10  
    44= Email2trac on Windows =
    55
    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).
     6Using 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).
    710
    811 == Email component ==
    912
    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.
     13Options 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.
    1117
    1218 === Built-in Windows SMTP server ===
    1319
    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:
     20Install 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:
    1521
    1622 * Open Add/Remove Programs (Start->Control Panel->Add or Remove Programs)
     
    1824 * Check the box next to SMTP Service, click "OK", "OK", "Next", "Finish".
    1925
    20 If any additional configuration is needed, configuration can be done in the IIS Manager (Start->Control Panel->Admistrative Tools->Internet Information Services (IIS) Manager).
     26The 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).
    2127
    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
     28Default 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".
    2734
    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.
     35In 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.
    2936
    3037 === Fetchmail ===
     
    7683}}}
    7784
    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.
     85The 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.
    7986 
    8087 == Process Automation ==
    8188
    82 Automation of email processing is dependent upon your email setup.
     89Use 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.
    8390
    84  === Built-in Windows SMTP server ===
     91 === Batch for Built-in Windows SMTP server ===
    8592
    8693Create a batch file (e.g. C:/projects/email2trac/email2trac.bat) to process emails in the "drop" folder.
     
    9299}}}
    93100
    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.
     101Change 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.
    95102
    96  === Fetchmail ===
     103 === Batch for Fetchmail ===
    97104
    98105Create 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.
     
    102109}}}
    103110
    104 Use Windows Scheduled Tasks to run the batch file on an automated basis.
     111 === Scheduled Task ===
    105112
    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.
     113The Scheduled Task Wizard is pretty straightforward, but the repetition settings are pretty buried.  To create the Scheduled Task:
    107114
    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
     125Test 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
     129Note: 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
     131Authored by Nicole Swan (nicole DOT swan AT gmail.com) and Matthew Carlson (calrsom AT gmail.com).