{"id":35146859,"url":"https://github.com/aligrudi/neatmail","last_synced_at":"2025-12-28T14:06:18.676Z","repository":{"id":45680105,"uuid":"48568469","full_name":"aligrudi/neatmail","owner":"aligrudi","description":"A text-mode mail client","archived":false,"fork":false,"pushed_at":"2024-04-25T11:43:54.000Z","size":74,"stargazers_count":37,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-08T01:03:04.292Z","etag":null,"topics":["c","mail-client","mbox"],"latest_commit_sha":null,"homepage":"http://litcave.rudi.ir/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aligrudi.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2015-12-25T05:56:36.000Z","updated_at":"2024-12-31T16:31:25.000Z","dependencies_parsed_at":"2024-04-25T12:53:20.924Z","dependency_job_id":null,"html_url":"https://github.com/aligrudi/neatmail","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/aligrudi/neatmail","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligrudi%2Fneatmail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligrudi%2Fneatmail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligrudi%2Fneatmail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligrudi%2Fneatmail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aligrudi","download_url":"https://codeload.github.com/aligrudi/neatmail/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligrudi%2Fneatmail/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28100635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-28T02:00:05.685Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","mail-client","mbox"],"created_at":"2025-12-28T14:03:14.707Z","updated_at":"2025-12-28T14:06:18.670Z","avatar_url":"https://github.com/aligrudi.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"NEATMAIL\n========\n\nNeatmail is a noninteractive mail client.  It generates listings of,\nand executes ex-like commands on messages in mailboxes in mbox format.\n\nNeatmail provides the following commands (when invoked without an\nargument, most of them show a summary of supported options).\n\n* mk: generate a listing of messages in an mbox.\n* ex: execute the specified commands on an mbox.\n* pg: page a message in an mbox.\n* pn: prune an mbox (shorten messages).\n* ns: check for new messages among several mboxes.\n* me: MIME-encode message headers.\n\nFor each message, the mk command writes tab-separated values of some\nof its headers.  This set of headers and the maximum length of each of\nthem can be specified with -0 option.  In addition to message headers,\n~subject (more compact subject header with thread indentation), ~size\n(message size), and ~date (receiving date) can also be given.  Each\nline begins with the value of the status header of the message (N if\nit is missing) and its message number.  Neatmail assumes that the\nstatus of a message, if present, is one or two capital letters (the\nfirst letter may be N for new, R for read, and O for old; the second\nletter, if present, may indicate user-defined categories).  This is an\nexample invocation of mk:\n\n$ neatmail mk -0 10from:20~subject: -st test/test.mbox\nN00000\t[A \u003ca@a.eu\u003e]\t[Message from A      ]\nN00001\t[B \u003cb@b.eu\u003e]\t[Message from B      ]\nN00002\t[C \u003cc@c.eu\u003e]\t[Message from C      ]\n\nThe ex command reads a list of commands from the standard input and\nexecutes them on a given mbox file.  It ignores all input lines except\nthose beginning with a colon or a capital letter.  Lines beginning\nwith a capital letter like \"R100 ...\", change the value of the status\nheader of the message whose number follows the letter.  It also marks\nthe current message.  Lines beginning with a colon are named commands.\nThe list of named commands are as follows:\n\n* rm: remove the message.\n* cp: copy the message to another mbox.\n* mv: move the message to another mbox.\n* hd, set: change the value of the given header of the message.\n* ft, filt: filter the message through the given command.\n* w: write the mbox.\n* g, g!: ex-like global command.\n* tj: join threads by modifying \"Reply-To\" headers.\n* ch: chop the message at the specified offset in kilobytes.\n\nThese commands act on the current message by default (if applicable),\nbut different messages may be specified using ex-like addresses.  For\ninstance, \"2,5rm\" removes messages 2 through 5.  Addresses may contain\nsearch patterns, like \"/pattern/rm\", in which the pattern is a POSIX\nextended regular expression (the same applies to global command\npatterns like \"%g/pattern/rm\").  Search patterns are matched to the\nsubject field of message headers, except when the pattern is \"^field:\nvalue\", in which it is matched against the specified header field\ninstead.\n\nIn the following example, ex removes message 1, moves all messages\nwhose subjects match \".*neatmail.*\" to mail.mbox file, and updates the\nmbox.\n\n$ neatmail ex new.mbox \u003c\u003cEOF\nO000\nO001\n:rm\nR003\nR002\nN004\n:%g/^subject:.*neatmail.*/mv mail.mbox\n:w\nEOF\n\nSUGGESTED USAGE\n===============\n\nGenerate a message listing (see mk options):\n$ neatmail mk -st -r inbox \u003einbox.nm\n\nOpen inbox.nm in an editor, change the status field of\nmessages, and append ex commands.\n\nPage, reply, or forward messages (see pg options):\n$ neatmail pg -m -h from: -h subject: -h to: -h cc: 23@inbox \u003email\n\nExecute the commands specified in inbox.nm:\n$ (cat inbox.nm; echo \":w\") | neatmail ex inbox\n\nIt is more convenient to place these commands in a script.  For\nfetching and sending messages, I use https://github.com/aligrudi/neatpop3\nand https://github.com/aligrudi/neatsmtp.\n\nLARGE MBOXES\n============\n\nMbox files can gradually get very large, particularly because of\nmessages with large attachments.  This makes Neatmail commands slow.\nTo reduce the size of such files, I move old messages to new, archival\nmboxes using :mv ex command.  Then, I use the pn command to obtain\nsmaller versions of these mbox files by removing message bodies and\nunnecessary headers (I use a Makefile to update them automatically):\n\n$ neatmail pn -H -s0 old \u003eold.i\n\nNote that the original messages are kept just in case their contents\nare needed.  Neatmail commands can read multiple mbox files.  This\nmakes it possible to generate a mail listing of the main mbox and\npruned files:\n\n$ neatmail mk -m6 -st -r inbox old.i \u003einbox.nm\n\nThe -m option forces mk to include the first few letters of the file\nthat contains this message, like \"R0020@old.i\", which means the 20th\nmessage in the old.i mbox file (it does so only for messages not in\nthe first given mbox file).  To obtain the contents of the message,\nthe original file can be read.  For instance, the following command\nprints the 20th message in old:\n\n$ neatmail pg 20@old\n\nTo make pg faster for large mbox files, pn includes a Neatmail-Source\nheader to indicate the exact position of the original message (before\npruning).  When accessing the message, pg reads it from the location\nindicated by Neatmail-Source, if the header is present and -s is\nprovided.  Because the offset of the message is stored in\nNeatmail-Source, the whole mbox need not be read and it is much faster\n(compare pg -s 20@old.i and pg 20@old in the above example).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faligrudi%2Fneatmail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faligrudi%2Fneatmail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faligrudi%2Fneatmail/lists"}