Identity guess update
- From: Martin Leopold <mleopold worldonline dk>
- To: balsa-list gnome org
- Subject: Identity guess update
- Date: Sat, 18 May 2002 01:07:35 +0200
Hi all.
I just downloaded Balsa 1.3.6 looking good as allways, allthough I was
still not pleased with the identity guessing rutine.
My problem is this: I subscribe to a number of mailing lists, for this I
have a special junk-account, when replying to the list I would like to use
this account as sender.
One way to solve this would be to mark some mailboxes as "allways reply
ising identity x", but there was a shortcut. Looking at the headers from
my mailing lists I discovered two headers: "Original-Recipient" and
"Delivered-To" I can't seem to find any RFCs on any of them, so I'm not
sure if they are standard compliant, and who actually sets them (the best
I could come up with is that it is qmail specific). Each contained the
address of my account.
I could only find one "Original-Recipient" which had the form
"rfc822;mleopold@worldonline.dk"..
All the other lists had one or more "Delivered-To", forms including:
Delivered-To: worldonline.dk+-mleopold@worldonline.dk
Delivered-To: balsa-list@gnome.org
Delivered-To: mailing list palle@palle.org
So my solution is to add yet an other loop looking for one of my accounts
in any of these two header. Unfortunately I have no idea what the format
is, so I don't have any idea how to parse these strings - so I just do a
"strstr" search looking for anything remotely like an address of mine =].
--
Regards Martin Leopold.
Dept. of Computer Science, University of Copenhagen
--- balsa-1.3.6.org/src/sendmsg-window.c Fri May 10 17:02:46 2002
+++ balsa-1.3.6/src/sendmsg-window.c Sat May 18 00:52:54 2002
@@ -2595,6 +2595,28 @@
}
}
}
+ if (!done) {
+ /* No "to" or "cc" match, maybee this is a mailing list? */
+ /* Try qmail Delivered-To or Original-Recipient"*/
+ if (!message->user_headers)
+ message->user_headers = libbalsa_message_user_hdrs(message);
+ alist = message->user_headers;
+ for (alist ; !done && alist ; alist = g_list_next(alist)) {
+ gchar **tmp = alist->data;
+ if (libbalsa_find_word(tmp[0], "delivered-to") ||
+ libbalsa_find_word(tmp[0], "original-recipient")) {
+ for (ilist = balsa_app.identities; (!done && ilist);
+ ilist = g_list_next(ilist)) {
+ ident = LIBBALSA_IDENTITY(ilist->data);
+ if (strstr(tmp[1],
+ (gchar*)(ident->address->address_list->data))) {
+ msg->ident = ident;
+ done = TRUE;
+ }
+ }
+ }
+ }
+ }
}
return done;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]