* Use the libmd functions for md5 under Free BSD? (Low priority.)
+* Make interval count polls skipped because of interface or monitor option?
+
Other TO-DO items:
* Get with Craig Metz to write a draft RFC on RFC1938 support in IMAP.
Release Notes:
------------------------------------------------------------------------------
+fetchmail-4.0.7 ()
+* Fixed a minor bug in handling of DNS errors in multidrop mode.
+* Added a `postconnect' analogous to `preconnect'.
+
+There are 258 people on the fetchmail-friends list.
+
fetchmail-4.0.6 (Fri Aug 1 11:14:31 EDT 1997)
* Changed semantics of `via' and `poll <name>' to be more orthogonal.
* Substantially improved option coverage on the man page.
error(0,-1, "%s error while fetching from %s", msg, ctl->server.pollname);
closeUp:
+ /* execute post-initialization command, if any */
+ if (ctl->postconnect && (ok = system(ctl->postconnect)))
+ {
+ char buf[80];
+
+ sprintf(buf, "post-connection command failed with status %d", ok);
+ error(0, 0, buf);
+ if (ok == PS_SUCCESS)
+ ok = PS_SYNTAX;
+ }
+
signal(SIGALRM, sigsave);
return(ok);
}
printf("\n");
}
if (ctl->preconnect)
- printf(" Server connection will be preinitialized with '%s.'\n", visbuf(ctl->preconnect));
+ printf(" Server connection will be brought up with '%s.'\n",
+ visbuf(ctl->preconnect));
else if (outlevel == O_VERBOSE)
- printf(" No preinitialization command.\n");
+ printf(" No pre-connection command.\n");
+ if (ctl->postconnect)
+ printf(" Server connection will be taken down with '%s.'\n",
+ visbuf(ctl->postconnect));
+ else if (outlevel == O_VERBOSE)
+ printf(" No post-connection command.\n");
if (!ctl->localnames)
printf(" No localnames declared for this host.\n");
else
char *smtphost; /* actual SMTP host to point to */
char *mda; /* local MDA to pass mail to */
char *preconnect; /* pre-connection command to execute */
+ char *postconnect; /* post-connection command to execute */
/* per-user control flags */
flag keep; /* if TRUE, leave messages undeleted */
preconnect \& T{
Command to be executed before each connection
T}
+postconnect \& T{
+Command to be executed after each connection
+T}
keep -k T{
Don't delete seen messages from server
T}
.PP
All options correspond to the obvious command-line arguments, except
the following: `via', `interval', `aka', `is', `to', `dns'/`no dns',
-\&`password', \&`preconnect', `localdomains', `stripcr'/`no stripcr',
-\&`forcecr'/`no forcecr', `pass8bits'/`no pass8bits' `dropstatus/no
-dropstatus', and `no envelope'.
+\&`password', \&`preconnect', \&`postconnect', `localdomains',
+\&`stripcr'/`no stripcr', \&`forcecr'/`no forcecr', `pass8bits'/`no
+pass8bits' `dropstatus/no dropstatus', and `no envelope'.
.PP
The `via' option is for use with ssh, or if you want to have more
than one configuration pointing at the same site. If it is present,
attempting to set up secure POP connections with the aid of
.IR ssh (1).
.PP
+Similarly, the `postconnect' keyword similarly allows you to specify a
+shell command to be executed just after each time a mailserver
+connection is taken down.
+.PP
The `forcecr' option controls whether lines terminated by LF only are
given CRLF termination before forwarding. Strictly speaking RFC821
requires this, but few MTAs enforce the requirement it so this option
local(domains) { return LOCALDOMAINS; }
proto(col)? { return PROTOCOL; }
port { return PORT; }
-interval { return INTERVAL; }
+interval { return INTERVAL; }
auth(enticate)? { return AUTHENTICATE; }
kerberos_v4 { return KERBEROS4; }
kerberos { return KERBEROS4; }
smtp(host)? { return SMTPHOST; }
mda { return MDA; }
pre(connect)? { return PRECONNECT; }
+post(connect)? { return POSTCONNECT; }
interface { return INTERFACE; }
monitor { return MONITOR; }
%token DEFAULTS POLL SKIP VIA AKA LOCALDOMAINS PROTOCOL
%token AUTHENTICATE TIMEOUT KPOP KERBEROS4
-%token ENVELOPE USERNAME PASSWORD FOLDER SMTPHOST MDA PRECONNECT LIMIT
+%token ENVELOPE USERNAME PASSWORD FOLDER SMTPHOST MDA
+%token PRECONNECT POSTCONNECT LIMIT
%token IS HERE THERE TO MAP WILDCARD
%token SET BATCHLIMIT FETCHLIMIT LOGFILE DAEMON SYSLOG INTERFACE MONITOR
%token <proto> PROTO
| SMTPHOST smtp_list
| MDA STRING {current.mda = xstrdup($2);}
| PRECONNECT STRING {current.preconnect = xstrdup($2);}
+ | POSTCONNECT STRING {current.postconnect = xstrdup($2);}
| KEEP {current.keep = FLAG_TRUE;}
| FLUSH {current.flush = FLAG_TRUE;}
save_str(¤t.smtphunt, -1, cmd_opts.smtphunt->id);
FLAG_FORCE(mda);
FLAG_FORCE(preconnect);
+ FLAG_FORCE(postconnect);
FLAG_FORCE(keep);
FLAG_FORCE(flush);
# 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 initialization command
+# preconnect (or pre) -- must be followed by an executable command
+# postconnect (or post) -- must be followed by an executable command
#
# keep
# flush