1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY fetchmail-download-http "&sourceforge-dl;/fetchmail/fetchmail-&fetchmail-version;.tar.xz">
|
---|
8 | <!ENTITY fetchmail-download-ftp " ">
|
---|
9 | <!ENTITY fetchmail-md5sum "61db4f95af4f1a5f95e7ea632928d48d">
|
---|
10 | <!ENTITY fetchmail-size "1.1 MB">
|
---|
11 | <!ENTITY fetchmail-buildsize "15 MB including tests">
|
---|
12 | <!ENTITY fetchmail-time "0.1 SBU including tests">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="fetchmail" xreflabel="fetchmail-&fetchmail-version;">
|
---|
16 | <?dbhtml filename="fetchmail.html"?>
|
---|
17 |
|
---|
18 |
|
---|
19 | <title>Fetchmail-&fetchmail-version;</title>
|
---|
20 |
|
---|
21 | <indexterm zone="fetchmail">
|
---|
22 | <primary sortas="a-Fetchmail">Fetchmail</primary>
|
---|
23 | </indexterm>
|
---|
24 |
|
---|
25 | <sect2 role="package">
|
---|
26 | <title>Introduction to Fetchmail</title>
|
---|
27 |
|
---|
28 | <para>
|
---|
29 | The <application>Fetchmail</application> package contains a mail
|
---|
30 | retrieval program. It retrieves mail from remote mail servers and
|
---|
31 | forwards it to the local (client) machine's delivery system, so it can
|
---|
32 | then be read by normal mail user agents.
|
---|
33 | </para>
|
---|
34 |
|
---|
35 | &lfs120_checked;
|
---|
36 |
|
---|
37 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
38 | <itemizedlist spacing='compact'>
|
---|
39 | <listitem>
|
---|
40 | <para>
|
---|
41 | Download (HTTP): <ulink url="&fetchmail-download-http;"/>
|
---|
42 | </para>
|
---|
43 | </listitem>
|
---|
44 | <listitem>
|
---|
45 | <para>
|
---|
46 | Download (FTP): <ulink url="&fetchmail-download-ftp;"/>
|
---|
47 | </para>
|
---|
48 | </listitem>
|
---|
49 | <listitem>
|
---|
50 | <para>
|
---|
51 | Download MD5 sum: &fetchmail-md5sum;
|
---|
52 | </para>
|
---|
53 | </listitem>
|
---|
54 | <listitem>
|
---|
55 | <para>
|
---|
56 | Download size: &fetchmail-size;
|
---|
57 | </para>
|
---|
58 | </listitem>
|
---|
59 | <listitem>
|
---|
60 | <para>
|
---|
61 | Estimated disk space required: &fetchmail-buildsize;
|
---|
62 | </para>
|
---|
63 | </listitem>
|
---|
64 | <listitem>
|
---|
65 | <para>
|
---|
66 | Estimated build time: &fetchmail-time;
|
---|
67 | </para>
|
---|
68 | </listitem>
|
---|
69 | </itemizedlist>
|
---|
70 |
|
---|
71 | <bridgehead renderas="sect3">Fetchmail Dependencies</bridgehead>
|
---|
72 |
|
---|
73 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
74 | <para role="recommended">
|
---|
75 | a local MDA (<xref linkend="procmail"/>)
|
---|
76 | </para>
|
---|
77 |
|
---|
78 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
79 | <para role="optional">
|
---|
80 | <!-- hesiod was at ftp://athena-dist.mit.edu/pub/ATHENA/hesiod/ but that
|
---|
81 | is dead. Debian had 3.2.1, git hub has a very old 3.1.
|
---|
82 | libintl is part of gettext so enabled by default on LFS -->
|
---|
83 | <xref linkend="mitkrb"/> and
|
---|
84 | <ulink url="http://www.citi.umich.edu/projects/nfsv4/linux/">libgssapi</ulink>
|
---|
85 | </para>
|
---|
86 |
|
---|
87 | <bridgehead renderas="sect4">Optional (for running fetchmailconf)</bridgehead>
|
---|
88 | <para role="optional">
|
---|
89 | <xref linkend="python3"/>, built after
|
---|
90 | <xref linkend="tk"/>, with the
|
---|
91 | <ulink url="https://python-future.org/">py-future</ulink> package
|
---|
92 | </para>
|
---|
93 |
|
---|
94 | </sect2>
|
---|
95 |
|
---|
96 | <sect2 role="installation">
|
---|
97 | <title>Installation of Fetchmail</title>
|
---|
98 |
|
---|
99 | <para>
|
---|
100 | Create a dedicated user for the fetchmail program.
|
---|
101 | Issue the following commands as the
|
---|
102 | <systemitem class="username">root</systemitem> user:
|
---|
103 | </para>
|
---|
104 |
|
---|
105 | <screen role="root"><userinput>useradd -c "Fetchmail User" -d /dev/null -g nogroup \
|
---|
106 | -s /bin/false -u 38 fetchmail</userinput></screen>
|
---|
107 |
|
---|
108 | <para>
|
---|
109 | Install <application>Fetchmail</application> by running the following
|
---|
110 | commands:
|
---|
111 | </para>
|
---|
112 |
|
---|
113 | <screen><userinput>PYTHON=python3 \
|
---|
114 | ./configure --prefix=/usr \
|
---|
115 | --enable-fallback=procmail &&
|
---|
116 | make</userinput></screen>
|
---|
117 |
|
---|
118 | <para>
|
---|
119 | To test the results, issue: <command>make check</command>.
|
---|
120 | </para>
|
---|
121 |
|
---|
122 |
|
---|
123 | <para>
|
---|
124 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
125 | </para>
|
---|
126 |
|
---|
127 | <screen role='root'><userinput>make install &&
|
---|
128 | chown -v fetchmail:nogroup /usr/bin/fetchmail</userinput></screen>
|
---|
129 |
|
---|
130 | </sect2>
|
---|
131 |
|
---|
132 | <sect2 role="commands">
|
---|
133 | <title>Command Explanations</title>
|
---|
134 |
|
---|
135 | <para>
|
---|
136 | <parameter>PYTHON=python3</parameter>: a version of Python is
|
---|
137 | <emphasis>required</emphasis>, but only used to install a module to allow
|
---|
138 | fetchmailconf to be run. That module is unmaintained and should not be
|
---|
139 | used.
|
---|
140 | </para>
|
---|
141 |
|
---|
142 | <para>
|
---|
143 | <parameter>--enable-fallback=procmail</parameter>: This tells
|
---|
144 | <application>Fetchmail</application> to hand incoming mail to
|
---|
145 | <application>Procmail</application> for delivery, if the port 25 mail
|
---|
146 | server is not present or not responding.
|
---|
147 | </para>
|
---|
148 |
|
---|
149 | </sect2>
|
---|
150 |
|
---|
151 | <sect2 role="configuration">
|
---|
152 | <title>Configuring Fetchmail</title>
|
---|
153 |
|
---|
154 | <sect3 id="fetchmail-config">
|
---|
155 | <title>Config Files</title>
|
---|
156 |
|
---|
157 | <para>
|
---|
158 | <filename>~/.fetchmailrc</filename>
|
---|
159 | </para>
|
---|
160 |
|
---|
161 | <indexterm zone="fetchmail fetchmail-config">
|
---|
162 | <primary sortas="e-AA.fetchmailrc">~/.fetchmailrc</primary>
|
---|
163 | </indexterm>
|
---|
164 |
|
---|
165 | </sect3>
|
---|
166 |
|
---|
167 | <sect3>
|
---|
168 | <title>Configuration Information</title>
|
---|
169 |
|
---|
170 | <note>
|
---|
171 | <para>
|
---|
172 | If you are connecting to a mailserver that supports SSL/TLS-wrapped
|
---|
173 | or "implicit" mode on a dedicated port (default 993) you should use
|
---|
174 | <command>fetchmail --ssl</command> or add the option 'ssl' in an
|
---|
175 | rcfile.
|
---|
176 | </para>
|
---|
177 | </note>
|
---|
178 |
|
---|
179 | <screen><userinput>cat > ~/.fetchmailrc << "EOF"
|
---|
180 | <literal>
|
---|
181 | # The logfile needs to exist when fetchmail is invoked, otherwise it will
|
---|
182 | # dump the details to the screen. As with all logs, you will need to rotate
|
---|
183 | # or clear it from time to time.
|
---|
184 | set logfile fetchmail.log
|
---|
185 | set no bouncemail
|
---|
186 | # You probably want to set your local username as the postmaster
|
---|
187 | set postmaster <replaceable><username></replaceable>
|
---|
188 |
|
---|
189 | poll SERVERNAME :
|
---|
190 | user <replaceable><isp_username></replaceable> pass <replaceable><password></replaceable>;
|
---|
191 | mda "/usr/bin/procmail -f %F -d %T";</literal>
|
---|
192 | EOF
|
---|
193 |
|
---|
194 | touch ~/fetchmail.log &&
|
---|
195 | chmod -v 0600 ~/.fetchmailrc</userinput></screen>
|
---|
196 |
|
---|
197 | <para>
|
---|
198 | This is an example configuration that should suffice for most people.
|
---|
199 | You can add as many users and servers as you need using the same syntax.
|
---|
200 | </para>
|
---|
201 |
|
---|
202 | <para>
|
---|
203 | <command>man fetchmail</command>: Look for the section near the bottom
|
---|
204 | named <emphasis>CONFIGURATION EXAMPLES</emphasis>. It gives some quick
|
---|
205 | examples. There are countless other configuration options once you get
|
---|
206 | used to it.
|
---|
207 | </para>
|
---|
208 |
|
---|
209 | <para>
|
---|
210 | If you expect to receive very little mail you can invoke fetchmail
|
---|
211 | when you wish to receive any incoming mail. More commonly, it is either
|
---|
212 | invoked in daemon mode with the <literal>-d</literal> option either on
|
---|
213 | the command line, or in <filename>.fetchmailrc</filename> (see 'DAEMON
|
---|
214 | MODE' in man fetchmailconf), or alternatively it is invoked from a
|
---|
215 | cron job.
|
---|
216 | </para>
|
---|
217 |
|
---|
218 | </sect3>
|
---|
219 |
|
---|
220 | </sect2>
|
---|
221 |
|
---|
222 | <sect2 role="content">
|
---|
223 | <title>Contents</title>
|
---|
224 |
|
---|
225 | <segmentedlist>
|
---|
226 | <segtitle>Installed Programs</segtitle>
|
---|
227 | <segtitle>Installed Libraries</segtitle>
|
---|
228 | <segtitle>Installed Directories</segtitle>
|
---|
229 |
|
---|
230 | <seglistitem>
|
---|
231 | <seg>fetchmail and fetchmailconf</seg>
|
---|
232 | <seg>None</seg>
|
---|
233 | <seg>None</seg>
|
---|
234 | </seglistitem>
|
---|
235 | </segmentedlist>
|
---|
236 |
|
---|
237 | <variablelist>
|
---|
238 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
239 | <?dbfo list-presentation="list"?>
|
---|
240 | <?dbhtml list-presentation="table"?>
|
---|
241 |
|
---|
242 | <varlistentry id="fetchmail-prog">
|
---|
243 | <term><command>fetchmail</command></term>
|
---|
244 | <listitem>
|
---|
245 | <para>
|
---|
246 | when executed as a user, this will source
|
---|
247 | <filename>~/.fetchmailrc</filename> and download the appropriate
|
---|
248 | mail
|
---|
249 | </para>
|
---|
250 | <indexterm zone="fetchmail fetchmail-prog">
|
---|
251 | <primary sortas="b-fetchmail">fetchmail</primary>
|
---|
252 | </indexterm>
|
---|
253 | </listitem>
|
---|
254 | </varlistentry>
|
---|
255 |
|
---|
256 | <varlistentry id="fetchmailconf">
|
---|
257 | <term><command>fetchmailconf</command></term>
|
---|
258 | <listitem>
|
---|
259 | <para>
|
---|
260 | is intended to assist you in setting up and editing a
|
---|
261 | <filename>~/.fetchmailrc</filename> configuration file, by using
|
---|
262 | a <application>Tk</application> GUI interface. It is written for
|
---|
263 | <application>Python</application> and the Tkinter module but is
|
---|
264 | labelled with a WARNING that it needs to be updated
|
---|
265 | for fetchmail 6.4's SSL options and other recent new options
|
---|
266 | </para>
|
---|
267 | <!-- keep this description commented but fetchmailconf
|
---|
268 | has been updated in the last months (June 2020). It can use
|
---|
269 | Python 3, with the help of the "past" module.
|
---|
270 | <para>
|
---|
271 | is an unmaintained GUI command to assist in creating a
|
---|
272 | <filename>~/.fetchmailrc</filename> configuration file and
|
---|
273 | should not be used.
|
---|
274 | </para>-->
|
---|
275 | <indexterm zone="fetchmail fetchmailconf">
|
---|
276 | <primary sortas="b-fetchmailconf">fetchmailconf</primary>
|
---|
277 | </indexterm>
|
---|
278 | </listitem>
|
---|
279 | </varlistentry>
|
---|
280 |
|
---|
281 | </variablelist>
|
---|
282 |
|
---|
283 | </sect2>
|
---|
284 |
|
---|
285 | </sect1>
|
---|