Changes between Version 14 and Version 15 of howto/SetupFetchmail
- Timestamp:
- Jun 14, 2014, 5:19:46 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
howto/SetupFetchmail
v14 v15 4 4 5 5 * Audience: Advanced E-Mail setup 6 * Requires: MacPorts >= 1.6, mail/fetchmail, shells/zsh 6 * Requires: MacPorts >= 1.6, mail/fetchmail 7 * Last tested with Mac OS X 10.9.3 7 8 8 9 == Introduction == … … 18 19 First set-up a mail storage and a [wikipedia:Mail_transfer_agent mail transfer agent] . See [wiki:howto/SetupDovecot Dovecot] and [wiki:howto/SetupPostfix Postfix] a possible set-up. Fetchmail will not work without and you can lose your mail if those components are not set-up properly. 19 20 20 === Z-Shell ===21 22 Install Z-Shell if you are planning to use the attached command files:23 24 {{{25 sudo port install zsh26 }}}27 28 21 === Fetchmail === 29 22 30 Then install fetchmail with23 Install fetchmail with 31 24 32 25 {{{ … … 34 27 }}} 35 28 36 Some older OSX version may come preinstalled with fetchmail (OSX 10.5). 29 Some older OSX version may come preinstalled with fetchmail (OSX 10.5). For this howto we will be using macports's version. 37 30 38 31 == Configuration == … … 48 41 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. 49 42 50 Depending on which fetchmail (macports or OSX) is used you might want to change the path names to better reflect you system set-up. 43 /opt/local/var/log/fetchmail 44 /opt/local/var/run/fetchmail 51 45 52 ''Note:'' 53 54 * The directory {{{/var/run}}} (also {{{/opt/local/var/run}}} ?) is wiped every boot. I suggest using {{{(/opt/local)/var/fetchmail}}} instead of {{{(/opt/local)/var/run/fetchmail}}}. 46 These also need to be owned by _fetchmail 47 {{{ 48 sudo chown _fetchmail:_fetchmail /opt/local/var/log/fetchmail 49 sudo chown _fetchmail:_fetchmail /opt/local/var/run/fetchmail 50 }}} 55 51 56 52 === Step 3: ''set-up configuration'' === 57 53 58 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.54 Next you need to set up [attachment:fetchmailrc] and save it to {{{/opt/local/etc}}}. The file should be owned by _fetchmail:_fetchmail and only be readable to _fetchmail an no one else. 59 55 {{{ 60 sudo chown _fetchmail:_fetchmail / private/etc/fetchmailrc56 sudo chown _fetchmail:_fetchmail /opt/local/etc/fetchmailrc 61 57 }}} 62 63 58 64 59 As a starting point you can use [attachment:fetchmailrc]. You will need to add all your mail source to [attachment:fetchmailrc]. … … 72 67 Fetchmail is started using {{{launchd}}} which is controlled by the attached [attachment:org.macports.fetchmail.plist]. 73 68 74 Depending on which fetchmail (macports or OSX) is used you might want to change the path names to better reflect you system setup.75 76 69 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. 77 70 78 71 ''Note:'' 79 72 80 * The logfile defined in [attachment:fetchmailrc] can only be used without {{{--nodetach}}} (see [http:// fetchmail.berlios.de/fetchmail-man.html#24 man fetchmail]). With the configuration currently presented here everything will be logged to the system log.73 * The logfile defined in [attachment:fetchmailrc] can only be used without {{{--nodetach}}} (see [http://www.fetchmail.info/fetchmail-man.html#24 man fetchmail]). With the configuration currently presented here everything will be logged to the system log. 81 74 82 75 === Step 5: ''testing the deamon'' ===