Closed Bug 337717 Opened 18 years ago Closed 17 years ago

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

Categories

(Bugzilla :: Whining, defect)

2.22
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: k0u4dz202, Assigned: LpSolit)

References

Details

Attachments

(1 file, 2 obsolete files)

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
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?
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

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.
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
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.
Bug 94293 is the bug that fixed the SMTP header so that in 2.22 we get the bounced email messages.
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.
Assignee: erik → whining
Any chance this one can be made to block 2.22.2?
Flags: blocking2.22.2?
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-
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
(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.
(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.
Attachment #249100 - Flags: review+
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?
(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 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+
Assignee: colin.ogilvie → adalberto.castelo
Target Milestone: --- → Bugzilla 2.22
Adalberto's patch ported to trunk, carrying forward review+.
Attachment #249607 - Flags: review+
Status: NEW → ASSIGNED
Flags: approval?
Flags: approval2.22?
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-
Flags: approval?
Flags: approval2.22?
Comment on attachment 249607 [details] [diff] [review]
Adalberto's patch slightly modified for trunk

Indeed.
Attachment #249607 - Flags: review+
Whiteboard: needs trunk patch?
Attached patch patch, v1Splinter Review
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)
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
Whiteboard: needs trunk patch?
Target Milestone: Bugzilla 2.22 → Bugzilla 3.0
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 on attachment 270783 [details] [diff] [review]
patch, v1

r=mkanat by inspection
Attachment #270783 - Flags: review?(mkanat) → review+
Flags: approval3.0+
Flags: approval+
Attachment #270783 - Flags: review?(timeless)
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
Closed: 17 years ago
Resolution: --- → FIXED
Err... s/return/next/ in the foreach loop.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: