30 | | TODO |
| 32 | === Step 1: ''create user'' === |
| 33 | |
| 34 | Fetchmail does not need root or normal iser privileges to run so it is suggested to create an unprivileged user and group for daemon based fetchmail configurations. You can use the [attachment:Make_Fetchmail_User.command] to do so. |
| 35 | |
| 36 | === Step 2: ''create directories'' === |
| 37 | |
| 38 | Dovecot need two directories to work with - one to store the run status, one for the log files. You can use the [attachment:Make_Fetchmail_Directories.command] to create the directories. |
| 39 | |
| 40 | Depending on which fetchmail (macports or OSX) is used you might want to change the pathnames to better reflect you system set-up. |
| 41 | |
| 42 | === Step 3: ''set-up configuration'' === |
| 43 | |
| 44 | Next you need to set up [attachment:fetchmailrc]. You find the file in {{{/opt/local/etc}}} (macports) or {{{/private/etc}}}. The file should be owned by _fetchmail:_fetchmail and only be readable to _fetchmail an no one else. |
| 45 | |
| 46 | As a starting point you can use [attachment:fetchmailrc]. You will need to add all your mail source to [attachment:fetchmailrc]. |
| 47 | |
| 48 | === Step 4: ''starting the daemon'' === |
| 49 | |
| 50 | Fetchmail is started using {{{launchd}}} which is controlled by the attached [attachment:org.macports.fetchmail.plist]. |
| 51 | |
| 52 | Depending on which fetchmail (macports or OSX) is used you might want to change the pathnames to better reflect you system setup. |
| 53 | |
| 54 | The attached [attachment:Restart_Fetchmail.command] command will stop and restart fetchmail which forces a re-read of the configuration files and triggers an immediate mail collection - quite helpful while debugging the system. |
| 55 | |
| 56 | === Step 5: ''testing the deamon'' === |
| 57 | |
| 58 | '''Before using fetchmail you should collect all your mail by conventional means.''' |
| 59 | |
| 60 | After starting fetchmail you should check if the start was succesfull by checking the syslog: |
| 61 | |
| 62 | {{{ |
| 63 | $ syslog |
| 64 | |
| 65 | TODO: paste actual screen output. |
| 66 | }}} |
| 67 | |
| 68 | then you should check the two log files in {{{/opt/local/var/log/fetchmail}}} |
| 69 | |
| 70 | {{{ |
| 71 | $ pushd "/opt/local/var/log/fetchmail" |
| 72 | |
| 73 | $ cat "..." |
| 74 | |
| 75 | TODO: paste actual screen output. |
| 76 | }}} |
| 77 | |
| 78 | Last you send yourself a mail and trigger a mail collection with [attachment:Restart_Fetchmail.command] and then check if the mail arrived ok in your local mail storage. |