# Example for a user configuration file ~/.mpoprc

# With modern mail services that publish autoconfiguration information,
# you can simply run 'mpop --configure yourmail@example.com' to get
# a basic working configuration.

# This file focusses on TLS, authentication, and the mail delivery method.
# Features not used here include mail filtering, timeouts, SOCKS proxies,
# TLS parameters, and more.


# Set default values: always use TLS, and chose a delivery method.
defaults
tls on
# Deliver mail to an MBOX mail file:
delivery mbox ~/Mail/inbox
# Deliver mail to a maildir folder:
#delivery maildir ~/Mail/incoming
# Deliver mail via procmail:
#delivery mda "/usr/bin/procmail -f '%F' -d $USER"
# Deliver mail via the local SMTP server:
#delivery mda "/usr/bin/msmtp --host=localhost --from='%F' -- $USER"
# Deliver mail to an Exchange pickup directory:
#delivery exchange c:\exchange\pickup

# Define a mail account at a freemail service
account freemail
# Host name of the POP3 server
host pop.freemail.example

# Authentication
user joe.smith
# Password method 1: Add the password to the system keyring, and let mpop get
# it automatically. To set the keyring password using libsecret:
# $ secret-tool store --label=mpop \
#   host pop.freemail.example \
#   service pop3 \
#   user joe.smith
# Password method 2: Store the password in an encrypted file, and tell mpop
# which command to use to decrypt it. This is usually used with GnuPG, as in
# this example. Usually gpg-agent will ask once for the decryption password.
passwordeval gpg2 --no-tty -q -d ~/.mpop-password.gpg
# You can also store the password directly in this file or have msmtp ask you
# for it each time you send a mail, but one of the above methods is preferred.

# A second mail address at the same freemail service: it uses the same settings
# and just changes the user name
account freemail2 : freemail
user joey

# Some other mail service
account company
host mail.company.example
user company12345
# this assumes the password is stored in the keyring

# The company runs SpamAssassin, so test each mail for the "X-Spam-Status: Yes"
# header, and skip all mails with this header instead of downloading them.
filter	if [ "`grep "^X-Spam-Status: Yes"`" ]; then exit 2; else exit 0; fi

# Set a default account
account default : freemail
