commit 8706728cf97484295922c745a5af887d406f0f1a
parent 4f3757b1560b29d590c9b359b250b32ac8cf1bdf
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:
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/bin/rpsyncmail b/bin/rpsyncmail
@@ -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
diff --git a/view.c b/view.c
@@ -30,7 +30,8 @@ enum {
PRINT_HEADER = 0x01,
PRINT_BODY = 0x02,
PRINT_VALUE = 0x04,
- PRINT_NOMIME = 0x08
+ PRINT_NOMIME = 0x08,
+ IS_SUBPART = 0x10
};
void
@@ -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) {
@@ -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;