table of contents
MPOP(1) | General Commands Manual | MPOP(1) |
NAME¶
mpop - A POP3 clientSYNOPSIS¶
- Mail retrieval mode (default):
- mpop [option...] [--] [account...]
- Server information mode:
- mpop [option...] --serverinfo [account...]
DESCRIPTION¶
In mail retrieval mode of operation, mpop retrieves mails from one or more POP3 mailboxes, optionally does some filtering, and delivers them through a mail delivery agent (MDA) or to maildir folders, mbox files, or Exchange pickup directories. Mails that were successfully delivered before will not be retrieved a second time, even if errors occur or mpop is terminated in the middle of a session.EXIT STATUS¶
The standard sendmail exit codes are used, as defined in sysexits.h.OPTIONS¶
Options override configuration file settings, for every used account.- General Options
- --version
- Print version information. This includes information about the library used for TLS/SSL support (if any), the library used for authentication, and the authentication mechanisms supported by this library.
- --help
- Print help.
- -P, --pretend
- Print the configuration settings that would be used, but do not take further action. An asterisk (`*') will be printed instead of your password.
- -d, --debug
- Print lots of debugging information, including the whole
conversation with the POP3 server. Be careful with this option: the
(potentially dangerous) output will not be sanitized, and your password
may get printed in an easily decodable format!
- Changing the mode of operation
- -S, --serverinfo
- Print information about the POP3 server(s) and exit. This includes information about supported features (pipelining, authentication methods, TOP command, ...), about parameters (time for which mails will not be deleted, minimum time between logins, ...), and about the TLS certificate (if TLS is active).
- Configuration options
- -C, --file=conffile
- Use the given file instead of ~/.mpoprc as configuration file.
- --host=hostname
- Use this POP3 server with settings from the command line; do not use any configuration file data. You cannot use both this option and account names on the command line.
- --port=number
- Set the port number to connect to. See the port command below.
- --timeout=(off|seconds)
- Set a network timeout. See the timeout command below.
- --pipelining=(auto|on|off)
- Enable or disable POP3 pipelining. See the pipelining command below.
- --received-header[=(on|off)]
- Enable or disable the Received header. See the received_header command below.
- --auth[=(on|method)]
- Set the authentication method to automatic (with "on") or manually choose an authentication method. See the auth command below.
- --user=[username]
- Set or unset the user name for authentication. See the user command below.
- --passwordeval=[eval]
- Set your password for authentication to the output (stdout) of the execution of eval.
- --tls[=(on|off)]
- Enable or disable TLS/SSL encryption. See the tls command below.
- --tls-starttls[=(on|off)]
- Enable or disable the POP3 STLS command for TLS encryption. See the tls_starttls command below.
- --tls-trust-file=[file]
- Set or unset a trust file for TLS encryption. See the tls_trust_file command below.
- --tls-crl-file=[file]
- Set or unset a certificate revocation list (CRL) file for TLS. See the tls_crl_file command below.
- --tls-fingerprint=[fingerprint]
- Set ot unset the fingerprint of a trusted TLS certificate. See the tls_fingerprint command below.
- --tls-key-file=[file]
- Set or unset a key file for TLS encryption. See the tls_key_file command below.
- --tls-cert-file=[file]
- Set or unset a cert file for TLS encryption. See the tls_cert_file command below.
- --tls-certcheck[=(on|off)]
- Enable or disable server certificate checks for TLS encryption. See the tls_certcheck command below.
- --tls-force-sslv3[=(on|off)]
- Force TLS/SSL version SSLv3. See the tls_force_sslv3 command below.
- --tls-min-dh-prime-bits=[bits]
- Set or unset minimum bit size of the Diffie-Hellmann (DH) prime. See the tls_min_dh_prime_bits command below.
- --tls-priorities=[priorities]
- Set or unset TLS priorities. See the tls_priorities command below.
- Options specific to mail retrieval mode
- -q, --quiet
- Do not print status or progress information.
- -Q, --half-quiet
- Print status but not progress information.
- -a, --all-accounts
- Query all accounts in the configuration file.
- -A, --auth-only
- Authenticate only; do not retrieve mail. Useful for SMTP-after-POP.
- -s, --status-only
- Print number and size of mails in each account only; do not retrieve mail.
- -n, --only-new[=(on|off)]
- Process only new messages. See the only_new command below.
- -k, --keep[=(on|off)]
- Do not delete mails from POP3 servers, regardless of other options or settings. See the keep command below.
- --killsize=(off|size)
- Set or unset kill size. See the killsize command below.
- --skipsize=(off|size)
- Set or unset skip size. See the skipsize command below.
- --filter=[program]
- Set a filter which will decide whether to retrieve, skip, or delete each mail by investigating the mail's headers. See the filter command below.
- --delivery=method,method_arguments...
- How to deliver messages received from this account. See the delivery command below. Note that a comma is used instead of a blank to separate the method from its arguments.
- --uidls-file=filename
- File to store UIDLs in. See the uidls_file command below.
USAGE¶
mpop normally uses a configuration file (~/.mpoprc by default) that contains information about your POP3 accounts. Skip to the EXAMPLES section for a quick start. The configuration file is a simple text file. Empty lines and comment lines (whose first non-blank character is `#') are ignored. The file must have no more permissions than user read/write.- defaults
- Set defaults. The following configuration commands will set default values for all following account definitions.
- account name [:account[,...]]
- Start a new account definition with the given name. The
current default values are filled in.
- host hostname
- The POP3 server to retrieve mails from. The argument may be a host name or a network address. Every account definition must contain this command.
- port number
- The port that the POP3 server listens on. The default is 110, unless TLS without STARTTLS is used, in which case it is 995.
- timeout (off|seconds)
- Set or unset a network timeout, in seconds. The default is 180 seconds. The argument off means that no timeout will be set, which means that the operating system default will be used.
- pipelining (auto|on|off)
- Enable or disable POP3 pipelining. The default is
auto, which means that mpop enables pipelining for POP3 servers
that advertize this capability, and disables it for all other servers. See
also --serverinfo.
- received_header [(on|off)]
- Enable or disable the Received header. By default, mpop prepends a Received header to the mail during delivery. This is required by the RFCs if the mail is subsequently further delivered e.g. via SMTP, and it is a good idea in all other cases. Nevertheless, if you absolutely have to, you can disable the Received header with this command.
- delivery method method_arguments...
- How to deliver messages received from this account.
- delivery mda command
- Deliver the mails through a mail delivery agent (MDA).
- delivery maildir directory
- Deliver the mails to the given maildir directory. The directory must exist and it must be a valid maildir directory; mpop will not create directories. This delivery type only works on file systems that support hard links.
- delivery mbox mbox-file
- Deliver the mails to the given file in mbox format. The file will be locked with fcntl(2). mpop uses the MBOXRD mbox format variant; see the documentation of the mbox format.
- delivery exchange directory
- Deliver the mails to the given Exchange pickup directory. The directory must exist.
- uidls_file filename
- The file to store UIDLs in. These are needed to identify
new messages. %U in the filename will be replaced by the username of the
current account. %H in the filename will be replaced by the hostname of
the current account. If the filename contains directories that do not
exist, mpop will create them. mpop locks this file for exclusive access
when accessing the associated POP3 account.
- auth [(on|method)]
- This command chooses the POP3 authentication method. With
the argument on, mpop will choose the best one available for you
(see below). This is the default.
- user login
- Set your user name for POP3 authentication.
- password secret
- Set your password for POP3 authentication. If no password is set but one is needed during authentication, mpop will try to find it. First, if passwordeval is set, it will evaluate that command. If passwordeval is not set, mpop will try to find the password in ~/.netrc. If that fails, it will try to find it in SYSCONFDIR/netrc (use --version to find out what SYSCONFDIR is on your platform). If that fails, it will try to get it from a system specific keychain (if available). If that fails but a controlling terminal is available, mpop will prompt you for it.
- passwordeval [eval]
- Set your password for authentication to the output (stdout) of the execution of eval.
- ntlmdomain [domain]
- Set a domain for the ntlm authentication method. The
default is to use no domain (equivalent to an empty argument), but some
servers seem to require one, even if it is an arbitrary string.
- tls [(on|off)]
- This command enables or disables TLS (also known as SSL)
encrypted connections to the POP3 server. Not every server supports this,
and many that support it require the additional command tls_starttls
off.
- tls_starttls [(on|off)]
- This command chooses the TLS/SSL variant: with STARTTLS (on, default) or POP3-over-TLS ( off). Most servers support the latter variant, which is also commonly referred to as "POP3 with SSL".
- tls_trust_file file
- This command activates strict server certificate
verification.
- tls_fingerprint [fingerprint]
- This command sets or unsets the fingerprint of a particular
TLS certificate. This certificate will then be trusted, regardless of its
contents. This can be used to trust broken certificates (e.g. with a
non-matching hostname) or in situations where tls_trust_file cannot
be used for some reason.
- tls_crl_file [file]
- This command sets or unsets a certificate revocation list (CRL) file for TLS, to be used during strict server certificate verification as enabled by the tls_trust_file command. This allows the verification procedure to detect revoked certificates.
- tls_key_file file
- This command (together with the tls_cert_file
command) enables mpop to send a client certificate to the POP3 server if
requested.
- tls_cert_file file
- This command (together with the tls_key_file
command) enables mpop to send a client certificate to the POP3 server if
requested.
- tls_certcheck [(on|off)]
- This command enables or disables checks for the server
certificate.
- tls_force_sslv3 [(on|off)]
- Force TLS/SSL version SSLv3. This might be needed to use SSL with some old and broken servers. Do not use this unless you have to.
- tls_min_dh_prime_bits [bits]
- Set or unset the minimum number of Diffie-Hellman (DH) prime bits that mpop will accept for TLS sessions. The default is set by the TLS library and can be selected by using an empty argument to this command. Only lower the default (for example to 512 bits) if there is no other way to make TLS work with the remote server.
- tls_priorities [priorities]
- Set the priorities for TLS sessions. The default is set by the TLS library and can be selected by using an empty argument to this command. Currently this command only works with sufficiently recent GnuTLS releases. See the GnuTLS documentation of the gnutls_priority_init function for a description of the priorities string.
- only_new [(on|off)]
- By default, mpop processes only new messages (new messages are those that were not already successfully retrieved in an earlier session). If this option is turned off, mpop will process all messages.
- keep [(on|off)]
- Keep all mails on the POP3 server, never delete them. The default behaviour is to delete mails that have been successfully retrieved or filtered by kill filters.
- killsize (off|size)
- Mails larger than the given size will be deleted (unless
the keep command is used, in which case they will just be skipped).
The size argument must be zero or greater. If it is followed by a `k' or
an `m', the size is measured in kibibytes/mebibytes instead of bytes. Note
that some POP3 servers report slightly incorrect sizes for mails; see
NOTES below.
- skipsize (off|size)
- Mails larger than the given size will be skipped (not downloaded). The size argument must be zero or greater. If it is followed by a `k' or an `m', the size is measured in kibibytes/mebibytes instead of bytes. Note that some POP3 servers report slightly incorrect sizes for mails; see NOTES below.
- filter [command]
- Set a filter which will decide whether to retrieve, skip,
or delete each mail by investigating the mail's headers. The POP3 server
must support the POP3 TOP command for this to work; see option
--serverinfo above. An empty argument disables filtering.
FILTERING¶
There are three filtering commands available. They will be executed in the following order:EXAMPLES¶
Configuration file # Default values for all accounts.exit 1 # kill this message
exit 0 # proceed normally
FILES / ENVIRONMENT¶
- ~/.mpoprc
- Default configuration file.
- ~/.mpop_uidls
- Default directory to store UIDLs files in.
- ~/.netrc and SYSCONFDIR/netrc
- The netrc file contains login information. If a password is not found in the configuration file, mpop will search it in ~/.netrc and SYSCONFDIR/netrc before prompting the user for it. The syntax of netrc files is described in netrc(5) or ftp(1).
- $USER, $LOGNAME
- These variables override the user's login name. $LOGNAME is only used if $USER is unset. The user's login name is used for Received headers.
- $TMPDIR
- Directory to create temporary files in. If this is unset, a system specific default directory is used.
NOTES¶
Some POP3 servers still do not support the UIDL command. In this case, mpop cannot recognize messages that were already successfully retrieved, and will treat all messages as new. Use the --serverinfo option to find out if a server supports the UIDL command.AUTHOR¶
mpop was written by Martin Lambers <marlam@marlam.de>SEE ALSO¶
procmail(1), spamassassin(1), fetchmail(1), getmail(1), netrc(5) or ftp(1), mbox(5), fcntl(2)2012-05 |