From: Simon Campese Date: Sat, 9 Jan 2016 15:36:10 +0000 (+0000) Subject: feature request: regular expressions inside "other_email"-field X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fb47e9489d16d13be3432e3b2923230131eec4aa;p=notmuch-archives.git feature request: regular expressions inside "other_email"-field --- diff --git a/4b/1e04c8c84d055220cea51da0b8cc99dd535d22 b/4b/1e04c8c84d055220cea51da0b8cc99dd535d22 new file mode 100644 index 000000000..d71ba72d0 --- /dev/null +++ b/4b/1e04c8c84d055220cea51da0b8cc99dd535d22 @@ -0,0 +1,94 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 5B9216DE0350 + for ; Sat, 9 Jan 2016 07:44:35 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.505 +X-Spam-Level: +X-Spam-Status: No, score=0.505 tagged_above=-999 required=5 tests=[AWL=-0.495, + RCVD_IN_DNSWL_LOW=-0.7, URIBL_DBL_SPAM=1.7] autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id tlVFnUcwtU93 for ; + Sat, 9 Jan 2016 07:44:33 -0800 (PST) +X-Greylist: delayed 490 seconds by postgrey-1.35 at arlo; + Sat, 09 Jan 2016 07:44:32 PST +Received: from mail.worldserver.net (mail.worldserver.net [217.13.200.36]) + by arlo.cworth.org (Postfix) with ESMTPS id EF1036DE02DA + for ; Sat, 9 Jan 2016 07:44:32 -0800 (PST) +Received: from mailer.rman (unknown [2.239.24.102]) + (Authenticated sender: mailer@campese.de) + by mail.worldserver.net (Postfix) with ESMTPSA id 925B9300468 + for ; Sat, 9 Jan 2016 16:36:11 +0100 (CET) +From: Simon Campese +To: notmuch@notmuchmail.org +Subject: feature request: regular expressions inside "other_email"-field +User-Agent: Notmuch/0.20.2 (http://notmuchmail.org) Emacs/24.5.1 + (amd64-portbld-freebsd10.1) +Date: Sat, 09 Jan 2016 15:36:10 +0000 +Message-ID: <867fjipxxx.fsf@emacs.campese.org> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 09 Jan 2016 15:44:35 -0000 + +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 +("company_a@mydomain.org' to company A, "website_org@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 something@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