├── .gitignore ├── FUNDING.yml ├── LICENSE ├── Makefile ├── README.md ├── bin ├── mailsync └── mw ├── completion └── _mutt-wizard.zsh ├── lib └── openfile ├── mailsync.1 ├── mw.1 └── share ├── domains.csv ├── imapnotify-temp ├── mailcap ├── mbsync-temp ├── mpop-temp ├── msmtp-temp ├── mutt-temp ├── mutt-wizard.muttrc ├── notmuch-temp ├── online-temp └── switch.muttrc /.gitignore: -------------------------------------------------------------------------------- 1 | personal.muttrc 2 | *.swp 3 | *.gpg 4 | *.pyc 5 | accounts/ 6 | *mailsynclastrun 7 | -------------------------------------------------------------------------------- /FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: ["https://lukesmith.xyz/donate.html"] 2 | github: lukesmithxyz 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .POSIX: 2 | 3 | PREFIX = /usr/local 4 | MANPREFIX = $(PREFIX)/share/man 5 | 6 | install: 7 | mkdir -p $(DESTDIR)$(PREFIX)/bin 8 | mkdir -p $(DESTDIR)$(PREFIX)/lib/mutt-wizard 9 | mkdir -p $(DESTDIR)$(PREFIX)/share/mutt-wizard 10 | cp -f bin/mailsync $(DESTDIR)$(PREFIX)/bin 11 | cp -f lib/openfile $(DESTDIR)$(PREFIX)/lib/mutt-wizard 12 | chmod 755 $(DESTDIR)$(PREFIX)/share/mutt-wizard 13 | for shared in share/*; do \ 14 | cp -f $$shared $(DESTDIR)$(PREFIX)/share/mutt-wizard; \ 15 | chmod 644 $(DESTDIR)$(PREFIX)/share/mutt-wizard/$$(basename $(notdir $$shared)); \ 16 | done 17 | mkdir -p $(DESTDIR)$(MANPREFIX)/man1 18 | cp -f mailsync.1 $(DESTDIR)$(MANPREFIX)/man1/mailsync.1 19 | sed 's:/usr/local:$(PREFIX):' < share/mutt-wizard.muttrc > $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrc 20 | sed 's:/usr/local:$(PREFIX):' < share/mailcap > $(DESTDIR)$(PREFIX)/share/mutt-wizard/mailcap 21 | sed 's:/usr/local:$(PREFIX):' < bin/mw > $(DESTDIR)$(PREFIX)/bin/mw 22 | sed 's:/usr/local:$(PREFIX):' < mw.1 > $(DESTDIR)$(MANPREFIX)/man1/mw.1 23 | chmod 644 $(DESTDIR)$(MANPREFIX)/man1/mw.1 $(DESTDIR)$(MANPREFIX)/man1/mailsync.1 24 | chmod 755 $(DESTDIR)$(PREFIX)/bin/mw $(DESTDIR)$(PREFIX)/bin/mailsync $(DESTDIR)$(PREFIX)/lib/mutt-wizard/openfile 25 | mkdir -p $(DESTDIR)$(PREFIX)/share/zsh/site-functions/ 26 | chmod 755 $(DESTDIR)$(PREFIX)/share/zsh/site-functions/ 27 | cp -f completion/_mutt-wizard.zsh $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_mutt-wizard.zsh 28 | chmod 644 $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_mutt-wizard.zsh 29 | 30 | uninstall: 31 | rm -f $(DESTDIR)$(PREFIX)/bin/mw $(DESTDIR)$(PREFIX)/bin/mailsync $(DESTDIR)$(PREFIX)/lib/mutt-wizard/openfile 32 | rm -rf $(DESTDIR)$(PREFIX)/share/mutt-wizard $(DESTDIR)$(PREFIX)/lib/mutt-wizard 33 | rm -f $(DESTDIR)$(MANPREFIX)/man1/mw.1 $(DESTDIR)$(MANPREFIX)/man1/mailsync.1 34 | rm -f $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_mutt-wizard.zsh 35 | 36 | .PHONY: install uninstall 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # mutt-wizard 2 | 3 | https://muttwizard.com/ 4 | 5 | Get this great stuff without effort: 6 | 7 | - A full-featured and autoconfigured email client on the terminal wibuiltth neomutt 8 | - Mail stored offline enabling the ability to: 9 | * view and write emails while you're away from 10 | the internet 11 | * make backups 12 | - Provides a `mailsync` script that can be scheduled to run as often as you 13 | like, which downloads/syncs mail and optionally notifies you when new mail has arrived. 14 | 15 | Specifically, this wizard: 16 | 17 | - Determines your email server's IMAP and SMTP servers and ports 18 | - Creates dotfiles for `neomutt`, `isync`, and `msmtp` appropriate for your 19 | email address 20 | - Encrypts and locally stores your password for easy remote access, accessible 21 | only by your GPG key 22 | - Handles as many as nine separate email accounts automatically 23 | - Auto-creates bindings to switch between accounts or between mailboxes 24 | - Provides sensible defaults and an attractive appearance for the neomutt email 25 | client 26 | - If mutt-wizard doesn't know your server's IMAP/SMTP info by default, it will 27 | prompt you for them and will put them in all the right places. 28 | 29 | ## Install 30 | 31 | #### Dependencies 32 | 33 | - `neomutt` - the email client. (If you are using Gentoo GNU/Linux, you will need the `sasl` use flag to be enabled) 34 | - `curl` - tests connections (required at install). 35 | - `isync` - downloads and syncs the mail (required if storing IMAP mail locally). 36 | - `msmtp` - sends the email. 37 | - `pass` - safely encrypts passwords (required at install). 38 | - `ca-certificates` - required for SSL. Probably installed already. 39 | - `gettext` - writes config files. Probably installed already. 40 | 41 | **Note**: There's a chance of errors if you use a slow-release distro like 42 | Ubuntu, Debian, or Mint. If you get errors in `neomutt`, install the most 43 | recent version manually or manually remove the offending lines in the config in 44 | `/usr/share/mutt-wizard/mutt-wizard.muttrc`. 45 | 46 | ```bash 47 | git clone https://github.com/LukeSmithxyz/mutt-wizard 48 | cd mutt-wizard 49 | sudo make install 50 | ``` 51 | 52 | A user of Arch-based distros can also install the current mutt-wizard release from the AUR as 53 | [mutt-wizard](https://aur.archlinux.org/packages/mutt-wizard/), or the Github master branch, [mutt-wizard-git](https://aur.archlinux.org/packages/mutt-wizard-git/). 54 | 55 | ### Optional Dependencies 56 | 57 | - `goimapnotify` - required for push notifications. 58 | [Check here for reference](https://wiki.archlinux.org/title/Isync#With_imapnotify). 59 | - `pam-gnupg` - Automatically logs you into your GPG key on login so you will 60 | never need to input your password once logged on to your system. Check the 61 | repo and directions out [here](https://github.com/cruegge/pam-gnupg). 62 | - `lynx` - view HTML email in neomutt. 63 | - `notmuch` - index and search mail. Install it and run `notmuch setup`, tell 64 | it that your mail is in `~/.local/share/mail/` (although `mw` will do this 65 | automatically if you haven't set notmuch up before). You can run it in mutt 66 | with ctrl-f. Run `notmuch new` to process new mail. 67 | - `abook` - a terminal-based address book. Pressing tab while typing an address 68 | to send mail to will suggest contacts that are in your abook. 69 | - `urlview` - outputs urls in mail to browser. 70 | - `cronie` - (or any other major cronjob manager) to set up automatic mail 71 | syncing. 72 | - `mpop` - If you want to use POP protocol instead of IMAP. 73 | 74 | 75 | ## Usage 76 | 77 | The mutt-wizard runs via the command `mw`. Once setup is complete, you'll use 78 | `neomutt` to access your mail. 79 | 80 | - `mw -a you@email.com` -- add a new email account 81 | - `mw -l` -- list existing accounts 82 | - `mw -d` -- choose an account to delete 83 | - `mw -D your@email.com` -- delete account settings without confirmation 84 | - `mw -t 30` -- toggle automatic mailsync to every 30 minutes 85 | - `mw -T` -- toggle mailsync without specifying minutes (default is 10) 86 | - `mw -r` -- reorder account shortcut numbers 87 | - `pass edit mw-your@email.com` -- revise an account's password 88 | - `mailsync` -- sync all configured email accounts. Also gives notifications of new mail and indexes new mail with notmuch silently. 89 | - `mailsync your@email.com` -- sync a particular (or several) email account(s). 90 | 91 | ### Options usable when adding an account 92 | 93 | #### Providing arguments 94 | 95 | - `-u` -- Give an account username if different from the email address. 96 | - `-n` -- A real name to be used by the account. Put in quotations if multiple 97 | words. 98 | - `-i` -- IMAP server address 99 | - `-I` -- IMAP server port (otherwise assumed to be 993) 100 | - `-s` -- SMTP server address 101 | - `-S` -- SMTP server port (otherwise assumed to be 465) 102 | - `-m` -- Maximum number of emails to be kept offline. No maximum is default 103 | functionality. 104 | - `-x` -- Account password. You will be prompted for it otherwise. 105 | 106 | #### General Settings 107 | 108 | - `-f` -- Assume mailbox names and force account configuration without 109 | connecting online at all. 110 | - `-o` -- Configure mutt for an account, but do not keep mail offline. 111 | - `-p` -- Use POP protocol instead of IMAP (requires `mpop` installed). 112 | - `mailsync` gives visual messages of new mail by default. Or, set 113 | `MAILSYNC_MUTE=1` as an environmental variable if you prefer not having them. 114 | 115 | ## Neomutt user interface 116 | 117 | To give you an example of the interface, here's an idea: 118 | 119 | - m - send mail (uses your default `$EDITOR` to write) 120 | - j/k and d/u - vim-like bindings to go down and up (or d/u to go 121 | down/up a page). 122 | - l - open mail, or attachment page or attachment 123 | - h - the opposite of l 124 | - r/R - reply/reply all to highlighted mail 125 | - s - save selected mail or selected attachment 126 | - gs,gi,ga,gd,gS - Press g followed by another letter to change 127 | mailbox: sent, inbox, archive, drafts, Spam, etc. 128 | - M and C - For Move and Copy: follow them with one of the mailbox 129 | letters above, i.e. MS means "move to Spam". 130 | - i# - Press i followed by a number 1-9 to go to a different account. If you 131 | add 9 accounts via mutt-wizard, they will each be assigned a number. 132 | - a to add address/person to abook and Tab while typing address to complete 133 | one from abook. 134 | - ? - see all keyboard shortcuts 135 | - ctrl-j/ctrl-k - move up and down in sidebar, ctrl-o opens mailbox. 136 | - ctrl-b - open a menu to select a URL you want to open in your browser. 137 | - p - encrypt/sign your message (in compose view, before sending the email). 138 | 139 | ## Enable push notifications per mail 140 | **Note**: Replace the `fulladdrs` with your actual email address. You have to do this for each new mail you want to setup instant notifications. 141 | ```bash 142 | systemctl enable --user goimapnotify@fulladdrs.service 143 | ``` 144 | 145 | ## Additional functionality 146 | 147 | - `pam-gnupg` - Automatically logs you into your GPG key on login, so you will 148 | never need to input your password once logged on to your system. Check the 149 | repo and directions out [here](https://github.com/cruegge/pam-gnupg). 150 | - `lynx` - View HTML email in neomutt. 151 | - `notmuch` - Index and search mail. Install it and run `notmuch setup`, tell it 152 | that your mail is in `~/.local/share/mail/` (although `mw` will do this 153 | automatically if you haven't set notmuch up before). You can run it in mutt 154 | with ctrl-f. Run `notmuch new` to process new mail. 155 | - `abook` - A terminal-based address book. Pressing tab while typing an address 156 | to send mail to will suggest contacts that are in your abook. 157 | - `urlview` - Outputs URLs in an email to your browser. 158 | 159 | ## New stuff and improvements since the original release 160 | 161 | - `mw` is now scriptable with command-line options and can run successfully 162 | without any interaction, making it possible to deploy in a script. 163 | - `isync`/`mbsync` has replaced `offlineimap` as the backend. Offlineimap was 164 | error-prone, bloated, used obsolete Python 2 modules, and required separate 165 | steps to install the system. 166 | - `mw` is now an installed program instead of just a script needed to be kept in 167 | your mutt folder. 168 | - `dialog` is no longer used and the interface is simply text commands. 169 | - More autogenerated shortcuts that allow quickly moving and copying mail 170 | between boxes. 171 | - More elegant attachment handling. Image/video/pdf attachments without relying 172 | on the neomutt instance. 173 | - abook integration by default. 174 | - The messy template files and other directories have been moved or removed, 175 | leaving a clean config folder. 176 | - msmtp configs moved to `~/.config/` and mail default location moved to 177 | `~/.local/share/mail/`, reducing mess in `~`. 178 | - `pass` is used as a password manager instead of separately saving passwords. 179 | - Script is POSIX sh compliant. 180 | - Error handling for the many people who don't read or follow directions. Fewer 181 | errors generally. 182 | - Addition of a manual `man mw` 183 | - Now handles POP protocol via `mpop` for those who prefer it (add an account 184 | with the `-p` option). POP configs are still generated automatically. 185 | 186 | ## Help the Project! 187 | 188 | 189 | - Try mutt-wizard out on weird machines and weird email addresses and report any 190 | errors. 191 | - Open a PR to add new server information into `domains.csv` so their users can 192 | more easily use mutt-wizard. 193 | - If nothing else, donate: 194 | - XMR: `8AzeWXhJvYJ1VeENHcNXCR1dLMgDALreZ1BdooZVjRKndv6myr3t1ue6C4ML2an5fWSpcP1sTDA9nKUMevkukDXG6chRjNv` 195 | - BTC: `bc1qacqfp36ffv9mafechmvk8f6r8qy4tual6rcm9p` 196 | 197 | ## Details for Tinkerers 198 | 199 | - The critical `mutt`/`neomutt` files are in `~/.config/mutt/`. 200 | - Put whatever global settings you want in `muttrc`. mutt-wizard will add some 201 | lines to this file, which you shouldn't remove unless you know what you're 202 | doing, but you can move them up/down over your config lines if you need to. If 203 | you get binding conflict errors in mutt, you might need to do this. 204 | - Each of the accounts that mutt-wizard generates will have custom settings set 205 | in a separate file in `accounts/`. You can edit these freely if you want to 206 | tinker with settings specific to an account. 207 | - In `/usr/share/mutt-wizard` are several global config files, including 208 | `mutt-wizard`'s default settings. You can override this in your `muttrc` if 209 | you wish. 210 | 211 | ## Watch out for these things 212 | 213 | - Gmail accounts need to create an 214 | [App Password](https://support.google.com/accounts/answer/185833?hl=en) to 215 | use with "less secure" applications. This password is single-use (i.e. 216 | for setup) and will be stored and encrypted locally. Enabling third-party 217 | applications requires turning off two-factor authentication and this will 218 | circumvent that. You might also need to manually "Enable IMAP" in the 219 | settings. 220 | To create an App Password for your Google account, 221 | you can directly visit the [App Passwords](https://myaccount.google.com/apppasswords) page in your Google Account settings. 222 | - If you have a university email or enterprise-hosted email for work, there 223 | might be other hurdles or two-factor authentication you have to jump through. 224 | Some, for example, will want you to create a separate IMAP password, etc. 225 | - `isync` is not fully UTF-8 compatible, so non-Latin characters may be garbled 226 | (although sync should succeed). `mw` will also not auto-create mailbox 227 | shortcuts since it is looking for English mailbox names. I strongly recommend 228 | you to set your email language to English on your mail server to avoid these 229 | problems. 230 | 231 | ## License 232 | 233 | mutt-wizard is free/libre software. This program is released under the GPLv3 234 | license, which you can find in the file [LICENSE](LICENSE). 235 | -------------------------------------------------------------------------------- /bin/mailsync: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # - Syncs mail for all accounts, or a single account given as an argument. 4 | # - Displays a notification showing the number of new mails. 5 | # - Displays a notification for each new mail with its subject displayed. 6 | # - Runs notmuch to index new mail. 7 | # - This script can be set up as a cron job for automated mail syncing. 8 | 9 | # There are many arbitrary and ugly features in this script because it is 10 | # inherently difficult to pass environmental variables to cronjobs and other 11 | # issues. It also should at least be compatible with Linux (and maybe BSD) with 12 | # Xorg and MacOS as well. 13 | 14 | # Run only if not already running in other instance 15 | pgrep mbsync >/dev/null && { echo "mbsync is already running."; exit ;} 16 | 17 | # First, we have to get the right variables for the mbsync file, the pass 18 | # archive, notmuch and the GPG home. This is done by searching common profile 19 | # files for variable assignments. This is ugly, but there are few options that 20 | # will work on the maximum number of machines. 21 | eval "$(grep -h -- \ 22 | "^\s*\(export \)\?\(MBSYNCRC\|MPOPRC\|PASSWORD_STORE_DIR\|PASSWORD_STORE_GPG_OPTS\|NOTMUCH_CONFIG\|GNUPGHOME\|MAILSYNC_MUTE\|XDG_CONFIG_HOME\|XDG_DATA_HOME\)=" \ 23 | "$HOME/.profile" "$HOME/.bash_profile" "$HOME/.zprofile" "$HOME/.config/zsh/.zprofile" "$HOME/.zshenv" \ 24 | "$HOME/.config/zsh/.zshenv" "$HOME/.bashrc" "$HOME/.zshrc" "$HOME/.config/zsh/.zshrc" \ 25 | "$HOME/.pam_environment" 2>/dev/null)" 26 | 27 | # For non-interactive shell (e.g. cron job) run only when the GPG key (in $GNUPGHOME or pass --homedir) is unlocked 28 | tty -s || (echo "dummy" | gpg --sign --batch --pinentry-mode error -o /dev/null > /dev/null 2>&1) || exit 29 | 30 | export GPG_TTY="$(tty)" 31 | 32 | [ -n "$MBSYNCRC" ] && alias mbsync="mbsync -c $MBSYNCRC" || MBSYNCRC="$HOME/.mbsyncrc" 33 | [ -n "$MPOPRC" ] || MPOPRC="$HOME/.config/mpop/config" 34 | 35 | lastrun="${XDG_CONFIG_HOME:-$HOME/.config}/mutt/.mailsynclastrun" 36 | 37 | # Settings are different for MacOS (Darwin) systems. 38 | case "$(uname)" in 39 | Darwin) notify() { osascript -e "display notification \"$2\" with title \"$1\"" ;} ;; 40 | *) 41 | case "$(readlink -f /sbin/init)" in 42 | *systemd*|*openrc*) export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus ;; 43 | esac 44 | # remember if a display server is running since `ps` doesn't always contain a display 45 | pgrepoutput="$(pgrep -ax X\(\|org\|wayland\))" 46 | displays="$(echo "$pgrepoutput" | grep -wo "[0-9]*:[0-9]\+" | sort -u)" 47 | [ -z "$displays" ] && [ -d /tmp/.X11-unix ] && displays=$(cd /tmp/.X11-unix && for x in X*; do echo ":${x#X}"; done) 48 | 49 | notify() { [ -n "$pgrepoutput" ] && for x in ${displays:-:0}; do 50 | export DISPLAY="$x" 51 | notify-send --app-name="mutt-wizard" -- "$1" "$2" 52 | done ;} 53 | ;; 54 | esac 55 | 56 | # Check account for new mail. Notify if there is new content. 57 | syncandnotify() { 58 | case "$1" in 59 | imap) mbsync -q "$2" ;; 60 | pop) mpop -q "$2" ;; 61 | esac 62 | new=$(find\ 63 | "$HOME/.local/share/mail/$2/"[Ii][Nn][Bb][Oo][Xx]/new/ \ 64 | "$HOME/.local/share/mail/$2/"[Ii][Nn][Bb][Oo][Xx]/cur/ \ 65 | -type f -newer "$lastrun" 2> /dev/null) 66 | newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l) 67 | case 1 in 68 | $((newcount > 5)) ) 69 | echo "$newcount new mails for $2." >/dev/tty 70 | [ -z "$MAILSYNC_MUTE" ] && notify "New Mail!" "📬 $newcount new mails in \`$2\` account." 71 | ;; 72 | $((newcount > 0)) ) 73 | echo "$newcount new mail(s) for $2." >/dev/tty 74 | [ -z "$MAILSYNC_MUTE" ] && 75 | for file in $new; do 76 | # Extract and decode subject and sender from mail. 77 | subject=$(awk '/^Subject: / && ++n == 1,/^.*: / && ++i == 2' "$file" | head -n-1 | 78 | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | 79 | sed 's/^Subject: //' | tr -d '\n\t') 80 | from="$(sed -n "/^From:/ s|From: *|| p" "$file" | 81 | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)')" 82 | from="${from% *}" ; from="${from%\"}" ; from="${from#\"}" 83 | notify "📧$from:" "$subject" 84 | done 85 | ;; 86 | *) echo "No new mail for $2." ;; 87 | esac 88 | } 89 | 90 | allaccounts="$(grep -hs "^\(Channel\|account\)" "$MBSYNCRC" "$MPOPRC")" 91 | 92 | # Get accounts to sync. All if no argument. Prefix with `error` if non-existent. 93 | IFS=' 94 | ' 95 | if [ -z "$1" ]; then 96 | tosync="$allaccounts" 97 | else 98 | tosync="$(for arg in "$@"; do for availacc in $allaccounts; do 99 | [ "$arg" = "${availacc##* }" ] && echo "$availacc" && break 100 | done || echo "error $arg"; done)" 101 | fi 102 | 103 | for account in $tosync; do 104 | case $account in 105 | Channel*) syncandnotify imap "${account##* }" & ;; 106 | account*) syncandnotify pop "${account##* }" & ;; 107 | error*) echo "ERROR: Account ${account##* } not found." ;; 108 | esac 109 | done 110 | 111 | wait 112 | 113 | notmuch new --quiet 114 | 115 | #Create a touch file that indicates the time of the last run of mailsync 116 | touch "$lastrun" 117 | -------------------------------------------------------------------------------- /bin/mw: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -a 4 | 5 | prefix="/usr/local" 6 | maildir="${XDG_DATA_HOME:-$HOME/.local/share}/mail" 7 | muttshare="$prefix/share/mutt-wizard" 8 | cachedir="${XDG_CACHE_HOME:-$HOME/.cache}/mutt-wizard" 9 | muttrc="${XDG_CONFIG_HOME:-$HOME/.config}/mutt/muttrc" 10 | accdir="${XDG_CONFIG_HOME:-$HOME/.config}/mutt/accounts" 11 | msmtprc="${XDG_CONFIG_HOME:-$HOME/.config}/msmtp/config" 12 | msmtplog="${XDG_STATE_HOME:-$HOME/.local/state}/msmtp/msmtp.log" 13 | mbsyncrc="${MBSYNCRC:-$HOME/.mbsyncrc}" 14 | mpoprc="${XDG_CONFIG_HOME:-$HOME/.config}/mpop/config" 15 | imapnotify="${XDG_CONFIG_HOME:-$HOME/.config}/imapnotify" 16 | mpoptemp="$muttshare/mpop-temp" 17 | mbsynctemp="$muttshare/mbsync-temp" 18 | mutttemp="$muttshare/mutt-temp" 19 | msmtptemp="$muttshare/msmtp-temp" 20 | onlinetemp="$muttshare/online-temp" 21 | notmuchtemp="$muttshare/notmuch-temp" 22 | imapnotifytemp="$muttshare/imapnotify-temp" 23 | # With the use of templates, it's impossible to use parameter substitution. 24 | # Therefore, some default variables that might be otherwise overwritten are set 25 | # here. 26 | iport="993" 27 | sport="465" 28 | imapssl="IMAPS" 29 | tlsline="tls_starttls off" 30 | maxmes="0" 31 | 32 | alias mbsync='mbsync -c "$mbsyncrc"' 33 | 34 | # mbsync >=1.4.0 requires "Far/Near" rather than "Master/Slave." 35 | mbver="$(mbsync -v)" 36 | mbver="${mbver#* }" 37 | mbver="${mbver%.*}" 38 | # Comparing two float numbers in bash is a pain in the butt, so we get rid of 39 | # dots and turn them into nice integers 40 | mbver="${mbver/\./}" 41 | if [ "${mbver}" -gt 14 ]; then 42 | master="Far" 43 | slave="Near" 44 | else 45 | master="Master" 46 | slave="Slave" 47 | fi 48 | 49 | for x in "/etc/ssl/certs/ca-certificates.crt" \ 50 | "/etc/pki/tls/certs/ca-bundle.crt" "/etc/ssl/cert.pem" \ 51 | "/etc/ssl/ca-bundle.pem" "/etc/pki/tls/cacert.pem" \ 52 | "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" \ 53 | "/usr/local/share/ca-certificates/"; do 54 | [ -f "$x" ] && sslcert="$x" && break 55 | done || { echo "CA Certificate not found. Please install one or link it to /etc/ssl/certs/ca-certificates.crt" && exit 1; } 56 | 57 | checkbasics() { 58 | command -V gpg >/dev/null 2>&1 && GPG="gpg" || GPG="gpg2" 59 | PASSWORD_STORE_DIR="${PASSWORD_STORE_DIR:-$HOME/.password-store}" 60 | [ -r "$PASSWORD_STORE_DIR/.gpg-id" ] || { 61 | echo "First run \`pass init \` to set up a password archive." 62 | echo "(If you don't already have a GPG key pair, first run \`$GPG --full-generate-key\`.)" 63 | exit 1 64 | } 65 | } 66 | 67 | getaccounts() { accounts="$(find -L "$accdir" -type f 2>/dev/null | grep -o "\S*.muttrc" | sed "s|.*/\([0-9]-\)*||;s/\.muttrc$//" | nl)"; } 68 | 69 | list() { getaccounts && [ -n "$accounts" ] && echo "$accounts" || exit 1; } 70 | 71 | prepmsmtp() { 72 | mkdir -p "${msmtprc%/*}" "${msmtplog%/*}" 73 | ln -s "$msmtprc" "$HOME/.msmtprc" 2>/dev/null 74 | envsubst <"$msmtptemp" >>"$msmtprc" 75 | } 76 | 77 | prepmbsync() { 78 | mkdir -p "${mbsyncrc%/*}" 79 | [ -f "$mbsyncrc" ] && echo >>"$mbsyncrc" 80 | envsubst <"$mbsynctemp" >>"$mbsyncrc" 81 | } 82 | 83 | prepmpop() { 84 | mkdir -p "${mpoprc%/*}" 85 | envsubst <"$mpoptemp" >>"$mpoprc" 86 | } 87 | 88 | prepimapnotify() { 89 | mkdir -p "$imapnotify" ; envsubst < "$imapnotifytemp" >> "$imapnotify/$fulladdr.conf" 90 | } 91 | 92 | prepmutt() { 93 | mkdir -p "${muttrc%/*}" "$accdir" 94 | envsubst <"$mutttemp" >"$accdir/$fulladdr.muttrc" 95 | [ ! -f "$muttrc" ] && echo "# vim: filetype=neomuttrc" >"$muttrc" 96 | ! grep -q "^source.*mutt-wizard.muttrc" "$muttrc" && echo "source $muttshare/mutt-wizard.muttrc" >>"$muttrc" 97 | ! grep "^source.*.muttrc" "$muttrc" | grep -qv "$muttshare/mutt-wizard.muttrc" && echo "source $accdir/$fulladdr.muttrc" >>"$muttrc" 98 | echo "macro index,pager i$idnum 'source $accdir/$fulladdr.muttrc!;' \"switch to $fulladdr\"" >>"$muttrc" 99 | neomutt -v | grep -q lmdb && ! grep -q "^set header_cache_backend.*lmdb" "$muttrc" && echo "set header_cache_backend = \"lmdb\"" >>"$muttrc" 100 | } 101 | 102 | getprofiles() { 103 | safename="$(echo $fulladdr | sed 's/@/_/g')" 104 | case "$type" in 105 | online) 106 | folder="imaps://$login@$imap:$iport" 107 | extra="$(envsubst <"$onlinetemp")" 108 | ;; 109 | pop) prepmpop ;; 110 | *) 111 | case "$iport" in 112 | 1143) imapssl=None ;; 113 | 143) imapssl=STARTTLS ;; 114 | esac 115 | prepmbsync 116 | ;; 117 | esac 118 | prepmsmtp 119 | prepmutt 120 | prepnotmuch 121 | prepimapnotify 122 | } 123 | 124 | parsedomains() { 125 | serverinfo="$(grep "^${fulladdr#*@}" "$muttshare/domains.csv" 2>/dev/null)" 126 | 127 | [ -z "$serverinfo" ] && serverinfo="$(grep "$(echo "${fulladdr#*@}" | sed "s/\.[^\.]*$/\.\\\*/")" "$muttshare/domains.csv" 2>/dev/null)" 128 | 129 | IFS=, read -r service imapsugg iportsugg smtpsugg sportsugg </dev/null 154 | rm -f "$mbsyncrc"bu 155 | rm -rf "${cachedir:?}/${fulladdr:?}" "$accdir/$fulladdr.muttrc" "$accdir/"[0-9]-"$fulladdr.muttrc" 156 | sed -ibu "/\([0-9]-\)\?$fulladdr.muttrc/d" "$muttrc" 2>/dev/null 157 | rm -f "$muttrc"bu 158 | sed -ibu "/account $fulladdr$/,/^\(\s*$\|account\)/d" "$msmtprc" 2>/dev/null 159 | rm -f "$msmtprc"bu 160 | sed -ibu "/account $fulladdr$/,/^\(\s*$\|account\)/d" "$mpoprc" 2>/dev/null 161 | rm -f "$mpoprc"bu 162 | pass rm -f "$passprefix$fulladdr" >/dev/null 2>&1 163 | [ -n "${purge+x}" ] && safename="$(echo $fulladdr | sed 's/@/_/g')" && rm -rf "${cachedir:?}/${safename:?}" "${maildir:?}/${fulladdr:?}" 164 | } 165 | 166 | askinfo() { 167 | [ -z "$fulladdr" ] && echo "Give the full email address to add:" && 168 | read -r fulladdr 169 | while ! echo "$fulladdr" | grep -qE "^.+@.+\.[A-Za-z]+$"; do 170 | echo "$fulladdr is not a valid email address. Please retype the address:" 171 | read -r fulladdr 172 | done 173 | folder="$maildir/$fulladdr" 174 | getaccounts 175 | echo "$accounts" | grep -q "\s$fulladdr$" 2>/dev/null && 176 | { echo "$fulladdr has already been added" && exit 1; } 177 | { [ -z "$imap" ] || [ -z "$smtp" ]; } && parsedomains 178 | [ -z "$imap" ] && echo "Give your email server's IMAP address (excluding the port number):" && 179 | read -r imap 180 | [ -z "$smtp" ] && echo "Give your email server's SMTP address (excluding the port number):" && 181 | read -r smtp 182 | case $sport in 183 | 587) tlsline="# tls_starttls" ;; 184 | esac 185 | [ -z "$realname" ] && realname="${fulladdr%%@*}" 186 | [ -z "$passprefix" ] && passprefix="" 187 | hostname="${fulladdr#*@}" 188 | login="${login:-$fulladdr}" 189 | if [ -n "${password+x}" ] && [ ! -f "$PASSWORD_STORE_DIR/$passprefix$fulladdr.gpg" ]; then 190 | insertpass 191 | elif [ ! -f "$PASSWORD_STORE_DIR/$passprefix$fulladdr.gpg" ]; then 192 | getpass 193 | fi 194 | } 195 | 196 | insertpass() { 197 | printf "%s" "$password" | pass insert -fe "$passprefix$fulladdr" 198 | } 199 | 200 | errorexit() { 201 | echo "Log-on not successful." 202 | case "$imap" in 203 | imap.gmail.com) 204 | echo "This account with $service is using Google's Gmail servers, which disable all third-party applications without an application-specific password. 205 | Please be sure you are using OAUTH with your Gmail account, or better yet, stop using Gmail." 206 | ;; 207 | imap.mail.me.com) 208 | echo "This account with $service is using Apple's iCloud servers, which disable all non-Apple applications by default. 209 | Please be sure you either enable third-party applications, or create an app-specific password, or best of all, stop using Apple." 210 | ;; 211 | esac 212 | exit 1 213 | } 214 | 215 | getpass() { while :; do 216 | pass rm -f "$passprefix$fulladdr" >/dev/null 2>&1 217 | pass insert -f "$passprefix$fulladdr" && break 218 | done; } 219 | 220 | getboxes() { 221 | if [ -n "${force+x}" ]; then 222 | mailboxes="$(printf "INBOX\\nDrafts\\nJunk\\nTrash\\nSent\\nArchive")" 223 | else 224 | info="$(curl --location-trusted -s -m 5 --user "$login:$(pass "$passprefix$fulladdr")" --url "${protocol:-imaps}://$imap:${iport:-993}")" 225 | [ -z "$info" ] && errorexit 226 | mailboxes="$(echo "$info" | grep -v HasChildren | sed "s/.*\" //;s/\"//g" | tr -d '\r')" 227 | fi 228 | [ "$type" = "pop" ] && mailboxes="INBOX" 229 | for x in $( 230 | sed -n "/^macro.* i[0-9] / s/\(^macro.* i\| .*\)//gp " "$muttrc" 2>/dev/null | sort -u 231 | echo 0 232 | ); do 233 | idnum=$((idnum + 1)) 234 | [ "$idnum" -eq "$x" ] || break 235 | done 236 | toappend="mailboxes $(echo "$mailboxes" | sed "s/^/\"=/;s/$/\"/;s/'/\\\'/g" | paste -sd ' ' -)" 237 | } 238 | 239 | finalize() { 240 | echo "$toappend" >>"$accdir/$fulladdr.muttrc" 241 | [ "$type" != "online" ] && echo "$mailboxes" | xargs -I {} mkdir -p "$maildir/$fulladdr/{}/cur" "$maildir/$fulladdr/{}/tmp" "$maildir/$fulladdr/{}/new" 242 | mkdir -p "$cachedir/$safename/bodies" 243 | echo "$fulladdr (account #$idnum) added successfully." 244 | command -V urlview >/dev/null 2>&1 && [ ! -f "$HOME/.urlview" ] && echo "COMMAND \$BROWSER" >"$HOME/.urlview" 245 | return 0 246 | } 247 | 248 | prepnotmuch() { 249 | [ -z "$NOTMUCH_CONFIG" ] && NOTMUCH_CONFIG="$HOME/.notmuch-config" 250 | [ -f "$NOTMUCH_CONFIG" ] && return 0 251 | envsubst <"$notmuchtemp" >"$NOTMUCH_CONFIG" 252 | } 253 | 254 | togglecron() { 255 | cron="$(mktemp)" 256 | crontab -l >"$cron" 257 | if grep -q mailsync "$cron"; then 258 | echo "Removing automatic mailsync..." 259 | sed -ibu /mailsync/d "$cron" 260 | rm -f "$cron"bu 261 | else 262 | echo "Adding automatic mailsync every ${cronmin:-10} minutes..." 263 | echo "*/${cronmin:-10} * * * * $prefix/bin/mailsync" >>"$cron" 264 | fi && 265 | crontab "$cron" 266 | rm -f "$cron" 267 | } 268 | 269 | setact() { if [ -n "${action+x}" ] && [ "$action" != "$1" ]; then 270 | echo "Running $1 with $action..." 271 | echo "Incompatible options given. Only one action may be specified per run." 272 | exit 1 273 | else 274 | action="$1" 275 | fi; } 276 | 277 | mwinfo() { 278 | cat < minutes 288 | -T Toggle automatic mailsync 289 | -r Reorder account numbers 290 | 291 | Options allowed with -a: 292 | -u Account login name if not full address 293 | -n "Real name" to be on the email account 294 | -i IMAP/POP server address 295 | -I IMAP/POP server port 296 | -s SMTP server address 297 | -S SMTP server port 298 | -x Password for account (recommended to be in double quotes) 299 | -p Add for a POP server instead of IMAP. 300 | -P Pass Prefix (prefix of the file where password is stored) 301 | -X Delete an account's local email too when deleting. 302 | -o Configure address, but keep mail online. 303 | -f Assume typical English mailboxes without attempting log-on. 304 | 305 | NOTE: Once at least one account is added, you can run 306 | \`mbsync -a\` to begin downloading mail. 307 | 308 | To change an account's password, run \`pass edit '$passprefix'your@email.com\`. 309 | EOF 310 | } 311 | 312 | reorder() { 313 | tempfile="$(mktemp -u)" 314 | trap 'rm -f $tempfile' HUP INT QUIT TERM PWR EXIT 315 | echo "# Carefully reorder these accounts with the desired numbers in the first column. 316 | # DO NOT reorder rows or rename the accounts in the second column." >"$tempfile" 317 | sed -n " 318 | / i[0-9] / s?\(.* i\|'>"$tempfile" 320 | ${EDITOR:-vim} "$tempfile" || exit 1 321 | sed -i -e 's/#.*//' -e '/^$/d' "$tempfile" 322 | default="$(sort -n "$tempfile" | head -n 1)" 323 | default="${default#* }" 324 | sed -ibu " 325 | /.* i[0-9] .*.muttrc/d 326 | /^source.*accounts.*.muttrc/d 327 | " "$muttrc" 2>/dev/null 328 | rm -f "$muttrc"bu 329 | awk -v a="$accdir" -v d="$default" ' BEGIN { print "source "a"/"d".muttrc" } 330 | { 331 | print "macro index,pager i"$1" '\''source "a"/"$2".muttrc!;'\'' \"switch to "$2"\"" 332 | } 333 | ' "$tempfile" >>"$muttrc" 334 | } 335 | 336 | while getopts "rfpXlhodTYD:y:i:I:s:S:u:a:n:P:x:m:t:" o; do case "${o}" in 337 | l) setact list ;; 338 | r) setact reorder ;; 339 | d) setact delete ;; 340 | D) 341 | setact delete 342 | fulladdr="$OPTARG" 343 | ;; 344 | y) 345 | setact sync 346 | fulladdr="$OPTARG" 347 | ;; 348 | Y) setact sync ;; 349 | a) 350 | setact add 351 | fulladdr="$OPTARG" 352 | ;; 353 | i) 354 | setact add 355 | imap="$OPTARG" 356 | ;; 357 | I) 358 | setact add 359 | iport="$OPTARG" 360 | ;; 361 | s) 362 | setact add 363 | smtp="$OPTARG" 364 | ;; 365 | S) 366 | setact add 367 | sport="$OPTARG" 368 | ;; 369 | u) 370 | setact add 371 | login="$OPTARG" 372 | ;; 373 | n) 374 | setact add 375 | realname="$OPTARG" 376 | ;; 377 | P) 378 | setact add 379 | passprefix="$OPTARG" 380 | ;; 381 | m) 382 | setact add 383 | maxmes="$OPTARG" 384 | ;; 385 | o) 386 | setact add 387 | type="online" 388 | ;; 389 | p) 390 | setact add 391 | type="pop" 392 | protocol="pop3s" 393 | iport="${iport:-995}" 394 | ;; 395 | f) 396 | setact add 397 | force=True 398 | ;; 399 | x) 400 | setact add 401 | password="$OPTARG" 402 | ;; 403 | X) 404 | setact delete 405 | purge=True 406 | ;; 407 | t) 408 | setact toggle 409 | cronmin="$OPTARG" 410 | ;; 411 | T) setact toggle ;; 412 | h) setact info ;; 413 | \?) 414 | echo "See \`$(basename $0) -h\` for possible options and help." 415 | exit 1 416 | ;; 417 | esac done 418 | 419 | [ -z "$action" ] && action="info" 420 | 421 | case "$action" in 422 | list) list ;; 423 | add) checkbasics && askinfo && getboxes && getprofiles && finalize ;; 424 | delete) delete ;; 425 | sync) 426 | echo "\`mw -y\` and \`mw -Y\` are now deprecated and will be removed in a future update. Please switch to using \`mailsync\`." 427 | mailsync $fulladdr 428 | ;; 429 | toggle) togglecron ;; 430 | reorder) reorder ;; 431 | info) 432 | mwinfo 433 | exit 1 434 | ;; 435 | esac 436 | -------------------------------------------------------------------------------- /completion/_mutt-wizard.zsh: -------------------------------------------------------------------------------- 1 | #compdef mw 2 | 3 | _arguments \ 4 | '1:flag:->flags' \ 5 | '*:: :->args' 6 | 7 | case "$state" in 8 | flags) 9 | local -a opts 10 | opts=( 11 | '-a:Add an email address' 12 | '-l:List email addresses configured' 13 | '-d:Remove an already added address' 14 | '-D:Force remove account without confirmation' 15 | '-y:Sync mail for account by name' 16 | '-Y:Sync mail for all accounts' 17 | '-t:Toggle automatic mailsync every minutes' 18 | '-T:Toggle automatic mailsync every 10 minutes' 19 | '-r:order account numbers' 20 | ) 21 | _describe 'flags' opts 22 | ;; 23 | args) 24 | case $line[1] in 25 | -a) 26 | _alternative \ 27 | 'args: :(( 28 | -u\:"Account login name if not full address" 29 | -n\:"Real name to be on the email account" 30 | -i\:"IMAP/POP server address" 31 | -I\:"IMAP/POP server port" 32 | -s\:"SMTP server address" 33 | -S\:"SMTP server port" 34 | -x\:"Password for account (recommended to be in double quotes)" 35 | -P\:"Pass Prefix (prefix of the file where password is stored)" 36 | -p\:"Add for a POP server instead of IMAP." 37 | -X\:"Delete an account'"'"'s local email too when deleting." 38 | -o\:"Configure address, but keep mail online." 39 | -f\:"Assume typical English mailboxes without attempting log-on." 40 | ))' 41 | ;; 42 | -D|-y) 43 | _values 'email list' $(mw -l | cut -f2) 2>/dev/null 44 | esac 45 | esac 46 | -------------------------------------------------------------------------------- /lib/openfile: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Helps open a file with xdg-open from mutt in a external program without weird side effects. 4 | tempdir="${XDG_CACHE_HOME:-$HOME/.cache}/mutt-wizard/files" 5 | file="$tempdir/${1##*/}" 6 | [ "$(uname)" = "Darwin" ] && opener="open" || opener="setsid -f xdg-open" 7 | mkdir -p "$tempdir" 8 | cp -f "$1" "$file" 9 | $opener "$file" >/dev/null 2>&1 10 | find "${tempdir:?}" -mtime +1 -type f -delete 11 | -------------------------------------------------------------------------------- /mailsync.1: -------------------------------------------------------------------------------- 1 | .TH MAILSYNC 1 2 | .SH NAME 3 | mailsync \- sync mail accounts set up with 4 | .B mw. 5 | .SH SYNOPSIS 6 | .B mailsync 7 | [ 8 | .I OPTIONS 9 | ]... [ 10 | .I ACCOUNTS 11 | ] 12 | .SH DESCRIPTION 13 | .B mailsync 14 | syncs the mail of all accounts set up with 15 | .B 16 | mw, 17 | or if account names are given, syncs only those accounts. 18 | 19 | .B 20 | mailsync 21 | is a wrapper for 22 | .B mbsync 23 | and 24 | .B 25 | mpop, 26 | but also automatically reindexes new mail with 27 | .B notmuch, 28 | gives notifications if new mail is found and can also be set as a cronjob to sync and index mail quietly in the background. 29 | .SH COMMANDS 30 | .TP 31 | .B mailsync 32 | sync all mail accounts and notify user if there is new mail 33 | .TP 34 | .B mailsync account@example.org 35 | only sync the 36 | .B account@example.org 37 | account. 38 | .SH CONFIGURATION 39 | While 40 | .B 41 | mailsync 42 | gives notifications on the arrival of new mail by default, this can be diabled by setting the variable 43 | .I 44 | MAILSYNC_MUTE=1. 45 | .SH AUTHORS 46 | Written by Luke Smith originally in 2018. 47 | .SH LICENSE 48 | GPLv3 49 | .SH SEE ALSO 50 | .BR mw (1), 51 | .BR neomutt (1), 52 | .BR neomuttrc (1) 53 | .BR mbsync (1), 54 | .BR mpop (1), 55 | .BR msmtp (1), 56 | .BR notmuch (1), 57 | .BR abook (1) 58 | -------------------------------------------------------------------------------- /mw.1: -------------------------------------------------------------------------------- 1 | .TH MW 1 mutt-wizard 2 | .SH NAME 3 | mw \- mutt-wizard \- autoconfigure email accounts for neomutt and isync 4 | .SH SYNOPSIS 5 | .B mw 6 | [ 7 | .I OPTIONS 8 | ] 9 | .SH DESCRIPTION 10 | .B mw 11 | takes a user email account and sets up a terminal-based email interface for it with 12 | .B neomutt. 13 | This can include offline email with 14 | .B isync/mbsync 15 | and configs for 16 | .B msmtp 17 | for sending mail, and also passwords automatically encrypted and stored with 18 | .B pass. 19 | .SH COMMANDS 20 | .TP 21 | .B -a your@email.com 22 | add an email address 23 | .TP 24 | .B -l 25 | list all email accounts configured by mutt-wizard 26 | .TP 27 | .B -d 28 | pick an already configured account and remove its configuration 29 | .TP 30 | .B -D your@email.com 31 | remove a configured account without confirmation 32 | .TP 33 | .B -y your@email.com 34 | download and upload mail for an email account 35 | .TP 36 | .B -Y 37 | sync all email accounts 38 | .TP 39 | .B -t 15 40 | toggle a cronjob that syncs your mail every 15 minutes (or any other number under 60) 41 | .TP 42 | .B -T 43 | toggle a cronjob without specifying minutes between sync 44 | .TP 45 | .B -r 46 | reorder account shortcut numbers 47 | .SH OPTIONS FOR ADDING ACCOUNTS 48 | These can be specified on the command line, otherwise, you will be prompted for what is necessary. mutt-wizard knows the IMAP/SMTP server information for most email providers, so specifying them is usually redundant. 49 | .TP 50 | .B -u billy 51 | Account logon/username if required and different from email address. 52 | .TP 53 | .B -n Billy 54 | Real name which will appear in emails. Should be put in quotes if multiple words. 55 | .TP 56 | .B -m number 57 | Set a maximum number of messages to be stored offline. 58 | .TP 59 | .B -i 60 | IMAP/POP server address 61 | .TP 62 | .B -I 63 | IMAP/POP server port (assumed to be 993 for IMAP and 995 for POP if not specified) 64 | .TP 65 | .B -s 66 | SMTP server address 67 | .TP 68 | .B -S 69 | SMTP server port (assumed to be 465 if not specified) 70 | .TP 71 | .B -x 72 | Account password. You will be prompted for the password interactively if this option is not given. 73 | .TP 74 | .B -P 75 | Pass Prefix. The password will be stored using pass at 76 | .SH OTHER OPTIONS 77 | .TP 78 | .B -f 79 | Force account creation and guess mailboxes without attempting to connect to server. Otherwise if connection cannot be made, the configured account settings will not be persistent. 80 | .TP 81 | .B -o 82 | Create settings for an account to be used online only without mail syncing abilities. Without 83 | .B -f 84 | connection will still be attempted in setup to discover mailboxes. 85 | .TP 86 | .B -X 87 | When removing an email profile with either 88 | .I -d 89 | or 90 | .I -D, 91 | also delete the local mail (will not delete the mail on the server). 92 | .TP 93 | .B -p 94 | Use POP protocol instead of IMAP. Requires 95 | .I mpop 96 | to download mail after configuration. Server details can still be given with the 97 | .I -i 98 | and 99 | .I -I 100 | options as if it were a IMAP. 101 | .SH DETAILS 102 | .TP 103 | .B mailsync 104 | mutt-wizard calls a script 105 | .I mailsync 106 | to sync mail. This script additionally indexes new mail with notmuch and gives you a notification if new mail has arrived. If you want to bypass its additional features, you can always just run 107 | .I mbsync -a 108 | to sync your mail directly. 109 | .TP 110 | .B Mail location 111 | If the user chooses to keep offline email with 112 | .B isync, 113 | it will be kept in 114 | .I ~/.local/share/mail/. 115 | .B notmuch 116 | can be used to index and search this mail by giving this directory when first running 117 | .B notmuch setup. 118 | If you have not set up notmuch before, mutt-wizard will automatically set it up in the background the first time you add an account. 119 | .TP 120 | .B muttrc files 121 | mutt-wizard will create a muttrc file for each created account holding account-specific details. These will appear in 122 | .I ~/.config/mutt/accounts/ 123 | and can be edited by the user if needbe. Note that the mutt-wizard will also source these files and create the bindings to switch between them, and these will appear in your default 124 | .I ~/.config/mutt/muttrc 125 | file. 126 | .TP 127 | .B Mail deletion 128 | mutt-wizard's delete action will delete configuration files and 129 | .I not 130 | downloaded mail for safety (and time)'s sake. If you want to delete downloaded mail, do so manually by removing it from the directory above. 131 | .TP 132 | .B Default settings 133 | The mutt-wizard has many default settings that focus on making it aesthetically pleasing and supplying more vim-like bindings. These can be found in 134 | .I /usr/local/share/mutt-wizard/mutt-wizard.muttrc 135 | and the default mailcap file can be found in 136 | .I 137 | /usr/local/share/mutt-wizard/mailcap. 138 | Any of these settings can be overwritten in 139 | .I ~/.config/mutt/muttrc, 140 | but be mindful that your overriding binds should appear after the 141 | .I 142 | mutt-wizard.muttrc 143 | file is sourced. 144 | .TP 145 | .B Detecting server settings 146 | mutt-wizard has a repository of email services and their server information kept in 147 | .I /usr/local/share/mutt-wizard/domains.csv 148 | which is used to automatically configure email settings. 149 | If your email provider is not found there, it will prompt you to input your email service's IMAP and SMTP server information which can usually be found by searching online. 150 | 151 | If you would like to help develop mutt-wizard for others, you are invited to add this service information to 152 | .I domains.csv 153 | on mutt-wizard's Github or Gitlab pages. 154 | .TP 155 | .B Gmail accounts 156 | Google will require you to allow "less-secure" (third party) applications or remove two-factor authentication in order to access their IMAP servers to download your mail. If you use Gmail, be sure to handle this before running mutt-wizard . 157 | .TP 158 | .B Enterprise and university accounts 159 | Many universities and businesses might host their domain's email via Google or another service. This often requires a special IMAP/SMTP-specific password that you must generate and use. Again, mutt-wizard can handle these systems, but only once they've been set up. 160 | .TP 161 | .B Password decryption 162 | mutt-wizard uses 163 | .I pass 164 | and therefore 165 | .I gpg 166 | to decrypt your passwords. Provided your GPG key has a password, this might mean that you will be prompted for your GPG password the first time you sync or send mail in a session. Once your password is cached, it might also expire later as well. 167 | 168 | Because of this I strongly recommend the program 169 | .I pam-gnupg 170 | which automatically unlocks your GPG password on login and keeps it active, thus giving you, with mutt-wizard, secure access to all your email accounts on your system without ever having to input a password. 171 | 172 | If you don't want to use this program, you can also increase the cache time of an inputted GPG password with the 173 | .I default-cache-ttl 174 | and 175 | .I max-cache-ttl 176 | variables in your 177 | .I 178 | gpg-agent.conf. 179 | .SH MUTT-WIZARD'S NEOMUTT CONFIGURATION 180 | Here is a list of not only mutt-wizard's particular defaults, but what you need to get the most out of email accounts configured with mutt-wizard. 181 | .TP 182 | .B Color 183 | The mutt-wizard's default settings add color to messages in the index and color mail details to make them easier to see. New mail, in addition to being marked by the typical N, will also be bold. 184 | .TP 185 | .B Movement with h/j/k/l 186 | Use vim keys to move down 187 | .I j 188 | or up 189 | .I k 190 | in mail, while 191 | .I l 192 | opens mail, then the attachment view, then an attachment, while 193 | .I h 194 | is the reverse. 195 | While mail is open, go to next or previous mail with 196 | .I J 197 | and 198 | .I K. 199 | In the mail index, 200 | .I d 201 | and 202 | .I u 203 | go down and up by a half page and 204 | .I gg 205 | and 206 | .I G 207 | go to the very top and very bottom. 208 | .TP 209 | .B Search mail 210 | If you have 211 | .B notmuch 212 | configured with your proper mail directory (see above), you may run 213 | .I ctrl-f 214 | to search for mail containing any given sequence. 215 | Even without notmuch, 216 | .I L 217 | limits mail, showing only those with the given sequence in the subject while 218 | .I A 219 | shows all mail (same as limiting to "all"). 220 | .TP 221 | .B Deleting mail 222 | .I D 223 | deletes mail, while 224 | .I U 225 | undeletes it (type in mail number to get to deleted mail). Note that 226 | .I S 227 | saves your mailbox, finalizing deletion. If you have a 228 | .I Trash 229 | box, deleted mail is moved there. If you want it to skip that and simply be deleted, comment out or remove the 230 | .I set trash 231 | line in that account's muttrc. 232 | .TP 233 | .B Send mail 234 | .I m 235 | creates a new mail message; 236 | .I r 237 | replies to the selected message; 238 | .I R 239 | replies all to the selected message and 240 | .I f 241 | forwards the selected message. 242 | .TP 243 | .B Compose mail screen 244 | Once you write mail and save the buffer you will be brought to the compose screen. Press 245 | .I a 246 | to add attachments, use 247 | .I s/t/c/b/d 248 | to change the subject/to/CC/BCC/description. Press 249 | .I S 250 | to change the signature/encryption. Press 251 | .I y 252 | to send the mail. 253 | .TP 254 | .B Saving and autocompleting email addresses with abook 255 | Install the optional dependency abook and you will be able to save the sender's email address with 256 | .I a. 257 | Once this is done, when you are typing in any email/contact prompt, you may press 258 | .I Tab 259 | to find contacts matching your input. Although abook is often used with mutt, it is also a useful program in its own right. 260 | .TP 261 | .B Switching and moving mail between mailboxes 262 | The 263 | .I g 264 | key can be paired with several other keys to automatically move to another mailbox: gi: Inbox; gs: Sent; gd: Drafts; ga: Archive; gS: Spam; gj: Junk; gt: Trash. These bindings will only be present for accounts that have the boxes in question. Instead of 265 | .I g, 266 | you can also press 267 | .I C 268 | to copy mail or 269 | .I M 270 | to move mail to the same boxes. 271 | .TP 272 | .B Switching between accounts 273 | mutt-wizard can configure as many as nine accounts each numbered by the lowest available number when configured. Press 274 | .I i 275 | followed by an account's number to change to that account: i2, i5, etc. 276 | .I ctrl-b 277 | to open a menu to select a url you want to open in you browser. 278 | .TP 279 | .B Sidebar 280 | mutt-wizard enables the sidebar by default which displays your account's boxes with mail tallies. 281 | .I B 282 | will toggle the sidebar. Move up and down in it with 283 | .I ctrl-k/j. 284 | Open a box with 285 | .I ctrl-o. 286 | .TP 287 | .B More information 288 | Remember that you can press 289 | .I ? 290 | at any time in neomutt to get a list of all key-bindings and functions. This list can also vary for different context menus. 291 | .SH AUTHORS 292 | Written by Luke Smith originally in 2018. 293 | .SH LICENSE 294 | GPLv3 295 | .SH SEE ALSO 296 | .BR mailsync (1), 297 | .BR neomutt (1), 298 | .BR neomuttrc (1) 299 | .BR mbsync (1), 300 | .BR mpop (1), 301 | .BR msmtp (1), 302 | .BR notmuch (1), 303 | .BR abook (1) 304 | -------------------------------------------------------------------------------- /share/domains.csv: -------------------------------------------------------------------------------- 1 | ADDRESS,IMAP,imap port,SMTP,smtp port 2 | 126.com,imap.126.com,993,smtp.126.com,587 3 | 163.com,imap.163.com,993,smtp.163.com,587 4 | 3nt3.de,mail.3nt3.de,993,mail.3nt3.de,465 5 | 420blaze.it,mail.cock.li,993,mail.cock.li,587 6 | 8chan.co,mail.cock.li,993,mail.cock.li,587 7 | aaathats3as.com,mail.cock.li,993,mail.cock.li,587 8 | accountant.com,imap.mail.com,993,smtp.mail.com,587 9 | activist.com,imap.mail.com,993,smtp.mail.com,587 10 | ad.unsw.edu.au,outlook.office365.com,993,smtp.office365.com,587 11 | adexec.com,imap.mail.com,993,smtp.mail.com,587 12 | airmail.cc,mail.cock.li,993,mail.cock.li,587 13 | allergist.com,imap.mail.com,993,smtp.mail.com,587 14 | alumni.bits-pilani.ac.in,imap.gmail.com,993,smtp.gmail.com,465 15 | alumni.com,imap.mail.com,993,smtp.mail.com,587 16 | alumni.unitn.it,imap.gmail.com,993,smtp.gmail.com,587 17 | alumnidirector.com,imap.mail.com,993,smtp.mail.com,587 18 | alunos.utfpr.edu.br,imap.gmail.com,993,smtp.gmail.com,587 19 | anche.no,mail.autistici.org,993,smtp.autistici.org,465 20 | angelic.com,imap.mail.com,993,smtp.mail.com,587 21 | anu.edu.au,outlook.office365.com,993,smtp.office365.com,587 22 | aol.com,imap.aol.com,993,smtp.aol.com,465 23 | appraiser.net,imap.mail.com,993,smtp.mail.com,587 24 | aquilenet.fr,imap.aquilenet.fr,993,smtp.aquilenet.fr,587 25 | archaeologist.com,imap.mail.com,993,smtp.mail.com,587 26 | arcticmail.com,imap.mail.com,993,smtp.mail.com,587 27 | artlover.com,imap.mail.com,993,smtp.mail.com,587 28 | asia.com,imap.mail.com,993,smtp.mail.com,587 29 | auctioneer.net,imap.mail.com,993,smtp.mail.com,587 30 | autistiche.org,mail.autistici.org,993,smtp.autistici.org,465 31 | autistici.org,mail.autistici.org,993,smtp.autistici.org,465 32 | autograf.pl,imap.poczta.onet.pl,993,smtp.poczta.onet.pl,465 33 | autoproduzioni.net,mail.autistici.org,993,smtp.autistici.org,465 34 | bartender.net,imap.mail.com,993,smtp.mail.com,587 35 | bastardi.net,mail.autistici.org,993,smtp.autistici.org,465 36 | beaumccartney.xyz,mail.beaumccartney.xyz,993,mail.beaumccartney.xyz,465 37 | bguth.de,wp300.webpack.hosteurope.de,993,wp300.webpack.hosteurope.de,587 38 | bigpond.com,imap.telstra.com,143,smtp.telstra.com,587 39 | bikerider.com,imap.mail.com,993,smtp.mail.com,587 40 | billycarlyle.uk,mail.muny.us,993,mail.muny.us,465 41 | biomed.ee.ethz.ch,mail.ethz.ch,993,mail.ethz.ch,587 42 | birdlover.com,imap.mail.com,993,smtp.mail.com,587 43 | bjoernguthphotography.de,wp300.webpack.hosteurope.de,993,wp300.webpack.hosteurope.de,587 44 | bocken.org,mail.bocken.org,993,mail.bocken.org,587 45 | brew-meister.com,imap.mail.com,993,smtp.mail.com,587 46 | bruttocarattere.org,mail.autistici.org,993,smtp.autistici.org,465 47 | btinternet.com,mail.btinternet.com,993,mail.btinternet.com,587 48 | calstatela.edu,outlook.office365.com,993,smtp.office365.com,587 49 | campus.fct.unl.pt,imap.gmail.com,993,smtp.gmail.com,587 50 | canaglie.net,mail.autistici.org,993,smtp.autistici.org,465 51 | canaglie.org,mail.autistici.org,993,smtp.autistici.org,465 52 | carleton.ca,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 53 | cash4u.com,imap.mail.com,993,smtp.mail.com,587 54 | cedars.xyz,mail.cedars.xyz,993,mail.cedars.xyz,465 55 | ceng.metu.edu.tr,imap.ceng.metu.edu.tr,993,mailhost.ceng.metu.edu.tr,587 56 | cerex.no,mail.cerex.no,993,mail.cerex.no,465 57 | cheerful.com,imap.mail.com,993,smtp.mail.com,587 58 | chef.net,imap.mail.com,993,smtp.mail.com,587 59 | chemist.com,imap.mail.com,993,smtp.mail.com,587 60 | chrissx.ga,chrissx.ga,993,chrissx.ga,25 61 | clarkson.edu,imap.gmail.com,993,smtp.gmail.com,587 62 | clasnet.sunyocc.edu,outlook.office365.com,993,smtp.office365.com,587 63 | clerk.com,imap.mail.com,993,smtp.mail.com,587 64 | clubmember.org,imap.mail.com,993,smtp.mail.com,587 65 | cmail.carleton.ca,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 66 | cn.edu,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 67 | cocaine.ninja,mail.cock.li,993,mail.cock.li,587 68 | cock.email,mail.cock.li,993,mail.cock.li,587 69 | cock.li,mail.cock.li,993,mail.cock.li,587 70 | cock.lu,mail.cock.li,993,mail.cock.li,587 71 | coldmail.xyz,mail.sheriffmediocre.xyz,993,mail.sheriffmediocre.xyz,465 72 | collector.org,imap.mail.com,993,smtp.mail.com,587 73 | columnist.com,imap.mail.com,993,smtp.mail.com,587 74 | comcast.net,imap.comcast.net,993,smtp.comcast.net,465 75 | comic.com,imap.mail.com,993,smtp.mail.com,587 76 | computer4u.com,imap.mail.com,993,smtp.mail.com,587 77 | consultant.com,imap.mail.com,993,smtp.mail.com,587 78 | contractor.net,imap.mail.com,993,smtp.mail.com,587 79 | coolsite.net,imap.mail.com,993,smtp.mail.com,587 80 | counsellor.com,imap.mail.com,993,smtp.mail.com,587 81 | cryptolab.net,mail.autistici.org,993,smtp.autistici.org,465 82 | cumallover.me,mail.cock.li,993,mail.cock.li,587 83 | cyberservices.com,imap.mail.com,993,smtp.mail.com,587 84 | datentopf.org,mail.datentopf.org,993,mail.datentopf.org,587 85 | deliveryman.com,imap.mail.com,993,smtp.mail.com,587 86 | dicksinhisan.us,mail.cock.li,993,mail.cock.li,587 87 | dicksinmyan.us,mail.cock.li,993,mail.cock.li,587 88 | diplomats.com,imap.mail.com,993,smtp.mail.com,587 89 | dismail.de,imap.dismail.de,993,smtp.dismail.de,465 90 | disroot.org,disroot.org,993,disroot.org,587 91 | distruzione.org,mail.autistici.org,993,smtp.autistici.org,465 92 | domeneshop.no,imap.domeneshop.no,993,smtp.domeneshop.no,587 93 | dorriseaton.com,outlook.office365.com,993,smtp.office365.com,587 94 | dr.com,imap.mail.com,993,smtp.mail.com,587 95 | duke.edu,outlook.office365.com,993,smtp.office365.com,587 96 | e.email,mail.ecloud.global,993,mail.ecloud.global,587 97 | email.arizona.edu,imap.gmail.com,993,smtp.gmail.com,587 98 | email.com,imap.mail.com,993,smtp.mail.com,587 99 | eneco.com,outlook.office365.com,993,smtp.office365.com,587 100 | engineer.com,imap.mail.com,993,smtp.mail.com,587 101 | erciyes.edu.tr,mail.erciyes.edu.tr,993,mail.erciyes.edu.tr,587 102 | ethancoe.com,mail.privateemail.com,993,mail.privateemail.com,465 103 | ethz.ch,mail.ethz.ch,993,mail.ethz.ch,587 104 | etu.sorbonne-universite.fr,imaps.sorbonne-universite.fr,993,smtps.sorbonne-universite.fr,465 105 | etu.upmc.fr,imaps.sorbonne-universite.fr,993,smtps.sorbonne-universite.fr,465 106 | europe.com,imap.mail.com,993,smtp.mail.com,587 107 | ex-studenti.unitn.it,imap.gmail.com,993,smtp.gmail.com,587 108 | faks.no,mail.uniweb.no,993,mail.uniweb.no,465 109 | fastmail.com,imap.fastmail.com,993,smtp.fastmail.com,465 110 | fastmail.fm,imap.fastmail.com,993,smtp.fastmail.com,465 111 | fct.unl.pt,imap.gmail.com,993,smtp.gmail.com,587 112 | fidei.email,box.fidei.email,993,box.fidei.email,465 113 | firemail.cc,mail.cock.li,993,mail.cock.li,587 114 | forpsi.com,imap.forpsi.com,993,smtp.forpsi.com,465 115 | forthnet.gr,mail.forthnet.gr,993,smtp-auth.forthnet.gr,465 116 | freedom.nl,imap.freedom.nl,993,smtp.freedom.nl,465 117 | freedom.xyz,imap.nixnet.email,143,smtp.nixnet.email,587 118 | fsmpi.rwth-aachen.de,mail.fsmpi.rwth-aachen.de,993,mail.fsmpi.rwth-aachen.de,465 119 | fsu-jena,exchange.uni-jena.de,993,smtp.uni-jena.de,587 120 | fz-juelich.de,imap.fz-juelich.de,993,mail.fz-juelich.de,587 121 | gcc.edu,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 122 | getbackinthe.kitchen,mail.cock.li,993,mail.cock.li,587 123 | ghalv.no,mail.ghalv.no,993,mail.ghalv.no,465 124 | gmail.com,imap.gmail.com,993,smtp.gmail.com,587 125 | gmx.*,imap.gmx.net,993,mail.gmx.net,587 126 | go2.pl,poczta.o2.pl,993,poczta.o2.pl,465 127 | goat.si,mail.cock.li,993,mail.cock.li,587 128 | googlemail.com,imap.googlemail.com,993,smtp.googlemail.com,587 129 | gordon.edu,outlook.office365.com,993,smtp.office365.com,587 130 | grrlz.net,mail.autistici.org,993,smtp.autistici.org,465 131 | hacari.*,mail.autistici.org,993,smtp.autistici.org,465 132 | helsinki.fi,outlook.office365.com,993,smtp.helsinki.fi,587 133 | hhu.de,mail.hhu.de,993,mail.hhu.de,465 134 | hitler.rocks,mail.cock.li,993,mail.cock.li,587 135 | horsefucker.org,mail.cock.li,993,mail.cock.li,587 136 | hostgator,gator4171.hostgator.com,993,gator4171.hostgator.com,587 137 | hotmail.*,outlook.office365.com,993,smtp.office365.com,587 138 | hs-mittweida.de,mail.hs-mittweida.de,993,mail.hs-mittweida.de,465 139 | humbug.pw,imap.migadu.com,993,smtp.migadu.com,587 140 | hushmail.com,imap.hushmail.com,993,smtp.hushmail.com,465 141 | icloud.com,imap.mail.me.com,993,smtp.mail.me.com,587 142 | ik.me,mail.infomaniak.com,993,mail.infomaniak.com,587 143 | illinois.edu, imap.gmail.com,993,smtp.gmail.com,465 144 | in.tum.de,mail.in.tum.de,993,mail.in.tum.de,465 145 | iname.com,imap.mail.com,993,smtp.mail.com,587 146 | inbox.lv,mail.inbox.lv,993,mail.inbox.lv,465 147 | inf.h-brs.de,imap.inf.h-brs.de,993,smtp.inf.h-brs.de,587 148 | infomaniak.com,imap.infomaniak.com,993,imap.infomaniak.com,587 149 | insiberia.net,mail.autistici.org,993,smtp.autistici.org,465 150 | insicuri.net,mail.autistici.org,993,smtp.autistici.org,465 151 | interactio.io,imap.gmail.com,993,smtp.gmail.com,587 152 | interia.*,poczta.interia.pl,993,poczta.interia.pl,465 153 | inventati.org,mail.autistici.org,993,smtp.autistici.org,465 154 | ionos.de,imap.ionos.de,993,smtp.ionos.de,587 155 | itu.dk,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 156 | iu.edu,imap.exchange.iu.edu,993,mail-relay.iu.edu,587 157 | kalli.st,mail.kalli.st,993,kalli.st,587 158 | kean.edu,imap.gmail.com,993,smtp.gmail.com,587 159 | kipras.org,mail.kipras.org,993,mail.kipras.org,587 160 | krutt.org,mail.autistici.org,993,smtp.autistici.org,465 161 | kth.se,webmail.kth.se,993,smtp.kth.se,587 162 | lancaster.ac.uk,outlook.office365.com,993,smtp.office365.com,587 163 | larbs.xyz,mail.larbs.xyz,993,mail.larbs.xyz,587 164 | lavabit.com,lavabit.com,993,lavabit.com,587 165 | librem.one,imap.librem.one,993,smtp.librem.one,465 166 | linux.monster,imap.nixnet.email,143,smtp.nixnet.email,587 167 | linuxmail.org,imap.mail.com,993,smtp.mail.com,587 168 | live.com,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 169 | live.de,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 170 | live.rhul.ac.uk,outlook.office365.com,993,smtp.office365.com,587 171 | logorroici.org,mail.autistici.org,993,smtp.autistici.org,465 172 | loves.dicksinhisan.us,mail.cock.li,993,mail.cock.li,587 173 | loves.dicksinmyan.us,mail.cock.li,993,mail.cock.li,587 174 | lukesmith.xyz,mail.cedars.xyz,993,mail.cedars.xyz,465 175 | luther.edu,imap.gmail.com,993,smtp.gmail.com,587 176 | mac.com,imap.mail.me.com,993,smtp.mail.me.com,587 177 | mace.ac.in,imap.gmail.com,993,smtp.gmail.com,587 178 | mail.com,imap.mail.com,993,smtp.mail.com,587 179 | mail.de,imap.mail.de,993,smtp.mail.de,465 180 | mail.mcgill.ca,outlook.office365.com,993,smtp.office365.com,587 181 | mail.polimi.it,outlook.office365.com,993,smtp.office365.com,587 182 | mail.ru,imap.mail.ru,993,smtp.mail.ru,465 183 | mail.utoronto.ca,outlook.office365.com,993,smtp.office365.com,587 184 | mailbox.org,imap.mailbox.org,993,smtp.mailbox.org,587 185 | mailbox.tu-dresden.de,msx.tu-dresden.de,993,msx.tu-dresden.de,587 186 | mailfence.com,imap.mailfence.com,993,smtp.mailfence.com,465 187 | mailo.com,mail.mailo.com,993,mail.mailo.com,465 188 | marquette.edu,outlook.office365.com,993,smtp.office365.com,587 189 | me.com,imap.mail.me.com,993,smtp.mail.me.com,587 190 | memeware.net,mail.cock.li,993,mail.cock.li,587 191 | metu.edu.tr,imap.metu.edu.tr,993,smtp.metu.edu.tr,465 192 | mit.edu,imap.exchange.mit.edu,993,outgoing.mit.edu,465 193 | ml1.net,imap.fastmail.com,993,smtp.fastmail.com,465 194 | mortemale.org,mail.autistici.org,993,smtp.autistici.org,465 195 | msn.com,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 196 | muny.us,mail.muny.us,993,mail.muny.us,465 197 | myself.com,imap.mail.com,993,smtp.mail.com,587 198 | myseneca.ca,outlook.office365.com,993,outlook.office365.com,587 199 | narod.ru,imap.yandex.com,993,smtp.yandex.com,587 200 | national.shitposting.agency,mail.cock.li,993,mail.cock.li,587 201 | ncsu.edu,imap.gmail.com,993,smtp.gmail.com,587 202 | netcourrier.com,mail.netcourrier.com,993,mail.netcourrier.com,465 203 | nigge.rs,mail.cock.li,993,mail.cock.li,587 204 | niser.ac.in,imap.gmail.com,993,smtp.gmail.com,465 205 | nixnet.email,imap.nixnet.email,143,smtp.nixnet.email,587 206 | nixnet.xyz,imap.nixnet.email,143,smtp.nixnet.email,587 207 | nixnetmail.com,imap.nixnet.email,143,smtp.nixnet.email,587 208 | nuke.africa,mail.cock.li,993,mail.cock.li,587 209 | nyu.edu,imap.gmail.com,993,smtp.gmail.com,587 210 | o2.pl,poczta.o2.pl,993,poczta.o2.pl,465 211 | odu.edu,imap.gmail.com,993,smtp.gmail.com,587 212 | one.com,imap.one.com,993,send.one.com,465 213 | onenetbeyond.org,mail.autistici.org,993,smtp.autistici.org,465 214 | onet.com.pl,imap.poczta.onet.pl,993,smtp.poczta.onet.pl,465 215 | onet.eu,imap.poczta.onet.pl,993,smtp.poczta.onet.pl,465 216 | onet.pl,imap.poczta.onet.pl,993,smtp.poczta.onet.pl,587 217 | online.de,imap.1und1.de,993,smtp.1und1.de,465 218 | op.pl,imap.poczta.onet.pl,993,smtp.poczta.onet.pl,465 219 | opoczta.pl,imap.poczta.onet.pl,993,smtp.poczta.onet.pl,465 220 | orange.fr,imap.orange.fr,993,smtp.orange.fr,465 221 | outlook.*,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 222 | outlook.es,outlook.office365.com,993,smtp.office365.com,587 223 | parabolas.xyz,mail.parabolas.xyz,993,mail.parabolas.xyz,587 224 | paranoici.org,mail.autistici.org,993,smtp.autistici.org,465 225 | paranoid.email,imap.paranoid.email,993,smtp.paranoid.email,25 226 | paranoid.network,imap.nixnet.email,143,smtp.nixnet.email,587 227 | poczta.fm,poczta.interia.pl,993,poczta.interia.pl,465 228 | poczta.onet.pl,imap.poczta.onet.pl,993,smtp.poczta.onet.pl,465 229 | polimi.it,outlook.office365.com,993,smtp.office365.com,587 230 | polito.it,mail.polito.it,993,mail.polito.it,465 231 | post.com,imap.mail.com,993,smtp.mail.com,587 232 | posteo.*,posteo.de,993,posteo.de,465 233 | privateemail.com,mail.privateemail.com,993,mail.privateemail.com,443 234 | privacy.xyz,imap.nixnet.email,143,smtp.nixnet.email,587 235 | privacyrequired.com,mail.autistici.org,993,smtp.autistici.org,465 236 | prokonto.pl,poczta.o2.pl,993,poczta.o2.pl,465 237 | purelymail.com,imap.purelymail.com,993,smtp.purelymail.com,465 238 | pwned.life,imap.nixnet.email,143,smtp.nixnet.email,587 239 | qq.com,imap.qq.com,993,smtp.qq.com,587 240 | rape.lol,mail.cock.li,993,mail.cock.li,587 241 | redchan.it,mail.cock.li,993,mail.cock.li,587 242 | resch.pw,mail.resch.pw,993,mail.resch.pw,587 243 | riseup.net,mail.riseup.net,993,mail.riseup.net,465 244 | rmcacs.org,imap.gmail.com,993,smtp.gmail.com,587 245 | runbox.com,mail.runbox.com,993,mail.runbox.com,587 246 | rwth-aachen.de,mail.rwth-aachen.de,993,mail.rwth-aachen.de,587 247 | sapo.pt,imap.sapo.pt,993,smtp.sapo.pt,587 248 | seznam.cz,imap.seznam.cz,993,smtp.seznam.cz,465 249 | sheridancollege.ca,outlook.office365.com,993,smtp.office365.com,587 250 | shu.edu.cn,imap.shu.edu.cn,143,smtp.shu.edu.cn,25 251 | sina.cn,imap.sina.cn,993,smtp.sina.cn,587 252 | sina.com,imap.sina.com,993,smtp.sina.com,587 253 | sis.hust.edu.vn,outlook.office365.com,993,smtp.office365.com,587 254 | smail.inf.h-brs.de,imap.inf.h-brs.de,993,smtp.inf.h-brs.de,587 255 | sms.ed.ac.uk,pod51015.outlook.com,993,pod51015.outlook.com,587 256 | snopyta.org,mail.snopyta.org,993,mail.snopyta.org,465 257 | sohu.com,imap.sohu.com,143,smtp.sohu.com,25 258 | southwales.ac.uk,imap.gmail.com,993,smtp.gmail.com,587 259 | spoko.pl,imap.poczta.onet.pl,993,smtp.poczta.onet.pl,465 260 | st.amu.edu.pl,outlook.office365.com,993,smtp.office365.com,587 261 | stevens.edu,imap.outlook.com,993,smtp.outlook.com,587 262 | stronzi.org,mail.autistici.org,993,smtp.autistici.org,465 263 | stud.feec.vutbr.cz,imap.stud.feec.vutbr.cz,993,smtp.stud.feec.vutbr.cz,587 264 | stud.tu-darmstadt.de,imap.stud.tu-darmstadt.de,993,smtp.tu-darmstadt.de,465 265 | stud.uis.no,outlook.office365.com,993,smtp.office365.com,587 266 | stud.uni-bamberg.de,outlook.office365.com,993,smtp.office365.com,587 267 | stud.uni-saarland.de,mail.hiz-saarland.de,993,mail.hiz-saarland.de,465 268 | student.binadarma.ac.id,imap.gmail.com,993,smtp.gmail.com,587 269 | student.ethz.ch,mail.ethz.ch,993,mail.ethz.ch,587 270 | student.rmit.edu.au,outlook.office365.com,993,smtp.office365.com,587 271 | student.tuwien.ac.at,mail.student.tuwien.ac.at,993,mail.student.tuwien.ac.at,587 272 | student.uj.edu.pl,outlook.office365.com,993,smtp.office365.com,587 273 | student.utwente.nl,imap.gmail.com,993,smtp.gmail.com,587 274 | studenti.unipi.it,outlook.office365.com,993,smtp.office365.com,587 275 | studenti.unitn.it,imap.gmail.com,993,smtp.gmail.com,587 276 | students.rmcacs.org,imap.gmail.com,993,smtp.gmail.com,587 277 | students.southwales.ac.uk,imap.gmail.com,993,smtp.gmail.com,587 278 | studio.unibo.it,outlook.office365.com,993,smtp.office365.com,587 279 | studserv.uni-leipzig.de,studserv.uni-leipzig.de,993,studserv.uni-leipzig.de,25 280 | subvertising.org,mail.autistici.org,993,smtp.autistici.org,465 281 | t-online.de,secureimap.t-online.de,993,securesmtp.t-online.de,465 282 | techie.com,imap.mail.com,993,smtp.mail.com,587 283 | tecnico.ulisboa.pt,mail.tecnico.ulisboa.pt,993,mail.tecnico.ulisboa.pt,465 284 | teknik.io,mail.teknik.io,993,mail.teknik.io,587 285 | telenet.be,imap.telenet.be,993,smtp.telenet.be,587 286 | tfwno.gf,mail.cock.li,993,mail.cock.li,587 287 | thamognya.com,mail.thamognya.com,993,mail.thamognya.com,587 288 | thunix.net,thunix.net,143,thunix.net,25 289 | tlen.pl,poczta.o2.pl,993,poczta.o2.pl,465 290 | tlu.edu,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 291 | tquad.ai,imap.mail.eu-west-1.awsapps.com,993,smtp.mail.eu-west-1.awsapps.com,465 292 | tu-harburg.de,mail.tu-harburg.de,993,mail.tu-harburg.de,587 293 | tuhh.de,mail.tu-harburg.de,993,mail.tu-harburg.de,587 294 | tum.de,xmail.mwn.de,993,postout.lrz.de,587 295 | txstate.edu,outlook.office365.com,993,smtp.office365.com,587 296 | ua.pt,outlook.office365.com,993,mail.ua.pt,25 297 | uach.mx,imap.gmail.com,993,smtp.gmail.com,587 298 | ucalgary.ca,outlook.office365.com,993,smtp.office365.com,587 299 | ucdavis.edu,imap.gmail.com,993,smtp.gmail.com,587 300 | uclive.ac.nz,outlook.office365.com,993,smtp.office365.com,587 301 | ucsb.edu,imap.gmail.com,993,smtp.gmail.com,587 302 | ucsc.edu,imap.gmail.com,993,smtp.gmail.com,587 303 | ukr.net,imap.ukr.net,993,smtp.ukr.net,465 304 | umbc.edu,imap.gmail.com,993,smtp.gmail.com,587 305 | uni-duesseldorf.de,mail.hhu.de,993,mail.hhu.de,465 306 | uni-jena.de,imap.uni-jena.de,993,smtp.uni-jena.de,587 307 | uni.edu.pe,imap.gmail.com,993,smtp.gmail.com,587 308 | uni.strath.ac.uk,outlook.office365.com,993,smtp.office365.com,587 309 | unilodz.eu,outlook.office365.com,993,smtp.office365.com,587 310 | unitn.it,imap.gmail.com,993,smtp.gmail.com,587 311 | unitybox.de,mail.unity-mail.de,993,mail.unity-mail.de,587 312 | univ-ubs.fr,partage.univ-ubs.fr,993,partage.univ-ubs.fr,587 313 | uoregon.edu,imap.uoregon.edu,993,smtp.uoregon.edu,587 314 | uqtr.ca,outlook.office365.com,993,smtp.office365.com,587 315 | usa.com,imap.mail.com,993,smtp.mail.com,587 316 | usp.br,imap.gmail.com,993,smtp.gmail.com,465 317 | utas.edu.au,outlook.office365.com,993,smtp.office365.com,587 318 | utdallas.edu,outlook.office365.com,993,smtp.office365.com,587 319 | uw.edu,imap.gmail.com,993,smtp.gmail.com,465 320 | uwcad.it,imap.gmail.com,993,smtp.gmail.com,465 321 | ux.uis.no,imap.ux.uis.no,993,broremann.ux.uis.no,25 322 | uymail.com,imap.mail.com,993,smtp.mail.com,587 323 | vip.onet.pl,imap.poczta.onet.pl,993,smtp.poczta.onet.pl,465 324 | vivaldi.net,imap.vivaldi.net,993,smtp.vivaldi.net,587 325 | vp.pl,imap.poczta.onet.pl,993,smtp.poczta.onet.pl,465 326 | vt.edu,imap.gmail.com,993,smtp.gmail.com,587 327 | vxempire.xyz,vxempire.xyz,993,vxempire.xyz,465 328 | waifu.club,mail.cock.li,993,mail.cock.li,587 329 | wanadoo.fr,imap.orange.fr,993,smtp.orange.fr,465 330 | wants.dicksinhisan.us,mail.cock.li,993,mail.cock.li,587 331 | wants.dicksinmyan.us,mail.cock.li,993,mail.cock.li,587 332 | web.de,imap.web.de,993,smtp.web.de,587 333 | wit.edu,outlook.office365.com,993,smtp.office365.com,587 334 | wp.pl,imap.wp.pl,993,smtp.wp.pl,465 335 | writeme.com,imap.mail.com,993,smtp.mail.com,587 336 | ya.ru,imap.yandex.com,993,smtp.yandex.com,587 337 | yahoo.*,imap.mail.yahoo.com,993,smtp.mail.yahoo.com,587 338 | yandex.*,imap.yandex.com,993,smtp.yandex.com,587 339 | ymail.com,imap.mail.yahoo.com,993,smtp.mail.yahoo.com,465 340 | zaclys.net,mail.zaclys.net,993,mail.zaclys.net,465 341 | zju.edu.cn,imap.zju.edu.cn,993,smtp.zju.edu.cn,994 342 | zoho.com,imap.zoho.com,993,smtp.zoho.com,465 343 | zohomail.eu,imap.zoho.eu,993,smtp.zoho.eu,465 344 | -------------------------------------------------------------------------------- /share/imapnotify-temp: -------------------------------------------------------------------------------- 1 | { 2 | "host": "$imap", 3 | "port": $iport, 4 | "tls": true, 5 | "tlsOptions": { 6 | "rejectUnauthorized": false 7 | }, 8 | "username": "$login", 9 | "password": "", 10 | "passwordCmd": "pass $passprefix$fulladdr", 11 | "onNewMail": "mailsync", 12 | "onNewMailPost": "", 13 | "boxes": [ "INBOX" ] 14 | } 15 | 16 | -------------------------------------------------------------------------------- /share/mailcap: -------------------------------------------------------------------------------- 1 | text/plain; $EDITOR %s ; 2 | text/html; /usr/local/lib/mutt-wizard/openfile %s ; nametemplate=%s.html 3 | text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump -width=1024 %s; nametemplate=%s.html; copiousoutput; 4 | image/*; /usr/local/lib/mutt-wizard/openfile %s ; 5 | video/*; setsid mpv --quiet %s &; copiousoutput 6 | audio/*; mpv %s ; 7 | application/pdf; /usr/local/lib/mutt-wizard/openfile %s ; 8 | application/pgp-encrypted; gpg -d '%s'; copiousoutput; 9 | application/pgp-keys; gpg --import '%s'; copiousoutput; 10 | application/x-subrip; $EDITOR %s ; 11 | -------------------------------------------------------------------------------- /share/mbsync-temp: -------------------------------------------------------------------------------- 1 | IMAPStore $fulladdr-remote 2 | Host $imap 3 | Port $iport 4 | User $login 5 | PassCmd "pass $passprefix$fulladdr" 6 | AuthMechs LOGIN 7 | SSLType $imapssl 8 | CertificateFile $sslcert 9 | 10 | MaildirStore $fulladdr-local 11 | Subfolders Verbatim 12 | Path $maildir/$fulladdr/ 13 | Inbox $maildir/$fulladdr/INBOX 14 | 15 | Channel $fulladdr 16 | Expunge Both 17 | $master :$fulladdr-remote: 18 | $slave :$fulladdr-local: 19 | Patterns * !"[Gmail]/All Mail" !"*fts-flatcurve*" !"*virtual*" 20 | Create Both 21 | SyncState * 22 | MaxMessages $maxmes 23 | ExpireUnread no 24 | # End profile 25 | -------------------------------------------------------------------------------- /share/mpop-temp: -------------------------------------------------------------------------------- 1 | account $fulladdr 2 | tls on 3 | user $login 4 | host $imap 5 | port $iport 6 | timeout 10 7 | delivery maildir $maildir/$fulladdr/INBOX 8 | passwordeval pass $passprefix$fulladdr 9 | -------------------------------------------------------------------------------- /share/msmtp-temp: -------------------------------------------------------------------------------- 1 | account $fulladdr 2 | host $smtp 3 | port $sport 4 | from $fulladdr 5 | user $login 6 | passwordeval "pass $passprefix$fulladdr" 7 | auth on 8 | tls on 9 | tls_trust_file $sslcert 10 | logfile $msmtplog 11 | $tlsline 12 | -------------------------------------------------------------------------------- /share/mutt-temp: -------------------------------------------------------------------------------- 1 | # vim: filetype=neomuttrc 2 | # muttrc file for account $fulladdr 3 | set real_name = "$realname" 4 | set from = "$fulladdr" 5 | set sendmail = "msmtp -a $fulladdr" 6 | alias me $realname <$fulladdr> 7 | set folder = "$folder" 8 | set header_cache = "$cachedir/$safename/headers" 9 | set message_cachedir = "$cachedir/$safename/bodies" 10 | set mbox_type = Maildir 11 | set hostname = "$hostname" 12 | source $muttshare/switch.muttrc 13 | set spool_file = "+INBOX" 14 | set postponed = "+Drafts" 15 | set trash = "+Trash" 16 | set record = "+Sent" 17 | $extra 18 | macro index o "mailsync $fulladdr" "sync $fulladdr" 19 | -------------------------------------------------------------------------------- /share/mutt-wizard.muttrc: -------------------------------------------------------------------------------- 1 | # vim: filetype=neomuttrc 2 | # This file contains all of mutt-wizard's default settings. 3 | # mutt-wizard will have this file sourced from your muttrc. 4 | # In the interest of seamless updating, do not edit this file. 5 | # If you want to override any settings, set those in your muttrc. 6 | set send_charset="us-ascii:utf-8" 7 | set mailcap_path = $HOME/.config/mutt/mailcap:/usr/local/share/mutt-wizard/mailcap:$mailcap_path 8 | set mime_type_query_command = "file --mime-type -b %s" 9 | set date_format="%y/%m/%d %I:%M%p" 10 | set index_format="%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c)" 11 | set sort = 'reverse-date' 12 | set smtp_authenticators = 'gssapi:login' 13 | set query_command = "abook --mutt-query '%s'" 14 | set rfc2047_parameters = yes 15 | set sleep_time = 0 # Pause 0 seconds for informational messages 16 | set markers = no # Disables the `+` displayed at line wraps 17 | set mark_old = no # Unread mail stay unread until read 18 | set mime_forward = no # mail body is forwarded as text 19 | set forward_attachments = yes # attachments are forwarded with mail 20 | set wait_key = no # mutt won't ask "press key to continue" 21 | set fast_reply # skip to compose when replying 22 | set fcc_attach # save attachments with the body 23 | set forward_format = "Fwd: %s" # format of subject when forwarding 24 | set forward_quote # include message in forwards 25 | set reverse_name # reply as whomever it was to 26 | set include # include message in replies 27 | set mail_check=60 # to avoid lags using IMAP with some email providers (yahoo for example) 28 | auto_view text/html # automatically show html (mailcap uses lynx) 29 | auto_view application/pgp-encrypted 30 | #set display_filter = "tac | sed '/\\\[-- Autoview/,+1d' | tac" # Suppress autoview messages. 31 | alternative_order text/plain text/enriched text/html 32 | 33 | bind index,pager i noop 34 | bind index,pager g noop 35 | bind index \Cf noop 36 | bind index,pager M noop 37 | bind index,pager C noop 38 | 39 | # General rebindings 40 | bind index gg first-entry 41 | bind index j next-entry 42 | bind index k previous-entry 43 | bind attach view-mailcap 44 | bind attach l view-mailcap 45 | bind editor noop 46 | bind index G last-entry 47 | bind pager,attach h exit 48 | bind pager j next-line 49 | bind pager k previous-line 50 | bind pager l view-attachments 51 | bind index D delete-message 52 | bind index U undelete-message 53 | bind index L limit 54 | bind index h noop 55 | bind index l display-message 56 | bind index,query tag-entry 57 | #bind browser h goto-parent 58 | macro browser h '..' "Go to parent folder" 59 | bind index,pager H view-raw-message 60 | bind browser l select-entry 61 | bind browser gg top-page 62 | bind browser G bottom-page 63 | bind pager gg top 64 | bind pager G bottom 65 | bind index,pager,browser d half-down 66 | bind index,pager,browser u half-up 67 | bind index,pager S sync-mailbox 68 | bind index,pager R group-reply 69 | bind index \031 previous-undeleted # Mouse wheel 70 | bind index \005 next-undeleted # Mouse wheel 71 | bind pager \031 previous-line # Mouse wheel 72 | bind pager \005 next-line # Mouse wheel 73 | bind editor complete-query 74 | 75 | macro index,pager gi "=INBOX" "go to inbox" 76 | macro index,pager Mi ";=INBOX" "move mail to inbox" 77 | macro index,pager Ci ";=INBOX" "copy mail to inbox" 78 | macro index,pager gd "=Drafts" "go to drafts" 79 | macro index,pager Md ";=Drafts" "move mail to drafts" 80 | macro index,pager Cd ";=Drafts" "copy mail to drafts" 81 | macro index,pager gj "=Junk" "go to junk" 82 | macro index,pager Mj ";=Junk" "move mail to junk" 83 | macro index,pager Cj ";=Junk" "copy mail to junk" 84 | macro index,pager gt "=Trash" "go to trash" 85 | macro index,pager Mt ";=Trash" "move mail to trash" 86 | macro index,pager Ct ";=Trash" "copy mail to trash" 87 | macro index,pager gs "=Sent" "go to sent" 88 | macro index,pager Ms ";=Sent" "move mail to sent" 89 | macro index,pager Cs ";=Sent" "copy mail to sent" 90 | macro index,pager ga "=Archive" "go to archive" 91 | macro index,pager Ma ";=Archive" "move mail to archive" 92 | macro index,pager Ca ";=Archive" "copy mail to archive" 93 | 94 | #set crypt_auto_sign = yes 95 | #set crypt_opportunistic_encrypt = yes 96 | #set pgp_self_encrypt = yes 97 | #set pgp_default_key = 'your@gpgemailaddre.ss' 98 | macro index \eg "unset wait_keygpg --list-secret-keys; printf 'Enter email ID of user to publish: '; read eID; printf 'Enter fingerprint of GPG key to publish: '; read eFGPT; $prefix/libexec/gpg-wks-client --create \\\$eFGPT \\\$eID | msmtp --read-envelope-from --read-recipients -a $fulladdr" "publish GPG key to WKS provider" 99 | macro index \eh "$prefix/libexec/gpg-wks-client --receive | msmtp --read-envelope-from --read-recipients -a $fulladdr" "confirm GPG publication" 100 | 101 | macro index,pager a "set my_pipe_decode=\$pipe_decode pipe_decodeabook --add-emailset pipe_decode=\$my_pipe_decode; unset my_pipe_decode" "add the sender address to abook" 102 | macro index \Cr "T~UN." "mark all messages as read" 103 | macro index O "mailsync" "run mailsync to sync all mail" 104 | macro index \Cf "unset wait_keyprintf 'Enter a search term to find with notmuch: '; read x; echo \$x >\"\${XDG_CACHE_HOME:-\$HOME/.cache}/mutt_terms\"~i \"\`notmuch search --output=messages \$(cat \"\${XDG_CACHE_HOME:-\$HOME/.cache}/mutt_terms\") | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/g for@a; s/\\$/\\\\\\$/g for@a;print@a' \`\"" "show only messages matching a notmuch pattern" 105 | macro index A "all\n" "show all messages (undo limit)" 106 | 107 | # Sidebar mappings 108 | set sidebar_visible = yes 109 | set sidebar_width = 20 110 | set sidebar_short_path = yes 111 | set sidebar_next_new_wrap = yes 112 | set mail_check_stats 113 | set sidebar_format = '%D%?F? [%F]?%* %?N?%N/? %?S?%S?' 114 | bind index,pager \Ck sidebar-prev 115 | bind index,pager \Cj sidebar-next 116 | bind index,pager \Co sidebar-open 117 | bind index,pager \Cp sidebar-prev-new 118 | bind index,pager \Cn sidebar-next-new 119 | bind index,pager B sidebar-toggle-visible 120 | 121 | # Default index colors: 122 | color index yellow default '.*' 123 | color index_author red default '.*' 124 | color index_number blue default 125 | color index_subject cyan default '.*' 126 | 127 | # New mail is boldened: 128 | color index brightyellow black "~N" 129 | color index_author brightred black "~N" 130 | color index_subject brightcyan black "~N" 131 | 132 | # Tagged mail is highlighted: 133 | color index brightyellow blue "~T" 134 | color index_author brightred blue "~T" 135 | color index_subject brightcyan blue "~T" 136 | 137 | # Flagged mail is highlighted: 138 | color index brightgreen default "~F" 139 | color index_subject brightgreen default "~F" 140 | color index_author brightgreen default "~F" 141 | 142 | # Other colors and aesthetic settings: 143 | mono bold bold 144 | mono underline underline 145 | mono indicator reverse 146 | mono error bold 147 | color normal default default 148 | color indicator brightblack white 149 | color sidebar_highlight red default 150 | color sidebar_divider brightblack black 151 | color sidebar_flagged red black 152 | color sidebar_new green black 153 | color error red default 154 | color tilde black default 155 | color message cyan default 156 | color markers red white 157 | color attachment white default 158 | color search brightmagenta default 159 | color status brightyellow black 160 | color hdrdefault brightgreen default 161 | color quoted green default 162 | color quoted1 blue default 163 | color quoted2 cyan default 164 | color quoted3 yellow default 165 | color quoted4 red default 166 | color quoted5 brightred default 167 | color signature brightgreen default 168 | color bold black default 169 | color underline black default 170 | 171 | # Regex highlighting: 172 | color header brightmagenta default "^From" 173 | color header brightcyan default "^Subject" 174 | color header brightwhite default "^(CC|BCC)" 175 | color header blue default ".*" 176 | color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses 177 | color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL 178 | color body green default "\`[^\`]*\`" # Green text between ` and ` 179 | color body brightblue default "^# \.*" # Headings as bold blue 180 | color body brightcyan default "^## \.*" # Subheadings as bold cyan 181 | color body brightgreen default "^### \.*" # Subsubheadings as bold green 182 | color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow 183 | color body brightcyan default "[;:][-o][)/(|]" # emoticons 184 | color body brightcyan default "[;:][)(|]" # emoticons 185 | color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon? 186 | color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon? 187 | color body red default "(BAD signature)" 188 | color body cyan default "(Good signature)" 189 | color body brightblack default "^gpg: Good signature .*" 190 | color body brightyellow default "^gpg: " 191 | color body brightyellow red "^gpg: BAD signature from.*" 192 | mono body bold "^gpg: Good signature" 193 | mono body bold "^gpg: BAD signature from.*" 194 | color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]" 195 | -------------------------------------------------------------------------------- /share/notmuch-temp: -------------------------------------------------------------------------------- 1 | [database] 2 | path=$maildir 3 | [user] 4 | name=$realname 5 | primary_email=$fulladdr 6 | [new] 7 | tags=unread;inbox; 8 | ignore=.mbsyncstate;.uidvalidity 9 | [search] 10 | exclude_tags=deleted;spam; 11 | [maildir] 12 | synchronize_flags=true 13 | [crypto] 14 | gpg_path=$GPG 15 | -------------------------------------------------------------------------------- /share/online-temp: -------------------------------------------------------------------------------- 1 | set imap_user = "$login" 2 | set imap_pass = "`pass $passprefix$fulladdr`" 3 | set ssl_starttls = yes 4 | set ssl_force_tls = yes 5 | -------------------------------------------------------------------------------- /share/switch.muttrc: -------------------------------------------------------------------------------- 1 | # vim: filetype=neomuttrc 2 | 3 | # This is an embarrassing and hacky file that unbinds a bunch of binds between 4 | # switching accounts. It is called each time an account is changed. 5 | 6 | unset hostname 7 | unmy_hdr Organization 8 | unmailboxes * 9 | unalternates * 10 | unset signature 11 | --------------------------------------------------------------------------------