Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 44545 - email settings request - don't send email to me if it's sent to a list/alias I'm on
Summary: email settings request - don't send email to me if it's sent to a list/alias ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Infrastructure
Classification: Unclassified
Component: Bugzilla (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Bugzilla Admins
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-13 02:30 UTC by Jeremy Huddleston (RETIRED)
Modified: 2011-10-30 23:14 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to Gentoo BugMail.pm to resolve aliases and hopefully eliminate duplicates (BugMail.pm-resolveAlias.patch,3.84 KB, patch)
2004-05-25 16:08 UTC, Aron Griffis (RETIRED)
Details | Diff
BugMail.pm-resolveAlias.patch (BugMail.pm-resolveAlias.patch,4.26 KB, patch)
2004-05-25 16:58 UTC, Aron Griffis (RETIRED)
Details | Diff
BugMail.pm-resolveAlias.patch (BugMail.pm-resolveAlias.patch,4.42 KB, patch)
2004-05-25 17:49 UTC, Aron Griffis (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Huddleston (RETIRED) gentoo-dev 2004-03-13 02:30:05 UTC
This should probably be forwarded upstream, but I wanted to mention it here...

It'd be nice to have an additional setting in the email preferences which could be used to disable sending email notices about changes to me if they are sent to one of the addresses I specify.  I could use this to stop email from being sent directly to me (eradicator@g.o) if that message was already sent to an alias/list I'm on (sound@g.o, net-p2p@g.o, and any others I specify)...
Comment 1 Radek Podgorny 2004-03-13 06:41:37 UTC
I'm just curious, but is there any reason for having those aliases and using them in bugzilla at once?
Comment 2 Jeremy Huddleston (RETIRED) gentoo-dev 2004-03-13 13:49:10 UTC
Radek, usually bugs get assigned by the bug-wranglers to the herd (sound@g.o), then as I take on a bug that is in my herd, I assign it to myself, and place the herd in CC... this way other members of the herd will see the changes, and we can search for sound-related bugs by checking for sound@g.o in the CC of a bug.  The dwnside of this is that I receive double email from these assigned bugs (once for me personally, and once for the herd in the CC)
Comment 3 Benjamin Coles 2004-03-28 20:50:45 UTC
Moving this to closed, this is not an upstream bug. As for getting two emails for one bug, you can remove yourself off the CC if you like but let the other person know why.
Comment 4 Jeremy Huddleston (RETIRED) gentoo-dev 2004-03-29 09:11:59 UTC
It's a feature request.  It's not a bug.  The problem is that it's assigned to me, but I want an alias/list that I'm on to get mail too...  This would be the reverse of watching somebody... instead of 'send email to me if it's sent to _____', you'd say 'DON'T send email to me if it's sent to _____'.
Comment 5 Aron Griffis (RETIRED) gentoo-dev 2004-05-25 16:08:36 UTC
Created attachment 32036 [details, diff]
Patch to Gentoo BugMail.pm to resolve aliases and hopefully eliminate duplicates

I think this BugMail.pm patch should do the trick, though I have to admit that
I don't have a Bugzilla environment in which to test it.

The patch attempts to resolve aliases from files in the directory
/var/www/bugs.gentoo.org/Bugzilla/aliases, which should be an rsync'd copy of
d.g.o:/var/mail/alias/misc.  It handles recursion correctly and will defer to
the MTA in case it has any trouble.

Hopefully Ben will find time to give this a try... ;-)
Comment 6 Kurt Lieber (RETIRED) gentoo-dev 2004-05-25 16:47:28 UTC
ok, I'm fine with implementing this patch as an *unsupported* feature.  this means that if it breaks/goes away during an upgrade, we don't make any promises to fix it.

Ben -- when adding the actual patch, please add a line at the top of the new comments section that says something to the effect of:

### start of patch ###
# 25-May-04 patch added to prevent duplicate email addresses being sent to recipients.
# written by agriffis@gentoo.org

and then at the bottom, please add something like:

### end of patch ###

This will clearly delineate what we hacked in vs. what the bugzilla authors originally wrote.
Comment 7 Aron Griffis (RETIRED) gentoo-dev 2004-05-25 16:51:27 UTC
I'll update the patch to include those comments, just a minute
Comment 8 Aron Griffis (RETIRED) gentoo-dev 2004-05-25 16:58:50 UTC
Created attachment 32039 [details, diff]
BugMail.pm-resolveAlias.patch

Here is the update with the requested comments showing the start, continuation,
and end of the patch
Comment 9 Aron Griffis (RETIRED) gentoo-dev 2004-05-25 17:49:28 UTC
Created attachment 32044 [details, diff]
BugMail.pm-resolveAlias.patch

Updated patch ... I forgot to snip @gentoo.org from the incoming addresses.
There are probably other problems but I'll hopefully be able to resolve them
quickly when the patch is tested.  I just noticed this on another read-through.
Comment 10 Aron Griffis (RETIRED) gentoo-dev 2004-05-25 18:24:44 UTC
Here are some more random thoughts about this problem and my patch:

Ideally the problem would be solved at the MTA level, but it CAN'T be because bgo and dgo are separate servers.  Since they are separate servers, the MTA on bgo sends out a separate email for each recipient address.  By the time the emails arrive on dgo, they can't be coalesced any longer, they must be delivered separately, including dispatching to aliases.

If bgo and dgo were the same server, then postfix would handle this all for us at the time the email was handed from bugzilla to postfix.  From the cleanup(8) man-page:

       The cleanup daemon always performs the following transfor-
       mations:

       o      Insert missing message  headers:  (Resent-)  From:,
              To:, Message-Id:, and Date:.

       o      Transform  envelope  and  header  addresses  to the
              standard user@fully-qualified-domain form  that  is
              expected  by  other Postfix programs.  This task is
              delegated to the trivial-rewrite(8) daemon.

       o      Eliminate duplicate envelope recipient addresses.

Frankly, it might be worthwhile to look into synchronizing postfix aliases from dgo to bgo's postfix instead of bgo's bugzilla.  My patch will probably work around the problem (pending debug!) but it actually results in *more* traffic from bgo to dgo instead of less.  For example, it will send an email to each person on the toolchain alias instead of sending an email to the toolchain alias itself.  For developers, the end result is nicer because we just get one mail.  But the load on bgo might be higher.
Comment 11 Kurt Lieber (RETIRED) gentoo-dev 2004-05-25 18:32:13 UTC
what is this postfix you speak of? :)

