$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
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
snprintf(file_lmtp_unfiltered_socket,
sizeof file_lmtp_socket,
- "%slmtp-unfiltered.sock",
+ "%slmtp-unfiltered.socket",
ctdl_run_dir);
}
#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 */
}
+/*
+ * 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.
*/
char *message_text = NULL;
char mime_boundary[256];
char recipient[256];
+ char inetemail[256];
static int seq = 0;
int i;
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);
}
}