Merge branch 'upstream' into master
Frank Terbeck
5 years ago
556 | 556 |
optionally the user name and password. If the port is not specified, the
|
557 | 557 |
default port ('pop3' in the services(5) database) is used. If the user name,
|
558 | 558 |
password, or both is omitted, fdm attempts to look it up the .netrc file, see
|
559 | |
the next section for details.
|
|
559 |
the next section for details. Optionally fdm can read the password from a
|
|
560 |
command line program, see below for details.
|
560 | 561 |
|
561 | 562 |
Examples of a POP3 account definition are:
|
562 | 563 |
|
|
647 | 648 |
password "moo"
|
648 | 649 |
|
649 | 650 |
fdm will abort if the .netrc file is world-writable or world-readable.
|
|
651 |
|
|
652 |
%%% Passwords from a command
|
|
653 |
|
|
654 |
fdm can read the password from a command by using command substitution
|
|
655 |
with $(). For example:
|
|
656 |
|
|
657 |
user "fdm@example.com" pass $(gpg --quiet --decrypt ~/.password.gpg)
|
650 | 658 |
|
651 | 659 |
%%% IMAP and IMAPS
|
652 | 660 |
|
1 | 1 |
|
2 | 2 |
bin_PROGRAMS = fdm
|
3 | 3 |
CLEANFILES = parse.c parse.h
|
|
4 |
BUILT_SOURCES = parse.c parse.h
|
4 | 5 |
|
5 | 6 |
EXTRA_DIST = \
|
6 | 7 |
CHANGES README MANUAL \
|
588 | 588 |
goto error;
|
589 | 589 |
}
|
590 | 590 |
|
|
591 |
if (SSL_set_tlsext_host_name(ssl, srv->host) != 1) {
|
|
592 |
*cause = sslerror("SSL_set_tlsext_host_name");
|
|
593 |
goto error;
|
|
594 |
}
|
|
595 |
|
591 | 596 |
if (SSL_set_fd(ssl, fd) != 1) {
|
592 | 597 |
*cause = sslerror("SSL_set_fd");
|
593 | 598 |
goto error;
|
95 | 95 |
.Xr fdm 1
|
96 | 96 |
will attempt to process previously queued messages as the next is being
|
97 | 97 |
fetched.
|
98 | |
Once this limit is reached, no further messages wil be fetched until
|
|
98 |
Once this limit is reached, no further messages will be fetched until
|
99 | 99 |
the number of messages held drops to the
|
100 | 100 |
.Ic queue-low
|
101 | 101 |
value.
|
|
203 | 203 |
.Ar count
|
204 | 204 |
mails have been retrieved.
|
205 | 205 |
This is useful on unreliable connections to limit the potential number of mails
|
206 | |
refetched if the connetion drops, but note that it can incur a considerable
|
|
206 |
refetched if the connection drops, but note that it can incur a considerable
|
207 | 207 |
speed penalty.
|
208 | 208 |
.It Ic no-received
|
209 | 209 |
If this option is present,
|
71 | 71 |
|
72 | 72 |
extern char *__progname;
|
73 | 73 |
|
74 | |
/* Linux compatibility bullshit. */
|
|
74 |
/* Various compatibility stuff. */
|
75 | 75 |
#ifndef UID_MAX
|
76 | 76 |
#define UID_MAX UINT_MAX
|
77 | 77 |
#endif
|
|
93 | 93 |
|
94 | 94 |
#ifndef ACCESSPERMS
|
95 | 95 |
#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
|
|
96 |
#endif
|
|
97 |
|
|
98 |
#ifndef MAXNAMLEN
|
|
99 |
#define MAXNAMLEN 255
|
96 | 100 |
#endif
|
97 | 101 |
|
98 | 102 |
#ifndef __dead
|
172 | 172 |
a->name, this->off, this->size);
|
173 | 173 |
iov[0].iov_base = fmbox->base + this->off;
|
174 | 174 |
iov[0].iov_len = this->size;
|
175 | |
iov[1].iov_base = c;
|
|
175 |
iov[1].iov_base = (void *)c;
|
176 | 176 |
iov[1].iov_len = 2;
|
177 | 177 |
if ((n = writev(fd, iov, 2)) < 0)
|
178 | 178 |
goto error;
|
|
212 | 212 |
while (aux != NULL) {
|
213 | 213 |
this = aux;
|
214 | 214 |
aux = TAILQ_NEXT(aux, entry);
|
215 | |
|
216 | |
if (this->fmbox == fmbox)
|
217 | |
fetch_mbox_free(this);
|
|
215 |
if (this->fmbox != fmbox)
|
|
216 |
continue;
|
|
217 |
|
|
218 |
TAILQ_REMOVE(&data->kept, this, entry);
|
|
219 |
fetch_mbox_free(this);
|
218 | 220 |
}
|
219 | 221 |
|
220 | 222 |
if (fmbox->reference != 0)
|
533 | 533 |
char *
|
534 | 534 |
make_from(struct mail *m, char *user)
|
535 | 535 |
{
|
536 | |
time_t t;
|
537 | |
char *s, *from = NULL;
|
538 | |
size_t fromlen = 0;
|
539 | |
|
540 | |
from = find_tag(m->tags, "mbox_from");
|
541 | |
if (from != NULL) {
|
542 | |
xasprintf(&s, "%s", from);
|
|
536 |
time_t t;
|
|
537 |
char *s, *from = NULL;
|
|
538 |
const char *mfrom;
|
|
539 |
size_t fromlen = 0;
|
|
540 |
|
|
541 |
mfrom = find_tag(m->tags, "mbox_from");
|
|
542 |
if (mfrom != NULL) {
|
|
543 |
xasprintf(&s, "%s", mfrom);
|
543 | 544 |
return (s);
|
544 | 545 |
}
|
545 | 546 |
from = find_header(m, "from", &fromlen, 1);
|