### Install getmail 6 via setup.py Source: https://getmail6.org/documentation.html Install getmail 6 from the source distribution using the setup script. ```bash # python setup.py install ``` -------------------------------- ### Display default installation directories Source: https://getmail6.org/documentation.html Lists the paths where getmail components will be installed by default. ```bash # python setup.py --show-default-install-dirs ``` -------------------------------- ### Install to an alternate prefix Source: https://getmail6.org/documentation.html Use the --prefix option to install the package into a custom directory, useful for non-root installations. ```bash # python setup.py install --prefix=path ``` -------------------------------- ### Define parameter tuples Source: https://getmail6.org/configuration.html Example syntax for defining parameter tuples in a configuration file. ```text parameter = ( ("first-a", "first-b"), ("second-a", "second-b"), ("third-a", "third-b"), ) ``` ```text parameter = ( ("lone-a", "lone-b"), ) ``` -------------------------------- ### Customize installation directories Source: https://getmail6.org/documentation.html Use specific flags to override default paths for scripts, libraries, or documentation. ```bash # python setup.py --install-scripts=/usr/local/bin/ ``` ```bash # python setup.py --install-scripts=/usr/local/bin/ --install-data=/usr/local/ ``` -------------------------------- ### Configure SSL Ciphers Source: https://getmail6.org/configuration.html Example configuration to downgrade security level for specific connection errors. ```ini ssl_ciphers = DEFAULT@SECLEVEL=1 ``` -------------------------------- ### Configure mh mail root Source: https://getmail6.org/faq.html Example configuration line for .mh_profile. ```text Path: Mail ``` -------------------------------- ### Install getmail to default location Source: https://getmail6.org/documentation.html Requires root privileges to install into the system's default Python site-packages and bin directories. ```bash # su enter root password # python setup.py install ``` -------------------------------- ### Configure getmail options Source: https://getmail6.org/configuration.html Example configuration for quiet operation, retrieving only new mail, deleting retrieved messages, and logging to a file. ```ini [options] verbose = 0 read_all = false delete = true message_log = ~/.getmail/log ``` -------------------------------- ### Configure MDA_qmaillocal destination Source: https://getmail6.org/configuration.html Basic and complex configuration examples for the MDA_qmaillocal destination class. ```ini [destination] type = MDA_qmaillocal user = joyce ``` ```ini [destination] type = MDA_qmaillocal user = joyce ``` -------------------------------- ### Configure MDA_external for mh/nmh Source: https://getmail6.org/faq.html Example destination configuration for using rcvstore with getmail. ```ini [destination] type = MDA_external path = /usr/local/libexec/nmh/rcvstore arguments = ("+inbox", ) ``` -------------------------------- ### Configure Mboxrd Destination Source: https://getmail6.org/configuration.html Example configuration for delivering messages to an mboxrd-format file in the user's home folder. ```ini [destination] type = Mboxrd path = ~/inbox ``` -------------------------------- ### Install getmail 6 via pip Source: https://getmail6.org/documentation.html Use pip to install the getmail6 package globally or for the current user. ```bash # sudo pip install getmail6 ``` ```bash # pip install --user getmail6 ``` -------------------------------- ### Configure Maildir Destination Source: https://getmail6.org/configuration.html Example configuration for delivering messages to a Maildir directory in the user's home folder. ```ini [destination] type = Maildir path = ~/Maildir/ ``` -------------------------------- ### Configure MultiGuesser for mail routing Source: https://getmail6.org/configuration.html Example configuration for routing personal mail to a default maildir and mailing list mail to specific directories. ```ini [destination] type = MultiGuesser default = ~/Maildir/ locals = ( ("list-address-1@list-domain-1", "~/Mail/mailing-lists/list-1/"), ("list-address-2@list-domain-2", "~/Mail/mailing-lists/list-2/"), ) ``` -------------------------------- ### Modify script path for custom installation Source: https://getmail6.org/documentation.html Insert this line into getmail scripts to explicitly add the installation directory to the Python module search path. ```python sys.path.append('/path/to/installation-directory') ``` ```python import sys ``` -------------------------------- ### Configure IMAP search and deletion flags Source: https://getmail6.org/configuration.html Examples for setting imap_search and imap_on_delete parameters to control message retrieval and server-side flag updates. ```text imap_search = UNSEEN ``` ```text imap_search = Unseen imap_on_delete = \Seen ``` ```text imap_search = ALL imap_on_delete = (\Deleted \Seen) ``` -------------------------------- ### Define retriever section header Source: https://getmail6.org/configuration.html The mandatory header for starting the retriever configuration block. ```text [retriever] ``` -------------------------------- ### Set PYTHONPATH for non-standard installation Source: https://getmail6.org/documentation.html Use this environment variable to point Python to the directory containing the getmailcore package. ```bash # export PYTHONPATH=$HOME/tmp/getmail/lib/python3.8/site-packages . ``` -------------------------------- ### Configure Filter_classifier for spam classification Source: https://getmail6.org/configuration.html Example configuration for using a custom classifier program to add information to message headers. ```ini [filter-3] type = Filter_classifier path = /path/to/my-classifier arguments = ('--message-from-stdin', '--report-to-stdout') user = nobody ``` -------------------------------- ### Troubleshoot MemoryError on OS X Source: https://getmail6.org/faq.html Example of the error output seen on OS X when the system's realloc() implementation fails. ```text python2.5(27172) malloc: *** vm_allocate(size=15699968) failed (error code=3) python2.5(27172) malloc: *** error: can't allocate region python2.5(27172) malloc: *** set a breakpoint in szone_error to debug [...] ``` -------------------------------- ### Configure Filter_external for attachment stripping Source: https://getmail6.org/configuration.html Example configuration for using an external MIME filter to remove specific attachment types from messages. ```ini [filter-3] type = Filter_external path = /path/to/my-mime-filter arguments = ('--message-from-stdin', '--remove-all-but-attachment-types=text/plain,text/rfc822') user = nobody ``` -------------------------------- ### Create getmail configuration directory Source: https://getmail6.org/configuration.html Sets up the default configuration directory with restricted permissions. ```bash mkdir -m 0700 $HOME/.getmail ``` -------------------------------- ### Build binary package from source Source: https://getmail6.org/documentation.html Execute this command within the unpacked source directory to generate a binary package. ```bash # cd getmail-version # python setup.py bdist --format=package-format ``` -------------------------------- ### Run getmail with custom directory and configuration files Source: https://getmail6.org/configuration.html Specify a custom directory for configuration and data files while providing multiple rc files. ```bash $ getmail --getmaildir /path/to/otherdir --rcfile getmailrc-account1 --rcfile getmailrc-account2 ``` -------------------------------- ### Run getmail with multiple configuration files Source: https://getmail6.org/configuration.html Execute getmail using specific configuration files located in the default directory. ```bash $ getmail --rcfile getmailrc-account1 --rcfile getmailrc-account2 ``` -------------------------------- ### Build getmail from source Source: https://getmail6.org/documentation.html Run these commands within the source directory to compile the package. ```bash # cd getmail-version # python setup.py build ``` -------------------------------- ### Configure SimplePOP3SSLRetriever Source: https://getmail6.org/configuration.html Configuration for POP3 access over SSL. ```ini [retriever] type = SimplePOP3SSLRetriever server = popmail.isp.example.net username = account_name password = my_mail_password ``` -------------------------------- ### Configure MultiDestination with path shortcuts Source: https://getmail6.org/configuration.html Uses path shortcuts for Maildir destinations by ensuring the path ends with a slash. ```ini destinations = ('~/Mail/inbox/', '~/Mail/archive/current/') ``` -------------------------------- ### Configure SimplePOP3Retriever Source: https://getmail6.org/configuration.html Standard configuration for a basic POP3 mail account. ```ini [retriever] type = SimplePOP3Retriever server = popmail.isp.example.net username = account_name password = my_mail_password ``` -------------------------------- ### Scan configuration directory Source: https://getmail6.org/faq.html Command to scan the default configuration directory. ```bash getmails ``` -------------------------------- ### Configure password_command Source: https://getmail6.org/configuration.html Specifies an external program to retrieve the account password, provided as a tuple of strings. ```text password_command = ("/path/to/password-retriever", "-p", "myaccount@example.org") ``` -------------------------------- ### Configure SimpleIMAPRetriever Source: https://getmail6.org/configuration.html Configuration for IMAP accounts requiring multiple folder retrieval and specific move-on-delete behavior. ```ini [retriever] type = SimpleIMAPRetriever server = imapmail.isp.example.net username = account_name password = my_mail_password mailboxes = ("INBOX", "lists.unix", "lists.getmail") move_on_delete = mail.deleted ``` -------------------------------- ### Configure MultidropPOP3Retriever Source: https://getmail6.org/configuration.html Configuration for domain POP3 mailboxes delivering to multiple local users. ```ini [retriever] type = MultidropPOP3Retriever server = imapmail.isp.example.net username = account_name password = company_maildrop_password envelope_recipient = delivered-to:1 ``` -------------------------------- ### Test hostname resolution speed Source: https://getmail6.org/troubleshooting.html Use this command to determine if initialization delays are caused by slow fully-qualified hostname lookups. ```python python -c "import socket; print socket.getfqdn()" ``` -------------------------------- ### Configure SimplePOP3Retriever with Custom Port Source: https://getmail6.org/configuration.html Use this configuration when the ISP requires a non-standard port for POP3 access. ```ini [retriever] type = SimplePOP3Retriever server = popmail.isp.example.net port = 8110 username = account_name password = my_mail_password ``` -------------------------------- ### Create an mboxrd file Source: https://getmail6.org/faq.html Shell command to create an empty file for mboxrd storage. ```bash $ touch /path/to/mboxrd ``` -------------------------------- ### Configure SSL Version for Gmail Source: https://getmail6.org/faq.html Workaround for OpenSSL 1.1.1+ connection errors by forcing TLSv1.2 in the retriever configuration. ```ini [retriever] ... ssl_version = tlsv1_2 ``` -------------------------------- ### Configure getmail for mbox delivery Source: https://getmail6.org/faq.html Use this configuration to retrieve mail from a single-user POP3 account and append it to an mbox file. ```ini [options] delete = True [retriever] type = SimplePOP3Retriever server = my-pop3-servername username = my-pop3-username password = my-pop3-password [destination] type = Mboxrd path = ~/inbox ``` -------------------------------- ### Enable ClamAV Daemon Support Source: https://getmail6.org/faq.html Required setting in clamav.conf to enable the daemonized version of ClamAV. ```text ScanMail ``` -------------------------------- ### Configure IMAP mailboxes Source: https://getmail6.org/configuration.html Defines a list of mailbox paths for IMAP retrieval using a Python tuple. ```text mailboxes = ("INBOX", "INBOX.spam", "mailing-lists.model-railroading") ``` -------------------------------- ### Configure getmail for Maildir delivery Source: https://getmail6.org/faq.html Use this configuration to retrieve mail from a single-user POP3 account and store it in a Maildir directory. ```ini [options] delete = True [retriever] type = SimplePOP3Retriever server = my-pop3-servername username = my-pop3-username password = my-pop3-password [destination] type = Maildir path = ~/Maildir/ ``` -------------------------------- ### Configure MultiDestination for an mboxrd file Source: https://getmail6.org/configuration.html Routes messages to a specific mboxrd file path. ```ini [destination] type = MultiDestination destinations = ("/var/spool/mail/alice", ) ``` -------------------------------- ### Create a maildir Source: https://getmail6.org/faq.html Shell command to create the necessary directory structure for a maildir. ```bash $ mkdir -p /path/to/Maildir/{cur,new,tmp} ``` -------------------------------- ### Configure F-Prot Filter Source: https://getmail6.org/faq.html Integration of F-Prot using a wrapper script as an external filter. ```ini [filter] type = Filter_external path = /usr/local/bin/f-prot-wrapper.sh ``` -------------------------------- ### Configure MDA_lmtp with override and fallback Source: https://getmail6.org/configuration.html Configuration for routing mail to an override recipient with a fallback address for permanent failures. ```ini [destination] type = MDA_lmtp host = mail.example.com override = alice fallback = bob ``` -------------------------------- ### Configure MDA_lmtp via Unix socket Source: https://getmail6.org/configuration.html Configuration for delivering messages to a local Dovecot LMTP socket. ```ini [destination] type = MDA_lmtp host = /run/dovecot/lmtp ``` -------------------------------- ### Configure MultiSorter locals with raw strings Source: https://getmail6.org/configuration.html Defines regular expression patterns for MultiSorter, using 'r' prefixes for patterns containing backslashes. ```ini locals = ( (r'jeff\?\?\?@.*', '[jeff]'), ('alice@', '[alice]') ) locals = ( ('jeff@.*', '[jeff]'), (r'alice\D+@', '[alice]') ) ``` -------------------------------- ### Basic MultiSorter Configuration Source: https://getmail6.org/configuration.html Routes mail to specific maildirs based on recipient address patterns. ```ini [destination] type = MultiSorter default = [bob-default] locals = ( ('jeff@example.net', '[jeff]'), ('alice@', '[alice]') ) [jeff] type = Maildir path = ~jeff/Maildir/ user = jeff [alice] type = Mboxrd path = ~alice/inbox user = alice [bob-default] type = Maildir path = ~bob/Maildir/ user = bob ``` -------------------------------- ### Add comments to getmailrc Source: https://getmail6.org/configuration.html Syntax for adding comments to a configuration file using the pound sign. ```ini first_parameter = value ``` -------------------------------- ### Common SSL Root Certificate Locations Source: https://getmail6.org/configuration.html Standard file system paths for OS-supplied SSL root certificates. ```text /etc/ssl/certs/ ``` ```text /etc/pki/tls/certs/ ``` ```text /usr/local/share/certs/ ``` ```text /etc/ssl/ ``` ```text /System/Library/OpenSSL/certs/ ``` -------------------------------- ### Configure all IMAP mailboxes Source: https://getmail6.org/configuration.html Uses the ALL keyword to retrieve messages from all selectable IMAP mailboxes. ```text mailboxes = ALL ``` -------------------------------- ### Define getmailrc parameter Source: https://getmail6.org/configuration.html Syntax for declaring a parameter within a configuration section. ```ini parameter_name = parameter_value ``` -------------------------------- ### Configure MultiDestination for a specific user maildir Source: https://getmail6.org/configuration.html Routes messages to a user-specific Maildir path. ```ini [destination] type = MultiDestination destinations = ("~jeff/Maildir/", ) ``` -------------------------------- ### Configure IMAP fetch size optimization Source: https://getmail6.org/configuration.html Enables skipping RFC822.SIZE to improve performance with certain proxies. ```text skip_imap_fetch_size ``` ```text max_message_size ``` ```text max_bytes_per_session ``` ```text delete_bigger_than ``` -------------------------------- ### Command line search and set parameter Source: https://getmail6.org/configuration.html The command line parameter used to override imap_search and imap_on_delete. ```text --searchset/-s ``` -------------------------------- ### Define multi-line parameter Source: https://getmail6.org/configuration.html Syntax for spanning a parameter value across multiple lines using leading whitespace. ```ini first_parameter = value first parameter value continues here second_parameter = value ``` -------------------------------- ### Configure Filter_TMDA for challenge-response Source: https://getmail6.org/configuration.html Minimal configuration for enabling TMDA filtering using default parameters. ```ini [filter-3] type = Filter_TMDA ``` -------------------------------- ### Define getmailrc section header Source: https://getmail6.org/configuration.html Syntax for declaring a section header in a configuration file. ```ini [section name] ``` -------------------------------- ### Configure MultiDestination with an external MDA Source: https://getmail6.org/configuration.html Routes messages to an external MDA defined in a separate section. ```ini [destination] type = MultiDestination destinations = ("[procmail-as-bob]", ) [procmail-as-bob] type = MDA_external path = /path/to/procmail arguments = ('~bob/.procmailrc', '-f', '%(sender)') user = bob ``` -------------------------------- ### Deliver mail to an mbox file using getmail_mbox Source: https://getmail6.org/configuration.html Delivers a message from stdin to a specified mboxrd-format file path. ```bash $ getmail_mbox $HOME/mail/inbox ``` -------------------------------- ### Configure complex MDA_external destination Source: https://getmail6.org/configuration.html Advanced configuration using user/group switching and message recipient substitution. ```ini [destination] type = MDA_external path = /path/to/mymda # Switch to fred's UID and the mail group GID before delivering his mail user = fred group = mail arguments = ("--strip-forbidden-attachments", "--recipient=%(recipient)") ``` -------------------------------- ### Configure procmail as MDA Source: https://getmail6.org/faq.html Methods to invoke procmail as an external MDA, ensuring correct Unix From line handling. ```ini [destination] type = MDA_external path = /path/to/procmail unixfrom = True ``` ```ini [destination] type = MDA_external path = /path/to/procmail arguments = ("-f", "%(sender)") ``` -------------------------------- ### Run getmail in daemon mode Source: https://getmail6.org/faq.html A simple shell script for process-supervision systems to run getmail periodically. ```bash #!/bin/sh /path/to/getmail [options] sleep 1800 ``` -------------------------------- ### ClamAV Filter Configuration Source: https://getmail6.org/faq.html Configure getmail to use clamscan for virus filtering. ```ini [filter] type = Filter_classifier path = /usr/local/bin/clamscan arguments = ("--stdout", "--no-summary", "--mbox", "--infected", "-") exitcodes_drop = (1,) ``` -------------------------------- ### Advanced MultiSorter with External MDA Source: https://getmail6.org/configuration.html Routes mail to multiple destinations including an external MDA for logging. ```ini [destination] type = MultiSorter default = doesn't matter, this won't be used, as locals will always match locals = ( ('^jeff@', '[jeff]'), ('^bob@', '[bob]'), ('^alice@', '[alice]'), ('.', '[copies]'), ('.', '[info]') ) [alice] type = Maildir path = ~alice/Maildir/ user = alice [bob] type = Maildir path = ~bob/Maildir/ user = bob [jeff] type = Maildir path = ~jeff/Maildir/ user = jeff [copies] type = Maildir path = ~samantha/Mail/archive/copies/ user = samantha [info] type = MDA_external path = /path/to/infologger arguments = ('--log=/var/log/mail/info', '--sender=%(sender)', '--recipient=%(recipient)) user = log ``` -------------------------------- ### Define a string parameter Source: https://getmail6.org/configuration.html Specify a string value without special syntax. ```text parameter = my value ``` -------------------------------- ### Configure local domain and translation Source: https://getmail6.org/configuration.html Sets the local domain and defines a translation rule for message recipients. ```text # The mail domain isn't the normal FQDN of the server running getmail localdomain = host.example.net # Trim the server's virtualdomain prepend value from message recipient before # sending it to qmail-local localpart_translate = ('mailhostaccount-', '') ``` -------------------------------- ### Conditional Execution via Flag File Source: https://getmail6.org/faq.html Use a flag file to conditionally run getmail from a cron job. ```bash [ -f ~/.getmail/do-not-run ] || /path/to/getmail ``` ```bash $ touch ~/.getmail/do-not-run ``` ```bash $ rm -f ~/.getmail/do-not-run ``` -------------------------------- ### Configure maildrop as MDA Source: https://getmail6.org/faq.html Various configurations for using maildrop as an external MDA, including support for custom rc files. ```ini [destination] type = MDA_external path = /path/to/maildrop arguments = ("-f", "%(sender)") ``` ```ini [destination] type = MDA_external path = /path/to/maildrop unixfrom = True ``` ```ini [destination] type = MDA_external path = /path/to/maildrop arguments = ("-f", "%(sender)", "~/.maildroprc") ``` -------------------------------- ### Deliver mail using getmail_maildir Source: https://getmail6.org/configuration.html Pipe a message to getmail_maildir to deliver it to a specified maildir path. ```bash $ getmail_maildir $HOME/Maildir/ ``` -------------------------------- ### Define an integer parameter Source: https://getmail6.org/configuration.html Specify an integer value without special syntax. ```text parameter = 4150 ``` -------------------------------- ### Configure complex MultiDestination routing Source: https://getmail6.org/configuration.html Combines multiple destination types including maildirs, mboxrd, and external MDAs. ```ini [destination] type = MultiDestination destinations = ( "~jeff/Mail/inbox", "[procmail-as-jeff]", "/var/mail-archive/incoming" ) [procmail-as-jeff] type = MDA_external path = /path/to/procmail arguments = ('~jeff/.procmailrc', '-f', '%(sender)') user = jeff ``` -------------------------------- ### Configure MDA_external destination Source: https://getmail6.org/configuration.html Basic configuration for invoking an external message delivery agent. ```ini [destination] type = MDA_external path = /path/to/mymda arguments = ("--log-errors", ) ``` -------------------------------- ### Configure cache_uid setting Source: https://getmail6.org/configuration.html Sets the cache_uid option to true to use the highest UID from the oldmail-file. ```text true ``` -------------------------------- ### Configure MultiDestination with named sections Source: https://getmail6.org/configuration.html Defines a MultiDestination that routes messages to two separate destination sections. ```ini destinations = ('[other-destination-1]', '[other-destination-2]') [other-destination-1] type = Mboxrd path = /var/spool/mail/alice user = alice [other-destination-2] type = Maildir path = /home/joe/Maildir/ user = joe ``` -------------------------------- ### Configure MDA_lmtp via remote host Source: https://getmail6.org/configuration.html Configuration for delivering messages to a remote LMTP server on a specific port. ```ini [destination] type = MDA_lmtp host = mail.example.com port = 3333 ``` -------------------------------- ### Automate multiple getmail rc files Source: https://getmail6.org/faq.html A shell script to iterate through rc files in a directory and execute getmail with them. ```bash #!/bin/sh set -e cd /path/to/my-rc-directory rcfiles="" for file in rc-* ; do rcfiles="$rcfiles --rcfile $file" done exec /path/to/getmail $rcfiles $@ ``` -------------------------------- ### SpamAssassin Header Ignore Configuration Source: https://getmail6.org/faq.html Prevent SpamAssassin from learning getmail-specific headers by adding this to the SpamAssassin configuration. ```text bayes_ignore_header X-getmail-filter-classifier ``` -------------------------------- ### Identify Server Root CA Source: https://getmail6.org/configuration.html Use this command to determine the root CA used to sign a server's certificate chain. ```bash openssl s_client -showcerts -connect HOST:PORT < /dev/null 2>/dev/null \ | grep '^[[:space:]]*i:' | tail -n 1 ``` -------------------------------- ### Configure ClamAV Filter for getmail Source: https://getmail6.org/faq.html Configuration for using ClamAV to filter emails, with options to either drop or keep infected messages. ```ini [filter] type = Filter_classifier path = /usr/local/bin/clamscan arguments = ("--stdout", "--no-summary", "--mbox", "--infected", "-") exitcodes_keep = (0,1) ``` ```ini [filter] type = Filter_classifier path = /usr/local/bin/clamdscan arguments = ("--stdout", "--disable-summary", "-") exitcodes_drop = (1, ) ``` ```ini [filter] type = Filter_classifier path = /usr/local/bin/clamdscan arguments = ("--stdout", "--disable-summary", "-") exitcodes_keep = (0,1) ``` -------------------------------- ### POP3 Retriever Parameters Source: https://getmail6.org/configuration.html Additional optional parameters specific to POP3 retrievers. ```APIDOC ## POP3 Retriever Parameters ### Optional Parameters - **use_xoauth2** (boolean) - Whether to use XOAUTH2 for login with the POP3 server. ``` -------------------------------- ### Define a tuple of quoted strings Source: https://getmail6.org/configuration.html A list of strings enclosed in parentheses, requiring specific handling for empty or single-item tuples. ```text parameter = ('first string', 'second string', "third string that contains a ' character") ``` ```text parameter = () ``` ```text parameter = ("single string", ) ``` -------------------------------- ### Specify ClamAV Decompression Utilities Source: https://getmail6.org/faq.html Additional arguments to define paths for decompression utilities used by ClamAV. ```ini arguments = ( …, "--unzip=/usr/local/bin/unzip", "--unrar=/usr/local/bin/unrar", "--unarj=/usr/local/bin/unarj", "--lha=/usr/local/bin/lha", "--jar=/usr/local/bin/unzip", "--tar=/usr/bin/tar", "--tgz=/usr/bin/tar" ``` -------------------------------- ### Define a tuple of integers Source: https://getmail6.org/configuration.html A list of integers enclosed in parentheses, similar to string tuples but without quotes. ```text parameter = (1, 2, 3, 4, 5) parameter = (37, ) parameter = () ``` -------------------------------- ### IMAP Retriever Parameters Source: https://getmail6.org/configuration.html Additional optional parameters specific to IMAP retrievers. ```APIDOC ## IMAP Retriever Parameters ### Optional Parameters - **mailboxes** (tuple of quoted strings) - A list of mailbox paths to retrieve mail from. ``` -------------------------------- ### Define Destination Section Header Source: https://getmail6.org/configuration.html The mandatory header for the destination section in the rc file. ```ini [destination] ``` -------------------------------- ### Unpack getmail tarball Source: https://getmail6.org/documentation.html Commands to extract the getmail source distribution on different Unix-like systems. ```bash # tar xzf getmail-version.tar.gz ``` ```bash # gunzip getmail-version.tar.gz # tar xf getmail-version.tar ``` -------------------------------- ### SpamAssassin Filter Configuration Source: https://getmail6.org/faq.html Configure getmail to filter messages through SpamAssassin using either client/server or standalone modes. ```ini [filter] type = Filter_external path = /usr/local/bin/spamc arguments = ("-s", "10000") ``` ```ini [filter] type = Filter_external path = /usr/local/bin/spamassassin arguments = ("--report", ) ``` -------------------------------- ### Common Retriever Parameters Source: https://getmail6.org/configuration.html Parameters required or optional for all retriever types in getmail. ```APIDOC ## Common Retriever Parameters ### Required Parameters - **server** (string) - The name or IP address of the server to retrieve mail from. - **username** (string) - Username to provide when logging in to the mail server. ### Optional Parameters - **port** (integer) - The TCP port number to connect to. - **password** (string) - Password to use when logging in to the mail server. - **password_command** (tuple of quoted strings) - Retrieve the account password by running an arbitrary external program. ``` -------------------------------- ### Define filter section header Source: https://getmail6.org/configuration.html The required header format for defining a filter section in the getmail configuration file. ```ini [filter-something] ``` -------------------------------- ### Uninstall getmail 6 via pip Source: https://getmail6.org/documentation.html Remove the getmail6 package using pip. ```bash # sudo pip uninstall getmail6 ``` ```bash # pip uninstall getmail6 ``` -------------------------------- ### Rename Filter Headers with reformail Source: https://getmail6.org/faq.html Use an external filter to rename the X-getmail-filter-classifier header for better auditability. ```ini type = Filter_external path = /usr/local/bin/reformail arguments = ("-R", "X-getmail-filter-classifier:", "X-mypersonalmailscan:") ``` -------------------------------- ### Specify retriever type Source: https://getmail6.org/configuration.html Assign the specific retriever class name to the type parameter. ```text type = typename ``` -------------------------------- ### Configure envelope_recipient for MultidropPOP3Retriever Source: https://getmail6.org/configuration.html Specifies the header field and position to identify the envelope recipient address. ```text envelope_recipient = delivered-to:1 ``` -------------------------------- ### Prevent Concurrent Instances with setlock Source: https://getmail6.org/faq.html Use setlock to ensure only one instance of getmail runs at a time. ```bash /path/to/setlock -n /path/to/lockfile /path/to/getmail [getmail options] ``` -------------------------------- ### Configure TMDA Filter Source: https://getmail6.org/faq.html Using the Filter_TMDA module as a message filter. ```ini [filter-X] type = Filter_TMDA ``` -------------------------------- ### Edit Crontab Source: https://getmail6.org/faq.html Command to open the crontab editor for modifying scheduled tasks. ```bash $ crontab -e ``` -------------------------------- ### Define a boolean parameter Source: https://getmail6.org/configuration.html Boolean values accept various case-insensitive representations for true and false. ```text parameter = True parameter = false parameter = NO parameter = 1 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.