Draco - Fetchmail config files


/home/mta/.fetchmailrc

Fetchmail is used to get mail from my ISP using the POP protocol. Fetchmail then passes the messages on to the sendmail listener (SMTP port) on the local machine, for proper delivery.

The major dificulty involves mail from mailing lists (and SPAM) that is mailed to a list address, and does not include the real destination address anywhere in the message header. For example, mail from the 'svlug' mailing list is addressed to 'svlug@svlug.org', and the real addressee is in a 'Bcc:' entry, which is lost when the ISP puts the mail into the POP mailbox. So, fetchmail, not knowing what else to do with the message, sends it to the user that is running fetchmail, in this case, user 'mta'.

User 'mta' has an entry in its .procmailrc file, directing mail to 'svlug' to the svlug alias, and the normail alias table has an entry for 'svlug', directing any mail to the real users that have notified the system admin that they have subscribed to 'svlug'. (This could inhibit employees from subscribing to the 'babes-in-boyland' mailing list).

---

# fetchmail control file sample
#
# This file (or one of your own creation, rather) should be located 
# in your home directory with the name .fetchmailrc.  Permissions on this
# file may be no greater than -rw------- (0600), or fetchmail will refuse to
# use it.
#
# To see what effect your ~/.fetchmailrc file has, do 
#
#	fetchmail --version
#
# This will display the fetchmail version number and an explanation
# in English of what the currently set options and defaults mean.
#
# Comments begin with a '#' and extend through the end of the line.
# Blank lines between server entries are ignored.
# Keywords and identifiers are case sensitive.
# When there is a conflict between the command-line arguments and the
# arguments in this file, the command-line arguments take precedence.
#
# Legal keywords are
#   poll                      -- must be followed by a mailserver name or label
#   skip                      -- must be followed by a mailserver name or label
#   via                       -- must be followed by true name of host to poll
#   interval                  -- must be followed by an interval skip count
#   protocol (or proto)       -- must be followed by a protocol ID
#   uidl
#   no uidl
#   port                      -- must be followed by a TCP/IP port number
#   authenticate (or auth)    -- must be followed by an authentication type
#   timeout                   -- must be followed by a numeric timeout value
#   envelope                  -- must be followed by an envelope header name
#   no envelope
#   aka                       -- must be followed by one or more server aliases
#   localdomains              -- must be followed by one or more domain names
#   interface                 -- must be followed by device/IP address/mask
#   monitor                   -- must be followed by IP address
#   no dns
#   dns
#
#   username (or user)        -- must be followed by a name
#   is                        -- must be followed by one or more names
#   folder                    -- must be followed by remote folder names
#   password (or pass)        -- must be followed by a password string
#   smtphost (or smtp)        -- must be followed by host names
#   mda                       -- must be followed by an MDA command string
#   preconnect (or pre)       -- must be followed by an executable command
#   postconnect (or post)     -- must be followed by an executable command
#
#   keep
#   flush
#   fetchall
#   rewrite
#   forcecr
#   stripcr
#   pass8bits
#   dropstatus
#   no keep
#   no flush
#   no fetchall
#   no rewrite
#   no forcecr
#   no stripcr
#   no pass8bits
#   no dropstatus
#   limit                     -- must be followed by numeric size limit
#   fetchlimit                -- must be followed by numeric msg fetch limit
#   batchlimit                -- must be followed by numeric SMTP batch limit
#
# Legal protocol identifiers are
#   pop2 (or POP2)
#   pop3 (or POP3)
#   imap (or IMAP)
#   imap-k4 (or IMAP-K4)
#   apop (or APOP)
#   rpop (or RPOP)
#   kpop (or KPOP)
#   etrn (or ETRN)
#
# Legal authentication types are
#   login
#   kerberos
#
# Legal global option statements are
#
#   set logfile =		-- must be followed by a string
#   set daemon			-- must be followed by a number   
#   set syslog
#
# The noise keywords `and', `with', `has', `wants', and `options' are ignored
# anywhere in an entry; they can be used to make it resemble English.  The
# punctuation characters `,' `:' `;' are also ignored. 
#
# The run control file format is fully described (with more examples) on the
# fetchmail manual page.
# 
# This is what the developer's .fetchmailrc looks like:

#set daemon 300	# Poll at 5-minute intervals

defaults
	interface "ppp0/205.149.171.200"
	set logfile = "/usr/tmp/fetchmail.log"

# Use this for production
poll shell5.ba.best.com protocol POP3 localdomains spade.com:
	no envelope
	user spade with pass cool-PWD to spade ada * here
	fetchall
	postconnect /usr/local/sbin/junkmail



Index, Back On to Procmail
Copyright ©, 1997, Ben Spade. Permission is given to copy or link to this document, as long as this notice remains intact.