whineatnews.pl sends email to users having "Bugmail Disabled = 1"

RESOLVED FIXED in Bugzilla 3.0

Status

()

RESOLVED FIXED
13 years ago
10 years ago

People

(Reporter: k0u4dz202, Assigned: LpSolit)

Tracking

2.22
Bugzilla 3.0
Bug Flags:
approval +
approval3.0 +
blocking2.22.2 -

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060226 Debian/1.5.dfsg+1.5.0.1-3 Firefox/1.5.0.1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060226 Debian/1.5.dfsg+1.5.0.1-3 Firefox/1.5.0.1

After upgrading from 2.20.1 to 2.22 Bugzilla began to send emails to a user that was listed in data/nomail. The email address listed isn't a valid email anymore. The emails bounce and the bounced message is emailed to the Bugzilla administrator.

Reproducible: Always

Updated

13 years ago
Keywords: regression
OS: Linux → All
Hardware: PC → All
Version: unspecified → 2.22
This works for me... I suspect this is a case for http://www.bugzilla.org/support/. Can you please check whether the cron job can read data/nomail?
(Reporter)

Comment 2

13 years ago
I have this line in www-data's crontab:
55 0 * * * cd /usr/local/bugzilla ; ./whineatnews.pl
-------------

The following is able to list out the contents of nomail. So I would think that the cronjob shouldn't have any problems reading the file:

$ sudo su - www-data
www-data@myhost:~$ cat /usr/local/bugzilla/data/nomail
end.user@ttu.edu
xxxxxx.xxxxxxx@ttu.edu
---------------------

Here's the permissions on the files in the data directory:
$ ls -l /usr/local/bugzilla/data
total 196
drwxrwx---  2 root     www-data   4096 Sep  2  2005 attachments
drwxr-x---  2 root     www-data  16384 May 15 00:05 duplicates
-rw-r--r--  1 root     root       2438 May 14 00:05 duplicates-old.rdf
-rw-r--r--  1 root     root       2438 May 15 00:05 duplicates.rdf
-rw-r--r--  1 root     www-data      0 Sep  2  2005 mail
drwxrwxr-x  2 root     www-data   4096 Sep 18  2005 mimedump-tmp
drwxr-x---  2 root     www-data   8192 Apr  1 00:05 mining
-rw-r--r--  1 root     www-data     45 Sep  2  2005 nomail
-rw-rw----  1 www-data www-data   6844 May  4 11:46 params
drwxrwx---  3 root     www-data   4096 May  3 10:00 template
-rw-rw----  1 www-data www-data 131314 May  4 11:46 versioncache
drwxrwx---  2 root     www-data   4096 Dec 14 16:55 webdot

(Reporter)

Comment 3

13 years ago
As a test I added another user's email that was getting whinemail to my nomail file. I submitted a comment on a bug assigned to that user and no mail was sent to the user. This is what I expected. That night he still received the nightly whinemail which I wouldn't expect.
(Assignee)

Comment 4

13 years ago
whine.pl takes care of data/nomail:

# Check the nomail file for users who should not receive mail
my %nomail;
if (open(NOMAIL, '<', "$datadir/nomail")) {
    while (<NOMAIL>) {
        $nomail{trim($_)} = 1;
    }
}


But whineatnews.pl doesn't. And by looking at the code in 2.20.1, whineatnews.pl never took care of data/nomail, so I don't see how this could be a regression.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Summary: Bugzilla whine sends email to users listed in data/nomail → whineatnews.pl sends email to users listed in data/nomail
(Reporter)

Comment 5

13 years ago
Okay, I compared messages from bugzilla 2.20.x with 2.22 and it seems that the header "Return-Path" is set to the bugzilla admin email in 2.22 and before it was the linux www-data@hostname. www-data is the linux user that bugzilla runs as.

So bugzilla has always been trying to send whinemail to users in nomail. It's just now that it sets the Return-Path to my email that I get get bounced messages.
(Reporter)

Comment 6

13 years ago
Bug 94293 is the bug that fixed the SMTP header so that in 2.22 we get the bounced email messages.

Comment 7

12 years ago
I'm actually seeing this problem now as well.

A user who is listed in the data/nomail file doesn't receive any mail from normal use, however the whineatnews.pl script is sending him mail which the mail server rejects because it's an invalid address.

Updated

12 years ago
Assignee: erik → whining

Comment 8

12 years ago
Any chance this one can be made to block 2.22.2?
Flags: blocking2.22.2?

Comment 9

12 years ago
I understand how this bug can be irritating, but we're too close to 2.22.2 at this point to make this a blocker.
Flags: blocking2.22.2? → blocking2.22.2-

Comment 10

12 years ago
mkanat: If this bug was fixed reasonably promptly (like within the next day or two), would it be considered for 2.22.2?
Assignee: whining → colin.ogilvie

Comment 11

