* Add an "ident" per-user option for debugging that produces an
"X-Fetchmail-ID" header in fetched messages for debugging.
-* -U/--userdefault option to specify postmaster overriding USER.
* Can the initial gethostname() be eliminated?
Release Notes:
------------------------------------------------------------------------------
fetchmail-4.5.3 ():
-* Minor fixes to the GSSAPI code. Seems to work with stock UW IMAP now!
+* Minor fixes to the GSSAPI code. Seems to work with stock UW IMAP now!
+* Fetchmail running as root now sends misaddressed multidrop mail to
+ `postmaster', not root. Added `postmaster' option to allow override.
There are 267 people on fetchmail-friends and 249 on fetchmail-announce.
fetchmail-4.5.1 (Wed Jul 1 19:27:56 EDT 1998):
* Checkalias option from Enrico Musio <enrico.musio@spaziozerouno.it>.
-* Discard Unix From_ lines in headers (copes with Debian bug report #23808.
+* Discard Unix From_ lines in headers (copes with Debian bug report #23808).
* Tell fetchmailconf not to care if the attempt to create an icon window fails.
* All fetchmailconf windows now iconify with an image.
* obituary@freshmeat's enhancements to hook fetchmail into the Red Hat
<table width="100%" cellpadding=0><tr>
<td width="30%">Back to <a href="index.html">Fetchmail Home Page</a>
<td width="30%" align=center>To <a href="/~esr/sitemap.html">Site Map</a>
-<td width="30%" align=right>$Date: 1998/07/01 23:29:16 $
+<td width="30%" align=right>$Date: 1998/07/20 06:19:12 $
</table>
<HR>
<H1 ALIGN=CENTER>Design Notes On Fetchmail</H1>
<LI>Add the new token and a brief description to the header comment of
sample.rcfile.
+<LI>Hack fetchmailconf to configure it. Bump the fetchmailconf version.
+
<LI>Add an entry to NEWS.
</UL>
<table width="100%" cellpadding=0><tr>
<td width="30%">Back to <a href="index.html">Fetchmail Home Page</a>
<td width="30%" align=center>To <a href="/~esr/sitemap.html">Site Map</a>
-<td width="30%" align=right>$Date: 1998/07/01 23:29:16 $
+<td width="30%" align=right>$Date: 1998/07/20 06:19:12 $
</table>
<P><ADDRESS>Eric S. Raymond <A HREF="mailto:esr@thyrsus.com"><esr@snark.thyrsus.com></A></ADDRESS>
if (!accept_count)
{
no_local_matches = TRUE;
- save_str(&xmit_names, user, XMIT_ACCEPT);
+ save_str(&xmit_names, run.postmaster, XMIT_ACCEPT);
if (outlevel == O_VERBOSE)
error(0, 0,
"no local matches, forwarding to %s",
- user);
+ run.postmaster);
}
}
else /* it's a single-drop box, use first localname */
initialize_saved_lists(querylist, run.idfile);
#endif /* POP3_ENABLE */
+ /*
+ * If the user didn't set a last-resort user to get misaddressed
+ * multidrop mail, set an appropriate default here.
+ */
+ if (!run.postmaster)
+ if (getuid()) /* ordinary user */
+ run.postmaster = user;
+ else /* root */
+ run.postmaster = "postmaster";
+
return(implicitmode);
}
#endif
if (runp->invisible)
printf("Fetchmail will masquerade and will not generate Received\n");
+ if (runp->postmaster)
+ printf("Fetchmail will forward misaddressed multidrop messages to %s.",
+ runp->postmaster);
for (ctl = querylist; ctl; ctl = ctl->next)
{
int poll_interval;
flag use_syslog;
flag invisible;
+ char *postmaster;
};
struct idlist
option was used.
.PP
The
-.B --invisible
-option (keyword: set invisible) tries to make fetchmail invisible.
-Normally, fetchmail behaves like any other MTA would -- it generates a
-Received header into each message describing its place in the chain of
-transmission, and tells the MTA it forwards to that the mail came from
-the machine fetchmail itself is running on. If the invisible option
-is on, the Received header is suppressed and fetchmail tries to spoof
-the MTA it forwards to into thinking it came directly from the
-mailserver host.
-.PP
-The
.B \-N
or --nodetach option suppresses backgrounding and detachment of the
daemon process from its control terminal. This is primarily useful
next poll cycle. (The IMAP logic doesn't delete messages until
they're delivered, so this problem does not arise.)
+.SH ADMINISTRATIVE OPTIONS
+.PP
+The
+.B --postmaster
+option (keyword: set postmaster) specifies the last-resort username to
+which multidrop mail is to be forwarded if no matching local recipient
+can be found. Normally this is just the user who invoked fetchmail.
+If the invoking user is root, then the default of this option is
+the user `postmaster'.
+.PP
+The
+.B --invisible
+option (keyword: set invisible) tries to make fetchmail invisible.
+Normally, fetchmail behaves like any other MTA would -- it generates a
+Received header into each message describing its place in the chain of
+transmission, and tells the MTA it forwards to that the mail came from
+the machine fetchmail itself is running on. If the invisible option
+is on, the Received header is suppressed and fetchmail tries to spoof
+the MTA it forwards to into thinking it came directly from the
+mailserver host.
+
.SH RETRIEVAL FAILURE MODES
The protocols \fIfetchmail\fR uses to talk to mailservers are next to
bulletproof. In normal operation forwarding to port 25, no message is
addresses with hostname parts that match your poll name or your `via',
`aka' or `localdomains' options, and usually also for hostname parts
which DNS tells it are aliases of the mailserver. See the discussion
-of `dns', `checkalias', `localdomains', and `aka' for details on how matching
-addresses are handled. If \fIfetchmail\fR cannot match any mailserver
-usernames or localdomain addresses, the default recipient is the
+of `dns', `checkalias', `localdomains', and `aka' for details on how
+matching addresses are handled.
+.PP
+If \fIfetchmail\fR cannot match any mailserver usernames or
+localdomain addresses, the default recipient is the value of the
+`postmaster' global option if that has been set; otherwise it's the
calling user (as set by the USER or LOGNAME variable in the
-environment; you could use this to redirect to an alias like postmaster).
+environment).
.PP
The `dns' option (normally on) controls the way addresses from
multidrop mailboxes are checked. On, it enables logic to check each
.IP 11
Fatal DNS error. Fetchmail encountered an error while performing
a DNS lookup at startup and could not proceed.
-.IP 11
+.IP 12
Internal error. You should see a message on standard error with
details.
.PP
#
# TO DO: Arrange for save and quit buttons to clean up all frames dependent
# on the current ones.
-version = "1.0"
+version = "1.1"
from Tkinter import *
from Dialog import *
self.syslog = FALSE # Use syslogd for logging?
self.logfile = None # No logfile, initially
self.idfile = os.environ["HOME"] + "/.fetchids" # Default idfile, initially
+ self.postmaster = None # No last-resort address, initially
self.invisible = FALSE # Suppress Received line & spoof?
self.servers = [] # List of included sites
Configuration.typemap = (
('syslog', 'Boolean'),
('logfile', 'String'),
('idfile', 'String'),
+ ('postmaster', 'String'),
('invisible', 'Boolean'))
def __repr__(self):
str = str + ("set logfile \"%s\"\n" % (self.logfile,));
if self.idfile != ConfigurationDefaults.idfile:
str = str + ("set idfile \"%s\"\n" % (self.idfile,));
+ if self.postmaster != ConfigurationDefaults.postmaster:
+ str = str + ("set postmaster \"%s\"\n" % (self.postmaster,));
if self.poll_interval > 0:
str = str + "set daemon " + `self.poll_interval` + "\n"
for site in self.servers:
If empty, store seen-message IDs in .fetchids under user's home
directory. If nonempty, use given file name.
-Invisible:
+Postmaster
+ Who to send multidrop mail to as a last resort if no address can
+ be matched. Normally empty; in this case, fetchmail treats the
+ invoking user as the address of last resort unless that user is
+ root. If that user is root, fetchmail sends to `postmaster'.
+
+Invisible
If false (the default) fetchmail generates a Received line into
each message and generates a HELO from the machine it is running on.
If true, fetchmail generates no Received line and HELOs as if it were
# Set the idfile
log = LabeledEntry(gf, ' Idfile:', self.idfile, '14')
log.pack(side=RIGHT, anchor=E)
+ # Set the postmaster
+ log = LabeledEntry(gf, ' Postmaster:', self.postmaster, '14')
+ log.pack(side=RIGHT, anchor=E)
gf.pack(fill=X)
#define LA_NOSYSLOG 12
#define LA_RCFILE 13
#define LA_IDFILE 14
-#define LA_PROTOCOL 15
-#define LA_UIDL 16
-#define LA_PORT 17
-#define LA_AUTHENTICATE 18
-#define LA_TIMEOUT 19
-#define LA_ENVELOPE 20
-#define LA_QVIRTUAL 21
-#define LA_USERNAME 22
-#define LA_ALL 23
-#define LA_NOKEEP 24
-#define LA_KEEP 25
-#define LA_FLUSH 26
-#define LA_NOREWRITE 27
-#define LA_LIMIT 28
-#define LA_FOLDER 29
-#define LA_SMTPHOST 30
-#define LA_SMTPADDR 31
-#define LA_ANTISPAM 32
-#define LA_BATCHLIMIT 33
-#define LA_FETCHLIMIT 34
-#define LA_EXPUNGE 35
-#define LA_MDA 36
-#define LA_NETSEC 37
-#define LA_INTERFACE 38
-#define LA_MONITOR 39
-#define LA_CONFIGDUMP 40
-#define LA_YYDEBUG 41
-
-/* options still left: CgGhHjJoORUwWxXYz */
+#define LA_POSTMASTER 15
+#define LA_PROTOCOL 16
+#define LA_UIDL 17
+#define LA_PORT 18
+#define LA_AUTHENTICATE 19
+#define LA_TIMEOUT 20
+#define LA_ENVELOPE 21
+#define LA_QVIRTUAL 22
+#define LA_USERNAME 23
+#define LA_ALL 24
+#define LA_NOKEEP 25
+#define LA_KEEP 26
+#define LA_FLUSH 27
+#define LA_NOREWRITE 28
+#define LA_LIMIT 29
+#define LA_FOLDER 30
+#define LA_SMTPHOST 31
+#define LA_SMTPADDR 32
+#define LA_ANTISPAM 33
+#define LA_BATCHLIMIT 34
+#define LA_FETCHLIMIT 35
+#define LA_EXPUNGE 36
+#define LA_MDA 37
+#define LA_NETSEC 38
+#define LA_INTERFACE 39
+#define LA_MONITOR 41
+#define LA_CONFIGDUMP 42
+#define LA_YYDEBUG 43
+
+/* options still left: CgGhHjJoORwWxXYz */
static const char *shortoptions =
"?Vcsvd:NqL:f:i:p:UP:A:t:E:Q:u:akKFnl:r:S:Z:b:B:e:m:T:I:M:y";
{"nosyslog", no_argument, (int *) 0, LA_NOSYSLOG },
{"fetchmailrc",required_argument,(int *) 0, LA_RCFILE },
{"idfile", required_argument, (int *) 0, LA_IDFILE },
+ {"postmaster",required_argument, (int *) 0, LA_POSTMASTER },
{"protocol", required_argument, (int *) 0, LA_PROTOCOL },
{"proto", required_argument, (int *) 0, LA_PROTOCOL },
rctl->idfile = (char *) xmalloc(strlen(optarg)+1);
strcpy(rctl->idfile,optarg);
break;
+ case LA_POSTMASTER:
+ rctl->postmaster = (char *) xmalloc(strlen(optarg)+1);
+ break;
case 'p':
case LA_PROTOCOL:
/* XXX -- should probably use a table lookup here */
fputs(" --invisible suppress Received line & enable host spoofing\n", stderr);
fputs(" -f, --fetchmailrc specify alternate run control file\n", stderr);
fputs(" -i, --idfile specify alternate UIDs file\n", stderr);
+ fputs(" --postmaster specify recipient of last resort\n",stderr);
#if defined(linux) && !INET6
fputs(" -I, --interface interface required specification\n",stderr);
fputs(" -M, --monitor monitor interface for activity\n",stderr);
daemon { return DAEMON; }
syslog { return SYSLOG; }
invisible { return INVISIBLE; }
+postmaster { return POSTMASTER; }
defaults { return DEFAULTS; }
server { return POLL; }
struct query cmd_opts; /* where to put command-line info */
/* parser sets these */
-int poll_interval; /* poll interval in seconds */
-char *logfile; /* log file for daemon mode */
-flag errors_to_syslog; /* if syslog was set */
-flag use_invisible; /* if invisible was set */
struct query *querylist; /* head of server list (globally visible) */
int yydebug; /* in case we didn't generate with -- debug */
%token AUTHENTICATE TIMEOUT KPOP KERBEROS4 KERBEROS5 KERBEROS
%token ENVELOPE QVIRTUAL USERNAME PASSWORD FOLDER SMTPHOST MDA SMTPADDRESS
%token SPAMRESPONSE PRECONNECT POSTCONNECT LIMIT
+%token NETSEC INTERFACE MONITOR
%token IS HERE THERE TO MAP WILDCARD
%token BATCHLIMIT FETCHLIMIT EXPUNGE
-%token SET LOGFILE DAEMON SYSLOG IDFILE INVISIBLE NETSEC INTERFACE MONITOR
+%token SET LOGFILE DAEMON SYSLOG IDFILE INVISIBLE POSTMASTER
%token <proto> PROTO
%token <sval> STRING
%token <number> NUMBER
statement : SET LOGFILE optmap STRING {run.logfile = xstrdup($4);}
| SET IDFILE optmap STRING {run.idfile = xstrdup($4);}
| SET DAEMON optmap NUMBER {run.poll_interval = $4;}
+ | SET POSTMASTER optmap STRING {run.postmaster = xstrdup($4);}
| SET SYSLOG {run.use_syslog = TRUE;}
| SET INVISIBLE {run.invisible = TRUE;}
#
# set logfile -- must be followed by a string
# set idfile -- must be followed by a string
+# set postmaster -- must be followed by a string
# set daemon -- must be followed by a number
# set syslog
# set invisible