1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
#!/usr/bin/python
import poplib
from getmail_constants import *
#
# Defaults
#
# These can mostly be overridden with commandline arguments or via getmailrc.
#
defs = {
'help' : 0, # Leave this alone.
'dump' : 0, # Leave this alone.
'log_level' : INFO,
'getmaildir' : '~/.getmail/', # getmail config directory path
# leading ~[user]/ will be expanded
'rcfilename' : 'getmailrc', # getmail control file name
'timeout' : 180, # Socket timeout value in seconds
'port' : poplib.POP3_PORT, # POP3 port number
'use_apop' : 0, # Use APOP instead of PASS for
# authentication
'readall' : 1, # Retrieve all mail, not just new
'delete' : 0, # Do not delete mail after retrieval
'delete_after' : 0, # Delete after X days
'no_delivered_to' : 0, # Don't add Delivered-To: header
'no_received' : 0, # Don't add Received: header
'max_message_size' : 0, # Maximum message size to retrieve
'max_messages_per_session' : 0, # Stop after X messages; 0 for no
# limit.
'message_log' : '', # Log info about getmail actions
# leading ~[user]/ will be expanded
# Will be prepended with value of
# getmaildir if message_log is not
# absolute after ~ expansion.
'envelope_recipient' : None, # Header containing the original
# envelope recipient address.
# Topmost Delivered-To: header is
# "delivered-to:1". Second-from-top
# Envelope-To: header would be
# "envelope-to:2".
'command_add_fromline' : 1, # Add mbox-style From_ line to
# start of messages delivered through
# commands
'extension_sep' : '-', # Extension address separator
'extension_depth' : 1, # Number of local-part pieces to
# consider part of the base
'use_*env' : 0, # Use Demon's SPDS *ENV command
# to retrieve envelope.
}
|