tMany changes: - rohrpost - A commandline mail client to change the world as we see it.
(HTM) git clone git://r-36.net/rohrpost
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 8706728cf97484295922c745a5af887d406f0f1a
(DIR) parent 4f3757b1560b29d590c9b359b250b32ac8cf1bdf
(HTM) Author: Christoph Lohmann <20h@r-36.net>
Date: Tue, 25 Mar 2014 19:28:10 +0100
Many changes:
* Don't print headers in subparts.
* Do dsync over 443 abstraction.
Diffstat:
bin/rpsyncmail | 2 +-
view.c | 8 ++++++--
2 files changed, 7 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/bin/rpsyncmail b/bin/rpsyncmail
t@@ -1,7 +1,7 @@
#!/bin/sh
export DOVECOT_PRESERVE_ENVS="SSH_AGENT_PID SSH_AUTH_SOCK"
-dsynccmd="-u chrissi mirror ssh -i /home/chrissi/.ssh/id_rsa chrissi@mail.r-36.net dsync -u chrissi"
+dsynccmd="-u chrissi mirror ssh -p 443 -i /home/chrissi/.ssh/id_rsa chrissi@mail.r-36.net dsync -u chrissi"
if [ "$1" = "mb" ] || [ $# -eq 0 ];
then
(DIR) diff --git a/view.c b/view.c
t@@ -30,7 +30,8 @@ enum {
PRINT_HEADER = 0x01,
PRINT_BODY = 0x02,
PRINT_VALUE = 0x04,
- PRINT_NOMIME = 0x08
+ PRINT_NOMIME = 0x08,
+ IS_SUBPART = 0x10
};
void
t@@ -137,7 +138,8 @@ view_printpart(char *id, mime_t *mime, llist_t *dhdrs, llist_t *partl,
inpartl = 1;
if (dhdrs != NULL && !(options & PRINT_BODY) &&
- (partl == NULL || inpartl)) {
+ (partl == NULL || inpartl) &&
+ !(options & IS_SUBPART)) {
didprint = 0;
if (!strcasecmp(dhdrs->first->key, "all")) {
forllist(mime->hdrs, helem) {
t@@ -179,6 +181,8 @@ view_printpart(char *id, mime_t *mime, llist_t *dhdrs, llist_t *partl,
if (mime->parts->len > 0) {
alpartl = NULL;
+ options |= IS_SUBPART;
+
if (!strncasecmp(mime->ct, "multipart/alternative", 21) &&
(partl == NULL || inpartl)) {
textplainid = NULL;