Changeset 1205:df3a6ad8d9d5
- Timestamp:
- 1999-08-15 04:43:03 (9 years ago)
- Branch:
- HEAD
- Files:
-
- 23 modified
-
Makefile.am (modified) (1 diff)
-
Muttrc (modified) (8 diffs)
-
NEWS (modified) (1 diff)
-
README.SECURITY (modified) (1 diff)
-
browser.c (modified) (15 diffs)
-
browser.h (modified) (2 diffs)
-
commands.c (modified) (5 diffs)
-
copy.c (modified) (4 diffs)
-
curs_main.c (modified) (2 diffs)
-
doc/Makefile.in (modified) (4 diffs)
-
doc/manual.sgml (modified) (8 diffs)
-
doc/muttrc.man (modified) (7 diffs)
-
globals.h (modified) (1 diff)
-
init.c (modified) (1 diff)
-
init.h (modified) (6 diffs)
-
main.c (modified) (1 diff)
-
mutt.h (modified) (3 diffs)
-
mx.c (modified) (1 diff)
-
pgp.c (modified) (10 diffs)
-
pgp.h (modified) (2 diffs)
-
pgpinvoke.c (modified) (1 diff)
-
prepare (modified) (1 diff)
-
send.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Makefile.am
r1188 r1205 151 151 152 152 stamp-doc-rc: $(srcdir)/init.h makedoc Muttrc.head 153 cpp -D_MAKEDOC -C -I. -I $(srcdir) -include config.h\154 $(srcdir)/init.h | ./makedoc -c | cat Muttrc.head - \153 cpp $(INCLUDES) $(DEFS) $(CPPFLAGS) -D_MAKEDOC -C \ 154 -include config.h $(srcdir)/init.h | ./makedoc -c | cat Muttrc.head - \ 155 155 > Muttrc 156 156 touch stamp-doc-rc -
Muttrc
r1191 r1205 426 426 # 427 427 # 428 # set dotlock_program="BINDIR/mutt_dotlock" 428 # set delete_untag=yes 429 # 430 # Name: delete_untag 431 # Type: boolean 432 # Default: yes 433 # 434 # 435 # If this option is set, mutt will untag messages when marking them 436 # for deletion. This applies when you either explicitly delete a message, 437 # or when you save it to another folder. 438 # 439 # 440 # set dotlock_program="/usr/local/bin/mutt_dotlock" 429 441 # 430 442 # Name: dotlock_program 431 443 # Type: path 432 # Default: " BINDIR/mutt_dotlock"444 # Default: "/usr/local/bin/mutt_dotlock" 433 445 # 434 446 # … … 561 573 # 562 574 # 563 # set folder_format="% N %F %2l %-8.8u %-8.8g %8s %d %f"575 # set folder_format="%2C %t %N %F %2l %-8.8u %-8.8g %8s %d %f" 564 576 # 565 577 # Name: folder_format 566 578 # Type: string 567 # Default: "% N %F %2l %-8.8u %-8.8g %8s %d %f"579 # Default: "%2C %t %N %F %2l %-8.8u %-8.8g %8s %d %f" 568 580 # 569 581 # … … 572 584 # its own set of printf()-like sequences: 573 585 # 586 # %C current file number 574 587 # %d date/time folder was last modified 575 588 # %f filename … … 579 592 # %N N if folder has new mail, blank otherwise 580 593 # %s size in bytes 594 # %t * if the file is tagged, blank otherwise 581 595 # %u owner name (or numeric uid, if missing) 582 596 # %>X right justify the rest of the string and pad … … 795 809 # list. 796 810 # 811 # 812 # set imap_checkinterval=0 813 # 814 # Name: imap_checkinterval 815 # Type: number 816 # Default: 0 817 # 818 # 819 # This variable configures how often (in seconds) IMAP should look for 820 # new mail. 821 # 822 # 823 # set imap_list_subscribed=no 824 # 825 # Name: imap_list_subscribed 826 # Type: boolean 827 # Default: no 828 # 829 # 830 # This variable configures whether IMAP folder browsing will look for 831 # only subscribed folders or all folders. This can be toggled in the 832 # IMAP browser with the toggle-subscribed command. 833 # 834 # 835 # set imap_user="" 836 # 837 # Name: imap_user 838 # Type: string 839 # Default: "" 840 # 841 # 842 # Your login name on the IMAP server. 843 # 844 # This variable defaults to your user name on the local machine. 845 # 846 # 847 # set imap_pass="" 848 # 849 # Name: imap_pass 850 # Type: string 851 # Default: "" 852 # 853 # 854 # Specifies the password for your IMAP account. If unset, Mutt will 855 # prompt you for your password when you invoke the fetch-mail function. 856 # Warning: you should only use this option when you are on a 857 # fairly secure machine, because the superuser can read your muttrc even 858 # if you are the only one who can read the file. 859 # 860 # 861 # set imap_passive=yes 862 # 863 # Name: imap_passive 864 # Type: boolean 865 # Default: yes 866 # 867 # 868 # When set, mutt will not open new IMAP connections to check for new 869 # mail. Mutt will only check for new mail over existing IMAP 870 # connections. This is useful if you don't want to be prompted to 871 # user/password pairs on mutt invocation, or if opening the connection 872 # is slow. 873 # 874 # 875 # set imap_home_namespace="" 876 # 877 # Name: imap_home_namespace 878 # Type: string 879 # Default: "" 797 880 # 798 881 # set implicit_autoview=no … … 1461 1544 # 1462 1545 # 1546 # set pgp_create_traditional=no 1547 # 1548 # Name: pgp_create_traditional 1549 # Type: quadoption 1550 # Default: no 1551 # 1552 # 1553 # This option controls whether Mutt generates old-style PGP encrypted 1554 # or signed messages under certain circumstances. 1555 # 1556 # Note that PGP/MIME will be used automatically for messages which have 1557 # a character set different from us-ascii, or which consist of more than 1558 # a single MIME part. 1559 # 1560 # Also note that using the old-style PGP message format is strongly 1561 # deprecated. 1562 # 1563 # 1463 1564 # set pgp_decode_command="" 1464 1565 # … … 1523 1624 # 1524 1625 # 1626 # set pgp_clearsign_command="" 1627 # 1628 # Name: pgp_clearsign_command 1629 # Type: string 1630 # Default: "" 1631 # 1632 # 1633 # This format is used to create a "clearsigned" old-style PGP attachment. 1634 # Note that the use of this format is strongly deprecated. 1635 # 1636 # 1525 1637 # set pgp_sign_command="" 1526 1638 # … … 1667 1779 # The separator to add between messages when piping a list of tagged 1668 1780 # messages to an external Unix command. 1781 # 1782 # 1783 # set pop_delete=no 1784 # 1785 # Name: pop_delete 1786 # Type: boolean 1787 # Default: no 1788 # 1789 # 1790 # If set, Mutt will delete successfully downloaded messages from the POP 1791 # server when using the fetch-mail function. When unset, Mutt will 1792 # download messages but also leave them on the POP server. 1793 # 1794 # 1795 # set pop_host="" 1796 # 1797 # Name: pop_host 1798 # Type: string 1799 # Default: "" 1800 # 1801 # 1802 # The name or address of your POP3 server. 1803 # 1804 # 1805 # set pop_port=110 1806 # 1807 # Name: pop_port 1808 # Type: number 1809 # Default: 110 1810 # 1811 # 1812 # This variable specifies which port your POP server is listening on. 1813 # 1814 # 1815 # set pop_last=no 1816 # 1817 # Name: pop_last 1818 # Type: boolean 1819 # Default: no 1820 # 1821 # 1822 # If this variable is set, mutt will try to use the "LAST" POP command 1823 # for retrieving only unread messages from the POP server. 1824 # 1825 # 1826 # set pop_user="" 1827 # 1828 # Name: pop_user 1829 # Type: string 1830 # Default: "" 1831 # 1832 # 1833 # Your login name on the POP3 server. 1834 # 1835 # Defaults to your login name on the local system. 1836 # 1837 # 1838 # set pop_pass="" 1839 # 1840 # Name: pop_pass 1841 # Type: string 1842 # Default: "" 1843 # 1844 # 1845 # Your password on the POP3 server. 1669 1846 # 1670 1847 # -
NEWS
r1181 r1205 1 1 Major changes since 0.96.3 2 2 -------------------------- 3 4 - There is a new option $delete_untag. Former mutt versions used to 5 untag messages when you save them, but leave them tagged whe you 6 mark them for deletion. $delete_untag controls _both_ cases, 7 leading to more uniform behaviour. 8 9 - The $weed option applies to the decode-save and decode-copy 10 functions. Think of these functions as something along the lines 11 of "save to file". 3 12 4 13 - The master source of the configuration option reference has been -
README.SECURITY
r790 r1205 57 57 58 58 > text/test-mailcap-bug; cat %s; copiousoutput; test=charset=%{charset} \ 59 > && test "`echo $charset| tr '[A-Z]' '[a-z]'`" != iso-8859-159 > && test "`echo \"$charset\" | tr '[A-Z]' '[a-z]'`" != iso-8859-1 60 60 61 The "charset=%{charset}" assignment is risk-free since mutt performs62 the necessary quoting steps here. Using it inside the backtick63 expansion is safe, too, since the variable's value is not itself64 subject to any further expansion (but note that it _is_ subject to65 word splitting). -
browser.c
r1169 r1205 48 48 typedef struct folder_t 49 49 { 50 const char *name; 51 const struct stat *f; 52 int new; 50 struct folder_file *ff; 51 int num; 53 52 } FOLDER; 54 53 … … 64 63 safe_free ((void **) &((state->entry)[c].name)); 65 64 safe_free ((void **) &((state->entry)[c].desc)); 65 safe_free ((void **) &((state->entry)[c].st)); 66 66 } 67 67 #ifdef USE_IMAP … … 147 147 switch (op) 148 148 { 149 case 'C': 150 snprintf (tmp, sizeof (tmp), "%%%sd", fmt); 151 snprintf (dest, destlen, tmp, folder->num + 1); 152 break; 153 149 154 case 'd': 150 if (folder->f != NULL)155 if (folder->ff->st != NULL) 151 156 { 152 157 tnow = time (NULL); 153 t_fmt = tnow - folder->f ->st_mtime < 31536000 ? "%b %d %H:%M" : "%b %d %Y";154 strftime (date, sizeof (date), t_fmt, localtime (&folder->f ->st_mtime));158 t_fmt = tnow - folder->ff->st->st_mtime < 31536000 ? "%b %d %H:%M" : "%b %d %Y"; 159 strftime (date, sizeof (date), t_fmt, localtime (&folder->ff->st->st_mtime)); 155 160 snprintf (tmp, sizeof (tmp), "%%%ss", fmt); 156 161 snprintf (dest, destlen, tmp, date); … … 162 167 } 163 168 break; 169 164 170 case 'f': 165 strfcpy (fn, folder-> name, sizeof(fn));166 if (folder->f != NULL)167 { 168 strcat (fn, S_ISLNK (folder->f ->st_mode) ? "@" :169 (S_ISDIR (folder->f ->st_mode) ? "/" :170 ((folder->f ->st_mode & S_IXUSR) != 0 ? "*" : "")));171 strfcpy (fn, folder->ff->name, sizeof(fn)); 172 if (folder->ff->st != NULL) 173 { 174 strcat (fn, S_ISLNK (folder->ff->st->st_mode) ? "@" : 175 (S_ISDIR (folder->ff->st->st_mode) ? "/" : 176 ((folder->ff->st->st_mode & S_IXUSR) != 0 ? "*" : ""))); 171 177 } 172 178 snprintf (tmp, sizeof (tmp), "%%%ss", fmt); 173 179 snprintf (dest, destlen, tmp, fn); 174 180 break; 181 175 182 case 'F': 176 if (folder->f != NULL)183 if (folder->ff->st != NULL) 177 184 { 178 185 sprintf (permission, "%c%c%c%c%c%c%c%c%c%c", 179 S_ISDIR(folder->f->st_mode) ? 'd' : (S_ISLNK(folder->f->st_mode) ? 'l' : '-'),180 (folder->f->st_mode & S_IRUSR) != 0 ? 'r': '-',181 (folder->f->st_mode & S_IWUSR) != 0 ? 'w' : '-',182 (folder->f->st_mode & S_ISUID) != 0 ? 's' : (folder->f->st_mode & S_IXUSR) != 0 ? 'x': '-',183 (folder->f->st_mode & S_IRGRP) != 0 ? 'r' : '-',184 (folder->f->st_mode & S_IWGRP) != 0 ? 'w' : '-',185 (folder->f->st_mode & S_ISGID) != 0 ? 's' : (folder->f->st_mode & S_IXGRP) != 0 ? 'x': '-',186 (folder->f->st_mode & S_IROTH) != 0 ? 'r' : '-',187 (folder->f->st_mode & S_IWOTH) != 0 ? 'w' : '-',188 (folder->f->st_mode & S_ISVTX) != 0 ? 't' : (folder->f->st_mode & S_IXOTH) != 0 ? 'x': '-');186 S_ISDIR(folder->ff->st->st_mode) ? 'd' : (S_ISLNK(folder->ff->st->st_mode) ? 'l' : '-'), 187 (folder->ff->st->st_mode & S_IRUSR) != 0 ? 'r': '-', 188 (folder->ff->st->st_mode & S_IWUSR) != 0 ? 'w' : '-', 189 (folder->ff->st->st_mode & S_ISUID) != 0 ? 's' : (folder->ff->st->st_mode & S_IXUSR) != 0 ? 'x': '-', 190 (folder->ff->st->st_mode & S_IRGRP) != 0 ? 'r' : '-', 191 (folder->ff->st->st_mode & S_IWGRP) != 0 ? 'w' : '-', 192 (folder->ff->st->st_mode & S_ISGID) != 0 ? 's' : (folder->ff->st->st_mode & S_IXGRP) != 0 ? 'x': '-', 193 (folder->ff->st->st_mode & S_IROTH) != 0 ? 'r' : '-', 194 (folder->ff->st->st_mode & S_IWOTH) != 0 ? 'w' : '-', 195 (folder->ff->st->st_mode & S_ISVTX) != 0 ? 't' : (folder->ff->st->st_mode & S_IXOTH) != 0 ? 'x': '-'); 189 196 snprintf (tmp, sizeof (tmp), "%%%ss", fmt); 190 197 snprintf (dest, destlen, tmp, permission); … … 193 200 { 194 201 #ifdef USE_IMAP 195 if (strchr(folder-> name, '{'))202 if (strchr(folder->ff->name, '{')) 196 203 { 197 204 snprintf (tmp, sizeof (tmp), "%%%ss", fmt); … … 201 208 } 202 209 break; 210 203 211 case 'g': 204 if (folder->f != NULL)205 { 206 if ((gr = getgrgid (folder->f ->st_gid)))212 if (folder->ff->st != NULL) 213 { 214 if ((gr = getgrgid (folder->ff->st->st_gid))) 207 215 { 208 216 snprintf (tmp, sizeof (tmp), "%%%ss", fmt); … … 212 220 { 213 221 snprintf (tmp, sizeof (tmp), "%%%sld", fmt); 214 snprintf (dest, destlen, tmp, folder->f ->st_gid);222 snprintf (dest, destlen, tmp, folder->ff->st->st_gid); 215 223 } 216 224 } … … 221 229 } 222 230 break; 231 223 232 case 'l': 224 if (folder->f != NULL)233 if (folder->ff->st != NULL) 225 234 { 226 235 snprintf (tmp, sizeof (tmp), "%%%sd", fmt); 227 snprintf (dest, destlen, tmp, folder->f ->st_nlink);236 snprintf (dest, destlen, tmp, folder->ff->st->st_nlink); 228 237 } 229 238 else … … 233 242 } 234 243 break; 244 235 245 case 'N': 236 246 snprintf (tmp, sizeof (tmp), "%%%sc", fmt); 237 snprintf (dest, destlen, tmp, folder->new ? 'N' : ' '); 238 break; 247 snprintf (dest, destlen, tmp, folder->ff->is_new ? 'N' : ' '); 248 break; 249 239 250 case 's': 240 if (folder->f != NULL)251 if (folder->ff->st != NULL) 241 252 { 242 253 snprintf (tmp, sizeof (tmp), "%%%sld", fmt); 243 snprintf (dest, destlen, tmp, (long) folder->f ->st_size);254 snprintf (dest, destlen, tmp, (long) folder->ff->st->st_size); 244 255 } 245 256 else … … 249 260 } 250 261 break; 262 263 case 't': 264 snprintf (tmp, sizeof (tmp), "%%%sc", fmt); 265 snprintf (dest, destlen, tmp, folder->ff->tagged ? '*' : ' '); 266 break; 267 251 268 case 'u': 252 if (folder->f != NULL)253 { 254 if ((pw = getpwuid (folder->f ->st_uid)))269 if (folder->ff->st != NULL) 270 { 271 if ((pw = getpwuid (folder->ff->st->st_uid))) 255 272 { 256 273 snprintf (tmp, sizeof (tmp), "%%%ss", fmt); … … 260 277 { 261 278 snprintf (tmp, sizeof (tmp), "%%%sld", fmt); 262 snprintf (dest, destlen, tmp, folder->f ->st_uid);279 snprintf (dest, destlen, tmp, folder->ff->st->st_uid); 263 280 } 264 281 } … … 269 286 } 270 287 break; 288 289 default: 290 snprintf (tmp, sizeof (tmp), "%%%sc", fmt); 291 snprintf (dest, destlen, tmp, op); 292 break; 271 293 } 272 294 return (src); … … 277 299 { 278 300 char buffer[_POSIX_PATH_MAX + SHORT_STRING]; 279 FOLDER folder;280 281 folder.name = name;282 folder.f = s;283 folder.new = new;284 mutt_FormatString (buffer, sizeof (buffer), NONULL(FolderFormat),285 folder_format_str, (unsigned long) &folder,286 M_FORMAT_ARROWCURSOR);287 301 288 302 if (state->entrylen == state->entrymax) … … 297 311 if (s != NULL) 298 312 { 299 (state->entry)[state->entrylen].mode = s->st_mode; 300 (state->entry)[state->entrylen].mtime = s->st_mtime; 301 (state->entry)[state->entrylen].size = s->st_size; 302 } 313 (state->entry)[state->entrylen].mode = s->st_mode; 314 (state->entry)[state->entrylen].mtime = s->st_mtime; 315 (state->entry)[state->entrylen].size = s->st_size; 316 317 (state->entry)[state->entrylen].st = safe_malloc (sizeof (struct stat)); 318 memcpy ((state->entry)[state->entrylen].st, s, sizeof (struct stat)); 319 } 320 321 (state->entry)[state->entrylen].is_new = new; 303 322 (state->entry)[state->entrylen].name = safe_strdup (name); 304 323 (state->entry)[state->entrylen].desc = safe_strdup (buffer); … … 424 443 void folder_entry (char *s, size_t slen, MUTTMENU *menu, int num) 425 444 { 426 snprintf (s, slen, "%2d %c %s", 427 num + 1, 428 ((struct folder_file *) menu->data)[num].tagged ? '*' : ' ', 429 ((struct folder_file *) menu->data)[num].desc); 445 FOLDER folder; 446 447 folder.ff = &((struct folder_file *) menu->data)[num]; 448 folder.num = num; 449 450 mutt_FormatString (s, slen, NONULL(FolderFormat), folder_format_str, 451 (unsigned long) &folder, M_FORMAT_ARROWCURSOR); 430 452 } 431 453 -
browser.h
r1135 r1205 24 24 { 25 25 mode_t mode; 26 off_t size; 26 27 time_t mtime; 27 off_t size; 28 struct stat *st; 29 28 30 char *name; 29 31 char *desc; … … 32 34 #endif 33 35 unsigned tagged : 1; 36 unsigned is_new : 1; 34 37 }; 35 38 -
commands.c
r1160 r1205 478 478 } 479 479 480 static void set_copy_flags (HEADER *hdr, int decode, int decrypt, int *cmflags, int *chflags)480 static void set_copy_flags (HEADER *hdr, int decode, int decrypt, int *cmflags, int *chflags) 481 481 { 482 482 *cmflags = 0; … … 496 496 #endif 497 497 498 if (decode)498 if (decode) 499 499 { 500 500 *chflags = CH_XMIT | CH_MIME | CH_TXTPLAIN; … … 502 502 } 503 503 504 /* respect $weed only if decode doesn't kick in 505 * for decrypt. 506 */ 507 508 if (decode && !decrypt && option (OPTWEED)) 509 { 510 *chflags |= CH_WEED; 511 *cmflags |= M_CM_WEED; 512 } 504 513 } 505 514 … … 508 517 int cmflags, chflags; 509 518 510 set_copy_flags (h, decode, decrypt, &cmflags, &chflags);511 512 if (decode || decrypt)519 set_copy_flags (h, decode, decrypt, &cmflags, &chflags); 520 521 if (decode || decrypt) 513 522 mutt_parse_mime_message (Context, h); 514 523 … … 516 525 { 517 526 mutt_set_flag (Context, h, M_DELETE, 1); 518 mutt_set_flag (Context, h, M_TAG, 0); 527 if (option (OPTDELETEUNTAG)) 528 mutt_set_flag (Context, h, M_TAG, 0); 519 529 } 520 530 } -
copy.c
r1199 r1205 46 46 { 47 47 int from = 0; 48 int this_is_from; 48 49 int ignore = 0; 49 50 char buf[STRING]; /* should be long enough to get most fields in one pass */ … … 137 138 { 138 139 ignore = 1; 140 this_is_from = 0; 139 141 if (!from && mutt_strncmp ("From ", buf, 5) == 0) 140 142 { 141 143 if ((flags & CH_FROM) == 0) 142 144 continue; 143 from = 1;145 this_is_from = from = 1; 144 146 } 145 147 else if (buf[0] == '\n' || (buf[0] == '\r' && buf[1] == '\n')) 146 148 break; /* end of header */ 147 149 148 if ((flags & CH_WEED) && 150 /* note: CH_FROM takes precedence over header weeding. */ 151 if (!((flags & CH_FROM) && (flags & CH_FORCE_FROM) && this_is_from) && 152 (flags & CH_WEED) && 149 153 mutt_matches_ignore (buf, Ignore) && 150 154 !mutt_matches_ignore (buf, UnIgnore)) … … 263 267 CH_DECODE RFC2047 header decoding 264 268 CH_FROM retain the "From " message separator 269 CH_FORCE_FROM give CH_FROM precedence over CH_WEED 265 270 CH_MIME ignore MIME fields 266 271 CH_NOLEN don't write Content-Length: and Lines: … … 607 612 return -1; 608 613 if (dest->magic == M_MBOX || dest->magic == M_MMDF || dest->magic == M_KENDRA) 609 chflags |= CH_FROM ;614 chflags |= CH_FROM | CH_FORCE_FROM; 610 615 chflags |= (dest->magic == M_MAILDIR ? CH_NOSTATUS : CH_UPDATE); 611 616 r = _mutt_copy_message (msg->fp, fpin, hdr, body, flags, chflags); -
curs_main.c
r1138 r1205 1441 1441 { 1442 1442 mutt_tag_set_flag (M_DELETE, 1); 1443 if (option (OPTDELETEUNTAG)) 1444 mutt_tag_set_flag (M_TAG, 0); 1443 1445 menu->redraw = REDRAW_INDEX; 1444 1446 }