12 years ago
(In reply to comment #10)
> mkanat: If this bug was fixed reasonably promptly (like within the next day or
> two), would it be considered for 2.22.2?

  Absolutely.

Comment 12

12 years ago
Created attachment 249100 [details] [diff] [review]
patch to implement nomail check in whineatnews.pl

(In reply to comment #11)
> (In reply to comment #10)
> > mkanat: If this bug was fixed reasonably promptly (like within the next day or
> > two), would it be considered for 2.22.2?
> 
>   Absolutely.
> 

I'm sure someone's already addressed this, but just in case no-one has had the time: I simply transferred the nomail file check from whine.pl to whineatnews.pl. Here's the patch.

Updated

12 years ago
Attachment #249100 - Flags: review+
(Assignee)

Comment 13

12 years ago
Comment on attachment 249100 [details] [diff] [review]
patch to implement nomail check in whineatnews.pl

You are not a reviewer. Setting the flag to '?'.
Attachment #249100 - Flags: review+ → review?

Comment 14

12 years ago
(In reply to comment #13)
> (From update of attachment 249100 [details] [diff] [review] [edit])
> You are not a reviewer. Setting the flag to '?'.
> 

Sorry, my mistake.

Comment 15

12 years ago
Comment on attachment 249100 [details] [diff] [review]
patch to implement nomail check in whineatnews.pl

I would have bothered to say: don't duplicate code, make a sub that reads $datadir/nomail and returns a hash based on it!

However, $datadir/nomail is anyway a big hack, and one of the last reasons for which we can't have (yet) multiple Bugzilla www front-ends, all talking to the same SQL backend, so the sooner it's gone, the better, and this will work nicely for bug-fixing the stable 2.22.
Attachment #249100 - Flags: review? → review+

Updated

12 years ago
Assignee: colin.ogilvie → adalberto.castelo
Target Milestone: --- → Bugzilla 2.22

Comment 16

12 years ago
Created attachment 249607 [details] [diff] [review]
Adalberto's patch slightly modified for trunk

Adalberto's patch ported to trunk, carrying forward review+.
Attachment #249607 - Flags: review+

Updated

12 years ago
Status: NEW → ASSIGNED
Flags: approval?
Flags: approval2.22?
(Assignee)

Comment 17

12 years ago
Comment on attachment 249607 [details] [diff] [review]
Adalberto's patch slightly modified for trunk

data/nomail no longer exists, see bug 100953.
Attachment #249607 - Flags: review-
(Assignee)

Updated

12 years ago
Flags: approval?
Flags: approval2.22?

Comment 18

12 years ago
Comment on attachment 249607 [details] [diff] [review]
Adalberto's patch slightly modified for trunk

Indeed.
Attachment #249607 - Flags: review+

Updated

12 years ago
Whiteboard: needs trunk patch?
(Assignee)

Comment 19

12 years ago
Created attachment 270783 [details] [diff] [review]
patch, v1
Assignee: adalberto.castelo → LpSolit
Attachment #249100 - Attachment is obsolete: true
Attachment #249607 - Attachment is obsolete: true
Attachment #270783 - Flags: review?(timeless)
Attachment #270783 - Flags: review?(mkanat)
(Assignee)

Comment 20

12 years ago
Comment on attachment 270783 [details] [diff] [review]
patch, v1

Cool, the patch also works with Bugzilla 3.0. No need to backport it. :)
Attachment #270783 - Attachment description: patch for 3.1, v1 → patch, v1
(Assignee)

Updated

12 years ago
Whiteboard: needs trunk patch?
Target Milestone: Bugzilla 2.22 → Bugzilla 3.0
(Assignee)

Comment 21

12 years ago
Updating the bug summary as data/nomail no longer exists in Bugzilla 3.x
Summary: whineatnews.pl sends email to users listed in data/nomail → whineatnews.pl sends email to users having "Bugmail Disabled = 1"

Comment 22

12 years ago
Comment on attachment 270783 [details] [diff] [review]
patch, v1

r=mkanat by inspection
Attachment #270783 - Flags: review?(mkanat) → review+
(Assignee)

Updated

12 years ago
Flags: approval3.0+
Flags: approval+
(Assignee)

Updated

12 years ago
Attachment #270783 - Flags: review?(timeless)
(Assignee)

Comment 23

12 years ago
tip:

Checking in whineatnews.pl;
/cvsroot/mozilla/webtools/bugzilla/whineatnews.pl,v  <--  whineatnews.pl
new revision: 1.28; previous revision: 1.27
done

3.0:

Checking in whineatnews.pl;
/cvsroot/mozilla/webtools/bugzilla/whineatnews.pl,v  <--  whineatnews.pl
new revision: 1.27.2.1; previous revision: 1.27
done
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
(Assignee)

Comment 24

12 years ago
Err... s/return/next/ in the foreach loop.
Duplicate of this bug: 469967
You need to log in before you can comment on or make changes to this bug.