Address Book mailing list entries with empty e-mail addresses should not be mailed to



MailNews Core
14 years ago
4 years ago


(Reporter: Eyal Rozenberg, Unassigned)


(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [patchlove])


(2 attachments, 3 obsolete attachments)



14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7a) Gecko/20040216
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7a) Gecko/20040216

If you specify in a message's 'To' field a mailing list from the address book
(i.e. not a mail address of a server-side mailing list, but a list defined in
your address book), in which some entries have empty e-mail address (yes, this
can happen and it is logical), MailNews will ask the server to also send copies
of the message to the address "<>" , possibly repeated as many times as there
are entries with empty e-mail addresses (although I haven't checked this last
possibility). The result is failure messages from your SMTP server telling you
that sending the message to "<>" has failed.

This should not happen - the entries with empty e-mail addresses should be
silently ignored, not sent to the mail server. The bug is rather simple and if
noone takes the time to fix it, I might have to do it myself - but please don't
make me! It's a 1-minute-long chore for someone who knows the code... it'll take
me a lot longer, not to mention the time spent chasing after reviewers and

Reproducible: Always
Steps to Reproduce:

Comment 1

14 years ago
Here is the response from my server, in case this helps somehow (some personal
details altered):

The original message was received at Sat, 20 Mar 2004 19:32:35 +0200 (IST)

   ----- The following addresses had permanent delivery errors -----

Reporting-MTA: dns;
Arrival-Date: Sat, 20 Mar 2004 19:32:35 +0200 (IST)

Final-Recipient: rfc822;
Action: failed
Status: 5.1.1
Remote-MTA: X-Unix; mirapoint
Diagnostic-Code: smtp; 550 5.1.1 User unknown
Last-Attempt-Date: Sat, 20 Mar 2004 19:33:10 +0200 (IST)

Interesting Idea
Eyal Rozenberg <>
Sat, 20 Mar 2004 19:33:59 +0200
Xxx Xxxx <>, "Zzzz Zzzz (?)" <>, Yyy Yyyyy <>


Comment 2

14 years ago
Created attachment 145885 [details] [diff] [review]
naive fix

I am guessing this has only remained unconfirmed since nobody has had the time
to have a look at this bug. Anyway, here's a fix. I hope there aren't any other
places that need modification except nsMsgCompose.cpp...


14 years ago
Attachment #145885 - Flags: review?(

Comment 3

14 years ago
Eyal, if you specify the exact steps needed to reproduce this bug, and a link to
a test mailing list (I don't want to spam an actual list), then I would be happy
to verify this bug.


Comment 4

14 years ago
Steps to reproduce:

1. Open the address book
2. Create a new address book card with the name "bug 238098 recipient" and no
e-mail address
3. Create a new address book card with your own name and e-mail (since you don't
want to bother other people with your "this is a test" e-mails)
4. Create a new address book list called "238098 test list"
5. Drag the cards created in steps 2 and 3 into this new list
6. Close the address book
7. Open a new message composition window
8. In the "To:" field, type "238098 test list"
9. In the "Subject" field and in the body type "this is my 238098 test"
10. Send the message

Expected Results:
1. You will receive a mail message from yourself named "this is my 238098 test"
2. You will receive a mail message from your SMTP server complaining about its
inability to send your e-mail message to "<>"

BTW, I need to check my own naive fix for what happens when _no_ e-mail
addresses exist on the list.

Comment 5

14 years ago
Regarding my previous comment: I just checked, and the effect is that you get a
"no recipients specified" error message. Pretty decent.

Comment 6

14 years ago
Confirmed with 1.7b and 1.6.

In my case, no mail at all is being sent. I just get an error from the SMTP
server saying "Bad address syntax" and the whole process stops.

Ever confirmed: true

Comment 7

14 years ago
Created attachment 146507 [details] [diff] [review]
Better way?

With attachment 145885 [details] [diff] [review] you can actually bcc an address card without an email
address but with the "prefer text" option to force a plain text mail to what
would normally be an html recipient, but I think that's being silly. This way
just avoids processing address cards with no email address.

Comment 8

14 years ago
This was is fine. I didn't consider this question consciously, I just saw there
were some side-effects to having someone on a mailing list and I followed the
'principle of minimum change'. I'm not even sure if it is silly, for example if
the person on the list is someone you are printing the e-mail for and he/she
prefers doesn't want you to print fancy layout & images maybe it does make sense
to force the mail into plain text. That's kind of stretching it, but if the user
doesn't want this to happen, why we would he/she select 'prefers text' for
someone without an e-mail? Now this begs the question of whether the 'prefers
text' GUI should not be grayed-out when an e-mail address is not defined.

Comment 9

14 years ago
Well, we currently allow completely blank address cards...

Comment 10

14 years ago
It's not like I'm arguing... I think we should
add a comment into the code to explain the dilemma, and then just make the
choice, it can be a coin toss AFAIAC, it really doesn't matter very much.

Comment 11

14 years ago
Created attachment 150362 [details] [diff] [review]
'better way' patch against 1.8a

That line of code changed. I think this change will still work as planned.
Attachment #145885 - Attachment is obsolete: true


14 years ago
Attachment #145885 - Flags: review?(

Comment 12

14 years ago
Created attachment 150363 [details] [diff] [review]
'better way' patch against 1.8

whoops. I wish you could remove patches rather than invalidate them.
Attachment #150362 - Attachment is obsolete: true

Comment 13

14 years ago
Created attachment 150375 [details] [diff] [review]
fix version 3

Apparently in 1.8 someone had the interesting idea of placing a mailing list's
name as its mEmail. Why? Beats the hell out of me. Also, non-NS_OK return
values are not checked in the Javascript code which calls
CheckAndPopulateRecipients, which is why even if we return 'failure', there is
still an attempt to send the mail (although with my patch in place it fails).
Anyway, that's a different bug.
Attachment #150363 - Attachment is obsolete: true

Comment 14

14 years ago
> Anyway, that's a different bug.

And now it really is a different bug:

Product: MailNews → Core
sorry for the spam.  making bugzilla reflect reality as I'm not working on these bugs.  filter on FOOBARCHEESE to remove these in bulk.
Assignee: sspitzer → nobody
Filter on "Nobody_NScomTLD_20080620"
QA Contact: esther → composition

Comment 17

10 years ago
still see this (while researching bug 147738)
OS: Windows XP → All
Hardware: PC → All
Version: Trunk → unspecified


10 years ago
Product: Core → MailNews Core


5 years ago
Whiteboard: [patchlove]


4 years ago
Blocks: 280951
You need to log in before you can comment on or make changes to this bug.