+@node Mail Sources
+@subsection Mail Sources
+
+Mail can be gotten from many different sources---the mail spool, from a
+POP mail server, or from a procmail directory, for instance.
+
+@menu
+* Mail Source Specifiers:: How to specify what a mail source is.
+* Mail Source Customization:: Some variables that influence things.
+* Fetching Mail:: Using the mail source specifiers.
+@end menu
+
+
+@node Mail Source Specifiers
+@subsubsection Mail Source Specifiers
+@cindex POP
+@cindex mail server
+@cindex procmail
+@cindex mail spool
+@cindex mail source
+
+You tell Gnus how to fetch mail by creating a @dfn{mail source
+specifier}.
+
+Here's an example:
+
+@lisp
+(pop :server "pop3.mailserver.com" :user "myname")
+@end lisp
+
+As can be observed, a mail source specifier is a list where the first
+element is a @dfn{mail source type}, followed by an arbitrary number of
+@dfn{keywords}. Keywords that are not explicitly specified are given
+default values.
+
+The following mail source types are available:
+
+@table @code
+@item file
+Get mail from a single file; typically from the mail spool.
+
+Keywords:
+
+@table @code
+@item :path
+The path of the file. Defaults to the value of the @code{MAIL}
+environment variable or @file{/usr/mail/spool/user-name}.
+@end table
+
+An example file mail source:
+
+@lisp
+(file :path "/usr/spool/mail/user-name")
+@end lisp
+
+Or using the default path:
+
+@lisp
+(file)
+@end lisp
+
+@item directory
+Get mail from several files in a directory. This is typically used when
+you have procmail split the incoming mail into several files.
+
+Keywords:
+
+@table @code
+@item :path
+The path of the directory where the files are. There is no default
+value.
+
+@item :suffix
+Only files ending with this suffix are used. The default is
+@samp{.spool}.
+
+@item :predicate
+Only files that have this predicate return non-@code{nil} are returned.
+The default is @code{identity}. This is used as an additional
+filter---only files that have the right suffix @emph{and} satisfy this
+predicate are considered.
+
+@end table
+
+An example directory mail source:
+
+@lisp
+(directory :path "/home/user-name/procmail-dir/"
+ :suffix ".prcml")
+@end lisp
+
+@item pop
+Get mail from a POP server.
+
+Keywords:
+
+@table @code
+@item :server
+The name of the POP server. The default is taken from the
+@code{MAILHOST} environment variable.
+
+@item :port
+The port number of the POP server. The default is @samp{pop3}.
+
+@item :user
+The user name to give to the POP server. The default is the login
+name.
+
+@item :password
+The password to give to the POP server. If not specified, the user is
+prompted.
+
+@item :program
+The program to use to fetch mail from the POP server. This is should be
+a @code{format}-like string. Here's an example:
+
+@example
+fetchmail %u@@%s -P %p %t
+@end example
+
+The valid format specifier characters are:
+
+@table @samp
+@item t
+The name of the file the mail is to be moved to. This must always be
+included in this string.
+
+@item s
+The name of the server.
+
+@item P
+The port number of the server.
+
+@item u
+The user name to use.
+
+@item p
+The password to use.
+@end table
+
+The values used for these specs are taken from the values you give the
+corresponding keywords.
+
+@item :prescript
+A script to be run before fetching the mail. The syntax is the same as
+the @code{:program} keyword. This can also be a function to be run.
+
+@item :postscript
+A script to be run after fetching the mail. The syntax is the same as
+the @code{:program} keyword. This can also be a function to be run.
+
+@item :function
+The function to use to fetch mail from the POP server. The function is
+called with one parameter---the name of the file where the mail should
+be moved to.
+
+@item :authentication
+This can be either the symbol @code{password} or the symbol @code{apop}
+and says what authentication scheme to use. The default is
+@code{password}.
+
+@end table
+
+If the @code{:program} and @code{:function} keywords aren't specified,
+@code{pop3-movemail} will be used.
+
+Here are some examples. Fetch from the default POP server, using the
+default user name, and default fetcher:
+
+@lisp
+(pop)
+@end lisp
+
+Fetch from a named server with a named user and password:
+
+@lisp
+(pop :server "my.pop.server"
+ :user "user-name" :password "secret")
+@end lisp
+
+Use @samp{movemail} to move the mail:
+
+@lisp
+(pop :program "movemail po:%u %t %p")
+@end lisp
+
+@item maildir
+Get mail from a maildir. This is a type of mailbox currently only
+supported by qmail, where each file in a special directory contains
+exactly one mail.
+
+Keywords:
+
+@table @code
+@item :path
+The path of the directory where the mails are stored. The default is
+@samp{~/Maildir/new}.
+
+If you sometimes look at your mail through a pop3 daemon before fetching
+them with Gnus, you may also have to fetch your mails from the
+@code{cur} directory inside the maildir, like in the following example.
+
+@end table
+
+An example maildir mail source:
+
+@lisp
+(maildir :path "/home/user-name/Maildir/cur")
+@end lisp
+
+@end table
+
+
+@node Mail Source Customization
+@subsubsection Mail Source Customization