* Change to journaling code to include an Internet email address for local
authorArt Cancro <ajc@citadel.org>
Thu, 19 Jan 2006 21:41:22 +0000 (21:41 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 19 Jan 2006 21:41:22 +0000 (21:41 +0000)
  recipients.

citadel/ChangeLog
citadel/README.txt
citadel/citadel_dirs.c
citadel/journaling.c
citadel/serv_vcard.c

index ba7037452af10a8fa1f02a225f2a20b37f9d1317..a6a27a8e705227f6a724dc6acc6866016d0e48d0 100644 (file)
@@ -1,5 +1,9 @@
 $Id$
 
+Thu Jan 19 16:40:57 EST 2006 ajc
+* Change to journaling code to include an Internet email address for local
+  recipients.
+
 Thu Jan 19 13:20:30 EST 2006 ajc
 * Refactored the code that populates the session's knowledge of the user's
   primary internet email address.  We need it to be generic so that we can
index 3db12c5fefc61d1c098d78087f46705c6417f73b..c034b10ca3c07de309be3728820fe5834b324192 100644 (file)
@@ -7,6 +7,9 @@
    2. Install a supported version of Berkeley DB
    3. ./configure && make && make install
    4. Run the "setup" program
+ * After installing Citadel, you'll probably want to install WebCit
+   so that you can access the Citadel system using a web browser.
 
  * Keep in mind that there is a FAQ at http://www.citadel.org
 
index 2f33ed9c93abe86904719667da246ddd1f8c1cbc..4b04f6a79e519c8adb673aa5118e97b16f81b781 100644 (file)
@@ -147,7 +147,7 @@ void calc_dirs_n_files(int relh, int home, const char *relhome,const char  *ctdl
 
        snprintf(file_lmtp_unfiltered_socket, 
                         sizeof file_lmtp_socket,
-                        "%slmtp-unfiltered.sock",
+                        "%slmtp-unfiltered.socket",
                         ctdl_run_dir);
 
 }
index 5cba32940eeecf6719815b9065d01093499e3925..ec158b43c80999e120a1d02669002900aa6d3acb 100644 (file)
@@ -47,6 +47,8 @@
 #include "html.h"
 #include "genstamp.h"
 #include "internet_addressing.h"
+#include "vcard.h"
+#include "serv_vcard.h"
 #include "journaling.h"
 
 struct jnlq *jnlq = NULL;      /* journal queue */
@@ -88,6 +90,28 @@ void JournalBackgroundSubmit(struct CtdlMessage *msg,
 }
 
 
+/*
+ * Convert a local user name to an internet email address for the journal
+ */
+void local_to_inetemail(char *inetemail, char *localuser, size_t inetemail_len) {
+       struct ctdluser us;
+       struct vCard *v;
+
+       strcpy(inetemail, "");
+       if (getuser(&us, localuser) != 0) {
+               return;
+       }
+
+       v = vcard_get_user(&us);
+       if (v == NULL) {
+               return;
+       }
+
+       extract_primary_inet_email(inetemail, inetemail_len, v);
+       vcard_free(v);
+}
+
+
 /*
  * Called by JournalRunQueue() to send an individual message.
  */
@@ -98,6 +122,7 @@ void JournalRunQueueMsg(struct jnlq *jmsg) {
        char *message_text = NULL;
        char mime_boundary[256];
        char recipient[256];
+       char inetemail[256];
        static int seq = 0;
        int i;
 
@@ -170,8 +195,9 @@ void JournalRunQueueMsg(struct jnlq *jmsg) {
                                for (i=0; i<jmsg->recps.num_local; ++i) {
                                        extract_token(recipient, jmsg->recps.recp_local,
                                                        i, '|', sizeof recipient);
+                                       local_to_inetemail(inetemail, recipient, sizeof inetemail);
                                        sprintf(&message_text[strlen(message_text)],
-                                               "       %s\r\n", recipient);
+                                               "       %s <%s>\r\n", recipient, inetemail);
                                }
                        }
 
index 2afd0f597d6448a7dcce123eca2a9a2e51b28dd0..23c69648c3dffe9f6793c9996c631879d132b555 100644 (file)
@@ -58,6 +58,7 @@
 #include "tools.h"
 #include "vcard.h"
 #include "serv_ldap.h"
+#include "serv_vcard.h"
 
 /*
  * set global flag calling for an aide to validate new users