feature request: regular expressions inside "other_email"-field
Hello, background story (you can skip to the next paragraph for the actual feature request): I have a special "spam domain" with a catchall-email (all mails sent to my domain are forwarded to this email, unless there exists an actual account), so that I can give out customized email-adresses on the fly ("compan...@mydomain.org' to company A, "website_...@mydomain.org" when registering on website.org etc.) when I need to fill in an email address somewhere. This way, I can not only easily filter all unimportant mail to a secondary mailbox, but also see exactly where spammers got my email from. The problem now comes when I need to reply to such an email: As I of course don't edit my notmuch-config to adjust the other_email field everytime I invent such an email-address, notmuch doesn't know that the mail was written to me and thus puts in my standard email inside the from-header. I thus have to remember to manually change the from-header and put in the customized email. It would be much more convenient if I could teach notmuch that all adresses of some special form (for example written to some domain) are all mine and thus should be copied from the to-header to the from-header when replying. As far as I can see, there are at least two possible solutions: 1. (quick and dirty): Write a function which copies the to-header to the from-header if it matches some regular expression and call it from message-setup-hook. 2. (more general): Make the other_email field inside notmuch-config regular-expression aware (or maybe just support to indicate domain parts). This way, one could write something like other_email=@mydomain.org and notmuch would always copy the to-header to the from-header when replying to mails sent to someth...@mydomain.org I would be very thankful for any solution to this problem as it would save me a LOT of time every day. I tried to write a function for the message-setup-hook but due to my very limited knowledge of elisp and notmuch I didn't get it to work properly. Best, Simon ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
[BUG] notmuch crashes on FreeBSD when synchronize_flags=true
>> #4 0x00080084dd1c in notmuch_message_get_replies () from >> /usr/local/lib/libnotmuch.so.3 >Just confirm, this particular backtrace is from notmuch 0.18, right? > because 0.19 should build / be-linked-against libnotmuch.so.4. Yes, sorry, I mixed up my text snippets. The backtrace from notmuch 0.19 is analogous with the current libnotmuch referenced. >I would be curious if the Xapian test suite runs in your environment. I'm not very familiar with neither notmuch, nor xapian. Where can I find this test suite? Are you referring to the 'test' directory in the notmuch tree? If so, I have the impression that a lot has to be patched to make it run under FreeBSD (I get a myriad of errors when trying to compile). >> To give you some version numbers, this is what's currently installed: >> >> notmuch: 0.19 >> xapian-core: 1.2.20 >notmuch probably hasn't been very well tested against xapian 1.2.20, >since it was only release a few weeks ago, and isn't available widely >(or more precisely, in Debian) as binary packages. Are you running that >on your linux box as well? Yes, on linux I have the exact same version numbers of notmuch and all dependencies (including xapian) and everything works fine. The bug has already been reported on the freebsd bug tracker: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193809 I've referenced this thread there, hopefully the problem will get sorted out. Would be a shame if such a nice email program remains only partially functional on BSD.
Re: [BUG] notmuch crashes on FreeBSD when synchronize_flags=true
#4 0x00080084dd1c in notmuch_message_get_replies () from /usr/local/lib/libnotmuch.so.3 Just confirm, this particular backtrace is from notmuch 0.18, right? because 0.19 should build / be-linked-against libnotmuch.so.4. Yes, sorry, I mixed up my text snippets. The backtrace from notmuch 0.19 is analogous with the current libnotmuch referenced. I would be curious if the Xapian test suite runs in your environment. I'm not very familiar with neither notmuch, nor xapian. Where can I find this test suite? Are you referring to the 'test' directory in the notmuch tree? If so, I have the impression that a lot has to be patched to make it run under FreeBSD (I get a myriad of errors when trying to compile). To give you some version numbers, this is what's currently installed: notmuch: 0.19 xapian-core: 1.2.20 notmuch probably hasn't been very well tested against xapian 1.2.20, since it was only release a few weeks ago, and isn't available widely (or more precisely, in Debian) as binary packages. Are you running that on your linux box as well? Yes, on linux I have the exact same version numbers of notmuch and all dependencies (including xapian) and everything works fine. The bug has already been reported on the freebsd bug tracker: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193809 I've referenced this thread there, hopefully the problem will get sorted out. Would be a shame if such a nice email program remains only partially functional on BSD. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
[BUG] notmuch crashes on FreeBSD when synchronize_flags=true
Hello, I'm trying to setup notmuch on my FreeBSD machine (version 10.1). As soon as I run 'notmuch new' (without an existing .notmuch directory), notmuch crashes with the error message 'abort (core dumped) notmuch new'. An example output is: --- BEGIN shell-output --- freebsd-desk% notmuch new Found 50363 total files (that's not much mail). zsh: abort (core dumped) notmuch new freebsd-desk% --- END shell-output --- If I put 'synchronize_flags=false' into my config, 'notmuch new' works fine and indexes everything. Here's a backtrace from gdb: --- BEGIN gdb-session --- bsd-desk% gdb notmuch GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)... (gdb) run new Starting program: /usr/local/bin/notmuch new (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[New LWP 101945] (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[New Thread 804406400 (LWP 101945/notmuch)] (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debuggingFound 50363 total files (that's not much mail). Program received signal SIGABRT, Aborted. [Switching to Thread 804406400 (LWP 101945/notmuch)] 0x0008018d16ca in thr_kill () from /lib/libc.so.7 (gdb) bt #0 0x0008018d16ca in thr_kill () from /lib/libc.so.7 #1 0x0008019a6149 in abort () from /lib/libc.so.7 #2 0x0008022df42d in __cxa_rethrow () from /lib/libcxxrt.so.1 #3 0x000801c5a7e6 in Xapian::Document::Internal::remove_term () from /usr/local/lib/libxapian.so.22 #4 0x00080084dd1c in notmuch_message_get_replies () from /usr/local/lib/libnotmuch.so.3 #5 0x00080084f0cf in notmuch_message_remove_tag () from /usr/local/lib/libnotmuch.so.3 #6 0x00080084f2d5 in notmuch_message_maildir_flags_to_tags () from /usr/local/lib/libnotmuch.so.3 #7 0x0040d3e5 in ?? () #8 0x0040ce48 in ?? () #9 0x0040ce48 in ?? () #10 0x0040ce48 in ?? () #11 0x0040c26b in ?? () #12 0x0040878b in ?? () #13 0x0040798f in ?? () #14 0x00080063b000 in ?? () #15 0x in ?? () (gdb) --- END gdb-session --- The error described above occurs, no matter if I install the notmuch package (and its dependencies) via binary packages or build from ports. I've tried version 0.18 and version 0.19. Also, it doesn't matter if I start with a maildir containing just a single mail, or my real maildir with thousands of messages. On my linux box (running the same verions of notmuch and its dependencies), the error doesn't occur, so I guess it has something to do with the different C++-Stacks (libcxxrt is FreeBSD's ABI library). A quick glance at the notmuch code showed that notmuch_message_get_replies() sometimes returns NULL. I'm not a C++ expert but could it be that this might be the problem here? To give you some version numbers, this is what's currently installed: notmuch: 0.19 xapian-core: 1.2.20 gmime: 2.6.20 talloc: 2.1.1 To reproduce the error, you can do the following: - perform a fresh install of FreeBSD - install the package or port, for example: 'pkg install notmuch' - create a standard config file containing 'synchronize_flags=true' and pointing to some maildir - run 'notmuch new' I would be very thankful for a fix (or hints what might be the problem). Thanks for your help, Simon
[BUG] notmuch crashes on FreeBSD when synchronize_flags=true
Hello, I'm trying to setup notmuch on my FreeBSD machine (version 10.1). As soon as I run 'notmuch new' (without an existing .notmuch directory), notmuch crashes with the error message 'abort (core dumped) notmuch new'. An example output is: --- BEGIN shell-output --- freebsd-desk% notmuch new Found 50363 total files (that's not much mail). zsh: abort (core dumped) notmuch new freebsd-desk% --- END shell-output --- If I put 'synchronize_flags=false' into my config, 'notmuch new' works fine and indexes everything. Here's a backtrace from gdb: --- BEGIN gdb-session --- bsd-desk% gdb notmuch GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as amd64-marcel-freebsd...(no debugging symbols found)... (gdb) run new Starting program: /usr/local/bin/notmuch new (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[New LWP 101945] (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[New Thread 804406400 (LWP 101945/notmuch)] (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debuggingFound 50363 total files (that's not much mail). Program received signal SIGABRT, Aborted. [Switching to Thread 804406400 (LWP 101945/notmuch)] 0x0008018d16ca in thr_kill () from /lib/libc.so.7 (gdb) bt #0 0x0008018d16ca in thr_kill () from /lib/libc.so.7 #1 0x0008019a6149 in abort () from /lib/libc.so.7 #2 0x0008022df42d in __cxa_rethrow () from /lib/libcxxrt.so.1 #3 0x000801c5a7e6 in Xapian::Document::Internal::remove_term () from /usr/local/lib/libxapian.so.22 #4 0x00080084dd1c in notmuch_message_get_replies () from /usr/local/lib/libnotmuch.so.3 #5 0x00080084f0cf in notmuch_message_remove_tag () from /usr/local/lib/libnotmuch.so.3 #6 0x00080084f2d5 in notmuch_message_maildir_flags_to_tags () from /usr/local/lib/libnotmuch.so.3 #7 0x0040d3e5 in ?? () #8 0x0040ce48 in ?? () #9 0x0040ce48 in ?? () #10 0x0040ce48 in ?? () #11 0x0040c26b in ?? () #12 0x0040878b in ?? () #13 0x0040798f in ?? () #14 0x00080063b000 in ?? () #15 0x in ?? () (gdb) --- END gdb-session --- The error described above occurs, no matter if I install the notmuch package (and its dependencies) via binary packages or build from ports. I've tried version 0.18 and version 0.19. Also, it doesn't matter if I start with a maildir containing just a single mail, or my real maildir with thousands of messages. On my linux box (running the same verions of notmuch and its dependencies), the error doesn't occur, so I guess it has something to do with the different C++-Stacks (libcxxrt is FreeBSD's ABI library). A quick glance at the notmuch code showed that notmuch_message_get_replies() sometimes returns NULL. I'm not a C++ expert but could it be that this might be the problem here? To give you some version numbers, this is what's currently installed: notmuch: 0.19 xapian-core: 1.2.20 gmime: 2.6.20 talloc: 2.1.1 To reproduce the error, you can do the following: - perform a fresh install of FreeBSD - install the package or port, for example: 'pkg install notmuch' - create a standard config file containing 'synchronize_flags=true' and pointing to some maildir - run 'notmuch new' I would be very thankful for a fix (or hints what might be the problem). Thanks for your help, Simon ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
[BUG] inconsistent user context handling w/ tramp
Hello, after using tramp to open a file using the 'su' or 'sudo' protocol as user X, the next time I run 'compose-mail' to compose a message it apparently looks in the home directory of user X for its config file, mail directory etc. In the compose window, I get the error message 'Error reading configuration file $X_homedir/.notmuch-config: No such file or directory' in all header fields (From, Fcc etc.) that should be filled by notmuch ($X_homedir is the home directory of user X from above). This happens when using emacs in "standalone" mode or when connecting to a running instance of emacs with emacsclient. In the latter case, if one connects with another emacsclient, everything works properly again. However, this all suggests that notmuch should gather the user who is running emacs in a more robust way. Best wishes, Simon
[BUG] inconsistent user context handling w/ tramp
Hello, after using tramp to open a file using the 'su' or 'sudo' protocol as user X, the next time I run 'compose-mail' to compose a message it apparently looks in the home directory of user X for its config file, mail directory etc. In the compose window, I get the error message 'Error reading configuration file $X_homedir/.notmuch-config: No such file or directory' in all header fields (From, Fcc etc.) that should be filled by notmuch ($X_homedir is the home directory of user X from above). This happens when using emacs in standalone mode or when connecting to a running instance of emacs with emacsclient. In the latter case, if one connects with another emacsclient, everything works properly again. However, this all suggests that notmuch should gather the user who is running emacs in a more robust way. Best wishes, Simon ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Set "From" based on "To" when replying
> Yeah, I think this is the point: you want "*@mydomain.org" to be one of > the user.other_email. I don't see why that couldn't be done with a > little work in notmuch-reply.c. I wouldn't mind seeing this > functionality as well, actually. So here's my shabby solution (pasted from my .emacs): ;;automatically take From: from To: if mail was sent to .*@mydomain.org (defun notmuch-show-reply-sender-mod () (interactive) (if (string-match ".*@campese.de" (notmuch-show-get-header :To)) (notmuch-mua-reply (notmuch-show-get-message-id) (notmuch-show-get-header :To) nil) (notmuch-show-reply-sender))) (defun notmuch-show-reply-mod () (interactive) (if (string-match ".*@campese.de" (notmuch-show-get-header :To)) (notmuch-mua-reply (notmuch-show-get-message-id) (notmuch-show-get-header :To) t) (notmuch-show-reply))) (define-key notmuch-show-mode-map "r" 'notmuch-show-reply-sender-mod) (define-key notmuch-show-mode-map "R" 'notmuch-show-reply-mod) If it sees "@mydomain.org" in the 'To'-header, it copies the whole "To:"-header to the "From:" header when replying. This works as long as I'm the only one in the "To:"-header, which usually is the case (I only use this "special" email addreses when registering at online-shops, forums, etc. to be able to easily track where spammers got my email from. I totally agree that a clean solution would be regular expressions in the primary_email and other_email fields in notmuch-config. Anyone up for implementing this? :-) Best, Simon
Set "From" based on "To" when replying
On Fri, 03 Feb 2012 13:54:07 +0200, Tomi Ollila wrote: > You could (also) check this (or some other with same name) > > https://github.com/altruizine/gnus-alias/blob/master/gnus-alias.el Thanks for the link, but this method is interactive. I want something automatic. Nevertheless a nice thing to have when composing emails. Best, Simon
Re: Set From based on To when replying
On Fri, 03 Feb 2012 13:54:07 +0200, Tomi Ollila tomi.oll...@iki.fi wrote: You could (also) check this (or some other with same name) https://github.com/altruizine/gnus-alias/blob/master/gnus-alias.el Thanks for the link, but this method is interactive. I want something automatic. Nevertheless a nice thing to have when composing emails. Best, Simon ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: Set From based on To when replying
Yeah, I think this is the point: you want *@mydomain.org to be one of the user.other_email. I don't see why that couldn't be done with a little work in notmuch-reply.c. I wouldn't mind seeing this functionality as well, actually. So here's my shabby solution (pasted from my .emacs): ;;automatically take From: from To: if mail was sent to .*@mydomain.org (defun notmuch-show-reply-sender-mod () (interactive) (if (string-match .*@campese.de (notmuch-show-get-header :To)) (notmuch-mua-reply (notmuch-show-get-message-id) (notmuch-show-get-header :To) nil) (notmuch-show-reply-sender))) (defun notmuch-show-reply-mod () (interactive) (if (string-match .*@campese.de (notmuch-show-get-header :To)) (notmuch-mua-reply (notmuch-show-get-message-id) (notmuch-show-get-header :To) t) (notmuch-show-reply))) (define-key notmuch-show-mode-map r 'notmuch-show-reply-sender-mod) (define-key notmuch-show-mode-map R 'notmuch-show-reply-mod) If it sees @mydomain.org in the 'To'-header, it copies the whole To:-header to the From: header when replying. This works as long as I'm the only one in the To:-header, which usually is the case (I only use this special email addreses when registering at online-shops, forums, etc. to be able to easily track where spammers got my email from. I totally agree that a clean solution would be regular expressions in the primary_email and other_email fields in notmuch-config. Anyone up for implementing this? :-) Best, Simon ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Set "From" based on "To" when replying
Dear Community, I've got my own domain and when registering or shopping at some website, I always use email addresses of the form "websitename at mydomain.org", so for example I use "amazon at mydomain.org" when shopping at amazon. The reason for this is categorizing incoming mail on the one hand, and immediately being able to spot the source of spam on the other hand. I would like to implement the following behaviour: When replying to a mail that has "something at mydomain.org" in the "To"-header, I would like to have the "From"-header of the reply to be automatically set to this address. Is there some kind of reply-hook in notmuch where one could put an appropriate function? Thank you very much for your help, Simon