If memory serves correctly, MTAs like qmail do not read the 'To' and 'Cc'
headers at all. The 'To' and 'Cc' fields are written by the MUA (i.e. the
email client) and constitute part of the message text delivered to the
server by the DATA command. The server doesn't look inside that text at
all. The thing that tells it where to deliver the message is an RCPT
command which is sent as part of the SMTP session.

So if your developer is obsessing over the content of the 'To' and 'Cc'
fields, it suggests that he doesn't know as much about email as he thinks
he does. Or, more likely, that he's using a library that abstracts away
the details. He's doing something like:

    message = new Message();
    message.add_to_recipient("someone@somewhere")
    message.add_cc_recipient("someone@somewhere")
    message.add_cc_recipient("someones-boss@somewhere")

and the library is configured to send an RCPT command for every address in
the 'to' and 'cc' slots of the message object, so it's doing:

    RCPT TO: someone@somewhere
    RCPT TO: someone@somewhere
    RCPT TO: someones-boss@somewhere

The first question that comes to my mind is why he's adding the same email
to both 'To' and 'Cc'. That just seems sloppy to me.

Leaving that aside -- maybe he has a reason -- I did a manual telnet
session to both a qmail server and to Gmail to see how they'd handle the
case where successive RCPT commands name the same recipient.

Qmail didn't blink when I told it to deliver to the same recipient three
times, and did indeed deliver three messages. Gmail, on the other hand,
said:

   250 2.1.5 OK, duplicate recipients will be consolidated

I haven't found any RFC's at all that specify that this is a required or
even optional behavior. Implementing it does not seem to violate the RFCs
(so long as the server sends a 250 response), but not implementing it
doesn't seem to violate any either.

I think he's correct that Gmail et all are "smart enough" to consolidate
duplicate addresses, but that this is not a required behavior and Qmail is
perfectly compliant. I might be tempted to point out that other developers
are "smart enough" not to address their messages redundantly, but that
might lead to violence.

Angus







Diana Calder wrote:
> We are implementing a new piece of software to handle vacation
> requests. The program connects directly to our Qmail server's SMTP - no
other mail servers are involved. Said software sends an email to the
requester and their supervisor when the supervisor okays the vacation
request. The requester currently receives the same email twice because
the program puts the requester's email address in both the TO: and the
CC: headers. The software developer and I are having a bit of a
"discussion" regarding this.
>
> My position is that Qmail is doing its job correctly by delivering the
email exactly as it is addressed and the problem lies in his program
which is clearly incorrect in the way that it addresses the message.
>
> The developer's position is that our email server is at fault. He
"proved" this by sending an email with his address in it 5 times (once
in TO: and 4x in CC:). He claims that Qmail is at fault because other
email servers (like Exchange and Gmail) are, and I quote, "smart enough
to recognize that all copies are for one person therefore instead of 5
emails only one copy is in my inbox." Because of this, getting him to
fix his broken program is becoming somewhat of an issue.
>
> Just to confirm here - anybody have a handy RFC to prove that Qmail is
actually doing what it should by delivering email as addressed and the
other mail servers are actually behaving in a non-standard way by
"deciding" that the emails are all the same and only delivering one
copy? Or am I wrong and Qmail is indeed in the wrong by delivering
exactly what the headers tell it to?
>
>
> --
> Best regards,
>  Diana Calder
mailto:dcal...@essexcountylibrary.ca
> Automation Technician            (519) 776-5241 x.131
> Essex County Library
> Essex, ON
>
>
> --------------------------------------------------------------------- To
unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com For
additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com
>
>


-- 





---------------------------------------------------------------------
To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com
For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com

Reply via email to