Re: Where does email get bounced to?

Twayne wrote:
Using Apache + PHP on linux.
Say I use php to send an email, and that email bounces.

Where does it end up?

Can I force the return address so it would consistently go to a
particular address?


To legitimately "bounce", an e-mail must be returned to the sending
IP with a code that says it can't be accepted. That server in turn
returns it to the Sender via the same chain it arrived in.

Accepting an e-mail and THEN bouncing it later is also possible, is
frowned upon, and very often "bounces" the e-mail to an innocent
party, NOT the sender, since it may use the forged envelope
information to determine where to send the bounce TO. This is not a
"bounce"; it's a New Mail being sent out! Since effectively ALL
spam has forged headers, this type of returning mail will always
send the bounce to the wrong person, and innocent party, effectively
spamming that person and making YOU open to spam complaints.

So, when you bounce, to do so correctly, you must do it during the
initial attempt to send you the e-mail and while you are still
connected to the IP; that way the spam/whatever doesn't even
traverse the network when you refuse it.

Feel free to research what I'm telling you with authorative sources;
if you can't find any, let me know and I can set you up but right
now I'm in a hurry.

My 2 ¢

Thanks much. I see I have a bit of research to do, and some testing.

The long version:

We want to send out newletters by email. Some of our members complain
about outgoing emails bouncing, so I am expecting the newletters will
have the same problems and want them to bounce back to a specific
account. That way, the sendee address can be temporarily dropped until
the member whitelists us, or can be convinced to just download the
newletter off the website.
The site is on shared hosting, and I am concerned bounces will end up
in the ISP's mail. These days, there is so much returned spam with
fake return addresses that bounces are to be expected even for well
known organizations (which ours is not).

Yes, you do have quite a bit of research to do and I seriously suggest
you do it.
Are you talking about being client-side or server-side?
I can't tell for sure exactly where you think mail bounces happen, but
the process is done by the SERVER, NOT by the sender. And, if a mail
does bounce, if it's done properly the bounce ALWAYS goes back to the
SENDER and no one else.
So, if you are client side and send an email that bounces, YOU are
going to get the email back with a bounce notice, just like a
misaddressed postal mail. That's the only way it can work when a mail
cannot be delivered.
Now, if you are the SERVER, and someone sends an email using your
MTA/MTX, then it's up to YOU to be certain that any emails that can't be
delivered go back to the SENDER and no one else.
SO, if you're writing server-side PHP, the SERVER (Apache Unix,
whatever) has to do these things. These functions are part of the
server-side OS so the client-side has nothing, nada, zip, it can do
about bounces.
All you can do with PHP or any other language, unless you ARE the
server, is converse with the server, NOT control anything it does.

There is little more I or anyone else here is likely to be able to do
for you. If you'd like a good place to ask questions and get
knowledgeable responses, try the newsgroups at . In
particular, the .spamcop group. Better yet, just to go spamcop.NET (NOT
spamcop.COM!) and start reading the FAQs about spam and what to do if
you're reported, things like that; you'll learn a lot there about the
process. Looking up a couple of RFCs would be a good idea too.

This is off topic enough now that people are going to start complaining
rather loudly about further communications in this group. I also post
over at, by the way; good place to hang out to learn about
how the network works and the damage spam can do to an ignorant server


Open Office isn't just for wimps anymore;
OOo is a GREAT MS Office replacement