Changeset 2329


Ignore:
Timestamp:
02/03/09 13:17:39 (3 years ago)
Author:
CrawfordCurrie
Message:

Foswikitask:Item456: doc cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MailInContrib/data/System/MailInContrib.txt

    r2328 r2329  
    2020For example, your wayward child might send a mail like this from an internet cafe in Thailand: 
    2121<verbatim> 
    22 To: twiki@mum_and_dad.org.uk 
     22To: foswiki@mum_and_dad.org.uk 
    2323From: gapper@isp.co.uk 
    2424Subject: Travels.DailyDiary: cashless 
     
    2626*Phuket*: I've run out of money! 
    2727</verbatim> 
    28 The message lands in your email folder at your ISP. Once an hour, a cron job runs the =mailincron= script, which scans the folder. If it finds any messages that have nothing but a correctly formatted Web.Topic<nop>Name in the subject line, that topic is appended to (created) with the plain text of the email.  The Web must exist, though the topic will be created if necessary. Both web and topic _must_ be specified. 
     28The message lands in your email folder at your ISP. Once an hour, a cron job runs the =mailincron= script, which scans the folder. If it finds any messages that have nothing but a correctly formatted Web.Topic<nop>Name in the subject line, that topic is appended to (created) with the plain text of the email.  The Web must exist, though the topic can be created if necessary. 
    2929 
    3030In our example, the web exists, and so does the topic, so the following text gets appended to Travels.Daily<nop>Diary: 
     
    4242---+ Where the mail gets added 
    4343By default the target topic for mail is specified in the =Subject:= of the mail. You just put Web.Topic as the first thing on the subject line, optionally followed by a colon and other subject text. If there is no web name specified, then you can configure a default web to accept those mails. 
    44    * A mail with a subject of =Schedule.MyClass= will be saved to Schedule.<nop>MyClass 
    45    * =Subject: Schedule.MyClass: timetable= will be saved to Schedule.<nop>MyClass 
    46    * =Subject: MyClass= will be saved to &lt;default web>.<nop>MyClass.  
    47    * =Subject: MyClass: timetable= will be saved to &lt;default web>.<nop>MyClass, if the default web is set as =Schedule=.  
     44   * A mail with a =Subject:= of =Schedule.<nop>MyClass= will be saved to Schedule.<nop>MyClass 
     45   * =Subject: Schedule.<nop>MyClass: timetable= will be saved to Schedule.<nop>MyClass 
     46   * =Subject: <nop>MyClass= will be saved to &lt;default web>.<nop>MyClass.  
     47   * =Subject: <nop>MyClass: timetable= will be saved to &lt;default web>.<nop>MyClass, if the default web is set as =Schedule=.  
    4848   * If a topic specified on the =Subject:= line doesn't exist, it will be created. 
    4949 
    5050You can also configure the module to examine the =To:= and =CC:= fields in the mail, and get the name of an existing topic from there instead. 
    51    * If a non-existant topic is specified, then it is an error. 
    52    * The first valid, existing topic found in the =To:= or =CC:= fields is taken, and overrides the =Subject:=. 
     51   * If a non-existant topic is specified in =To:= or =CC:= then it is ignored. 
     52   * The valid, existing topic found in the =To:= or =CC:= fields is taken, and overrides the =Subject:=. 
    5353   * A mail addressed to =&lt;MyTopic@example.com>= will be saved in &lt;default web>.MyTopic 
    5454   * A mail addressed to =&lt;Schedule.MyTopic@example.com>= will be saved in Schedule.<nop>MyTopic 
     
    7171The user identity is used for access control checks on the target topic, so you can use Foswiki access controls to protect target topics. 
    7272 
    73 You can configure the module to look at the =From:= entry in the email, and if a registered user has set that email (see ChangeEmailAddress), then they are identified as the contributor. Note that there is a security risk here, as the =From:= address in e-mail can easily be spoofed. 
     73You can configure the module to look at the =From:= entry in the email, and if a registered user has set that email (see %SYSTEMWEB%.ChangeEmailAddress), then they are identified as the contributor. Note that there is a security risk here, as the =From:= address in e-mail can easily be spoofed. 
    7474 
    7575You can also optionally set a default user for an inbox, so if the user can't be identified from the mail, it will fall back to the default. 
     
    9191To run the script you need to set up a cron job. For example, to transfer mail into the wiki once every hour you might write: 
    9292<verbatim> 
    93 0 * * * * cd /home/twiki/bin && ../tools/mailincron 2>&1 >> /home/twiki/logs/mailincron.log 
     930 * * * * cd /home/foswiki/bin && ../tools/mailincron 2>&1 >> /home/foswiki/logs/mailincron.log 
    9494</verbatim> 
    9595You _must_ run the script from the bin directory. 
Note: See TracChangeset for help on using the changeset viewer.