We use exim for our MTAs.

Right now, this feature is pretty easy to implement -- one hack to one bugzilla file and a cron'd rsync entry. The more complex it becomes, the less likely I'm going to be willing to implement it.

Let's KISS for now and see how it works as-is.  We can tweak later if needed/desired.
Comment 12 Jeremy Huddleston (RETIRED) gentoo-dev 2004-05-27 23:08:07 UTC
whoa... that's much more intense than I was expecting, but cool... I was just hoping for a text field so I could hand-enter the data...
Comment 13 Kurt Lieber (RETIRED) gentoo-dev 2004-08-27 04:47:21 UTC
guess this one got ignored...Jeff -- can you see about picking it back up?
Comment 14 Jeffrey Forman (RETIRED) gentoo-dev 2005-05-15 07:40:55 UTC
I'll try an take a look at this once I get the upgraded bugzilla installed.
Comment 15 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-01-06 08:21:24 UTC
Moving open bugzilla bugs to the new bugzilla group (because I'm about to stab lots of these bugs).
Comment 16 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-01-06 09:04:57 UTC
I have one objection to the patch posted here.
Originally you wanted a configurable option for users, so they can state that they only want a single copy.
I really do need that setting, because I want the multiple copies.
Comment 17 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-03-14 00:45:51 UTC
looking at this again, if we solve this at the message-id level inside BugZilla, we can let users do this filtering with procmail instead.
Comment 18 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-03-14 01:47:01 UTC
Ok, I've changed the message-id handling slightly.
Previous behavior of bugzilla:
1. if new bug, generate message-id header
2. if existing bug, do not generate message-id header, and generate in-reply-to instead using the old message-id value.
3. Postfix adds the message-id header itself.

New behavior of bugzilla:
1. if new bug, generate message-id header.
2. if existing bug, generate in-reply-to using same message-id as #1. Generate message-id header by prepending 'comment-$UNIXTIME-' to message-id from #1.

This now means that a given message from bugzilla contains a unique message-id, regardless of how many recipients recieve it.

This thus enables duplicate filtering at the procmail level :-).