[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-mailutils] Error in redirect sieve action [SOLVED]
From: |
Sergey Poznyakoff |
Subject: |
Re: [bug-mailutils] Error in redirect sieve action [SOLVED] |
Date: |
Tue, 05 Jul 2005 14:33:37 +0300 |
Sergey Poznyakoff <address@hidden> wrote:
> It should be easy to fix, I'll get back to you later on
> this subject.
Here it goes:
Index: libsieve/actions.c
===================================================================
RCS file: /cvsroot/mailutils/mailutils/libsieve/actions.c,v
retrieving revision 1.25
diff -p -u -r1.25 actions.c
--- libsieve/actions.c 17 May 2005 13:13:36 -0000 1.25
+++ libsieve/actions.c 5 Jul 2005 11:30:09 -0000
@@ -113,14 +113,23 @@ sieve_get_message_sender (message_t msg,
return rc;
rc = envelope_sender (envelope, NULL, 0, &size);
- if (rc)
- return rc;
+ if (rc == 0)
+ {
+ if (!(text = malloc (size + 1)))
+ return ENOMEM;
+ envelope_sender (envelope, text, size + 1, NULL);
+ }
+ else
+ {
+ header_t hdr = NULL;
+ message_get_header (msg, &hdr);
+ if (rc = header_aget_value (hdr, MU_HEADER_SENDER, &text))
+ rc = header_aget_value (hdr, MU_HEADER_FROM, &text);
+ }
- if (!(text = malloc (size + 1)))
- return ENOMEM;
- envelope_sender (envelope, text, size + 1, NULL);
- *ptext = text;
- return 0;
+ if (rc == 0)
+ *ptext = text;
+ return rc;
}
static int
Regards,
Sergey
- Re: [bug-mailutils] Error in redirect sieve action [SOLVED], Sergey Poznyakoff, 2005/07/05
- Re: [bug-mailutils] Error in redirect sieve action [SOLVED], Kostas Zorbadelos, 2005/07/05
- Re: [bug-mailutils] Error in redirect sieve action [SOLVED],
Sergey Poznyakoff <=
- Re: [bug-mailutils] Error in redirect sieve action [SOLVED], Kostas Zorbadelos, 2005/07/06
- Re: [bug-mailutils] Error in redirect sieve action [SOLVED], Kostas Zorbadelos, 2005/07/06
- Re: [bug-mailutils] Error in redirect sieve action [SOLVED], Sergey Poznyakoff, 2005/07/06
- Re: [bug-mailutils] Error in redirect sieve action [SOLVED], Kostas Zorbadelos, 2005/07/06
- Re: [bug-mailutils] Error in redirect sieve action [SOLVED], Sergey Poznyakoff, 2005/07/06
- [bug-mailutils] Error in loading of vacation action, Kostas Zorbadelos, 2005/07/06
- [bug-mailutils] Re: Error in loading of vacation action, Sergey Poznyakoff, 2005/07/06
- Re: [bug-mailutils] Re: Error in loading of vacation action, Kostas Zorbadelos, 2005/07/06