Doppler shift and special relativity I have been listening to an audio course on Special Relativity.  In the course the teacher repeatedly says that the "laws of physics are equally valid for all uniformly moving frames of reference".  He further mentioned that that we know that distant galaxies are moving away from us because the light that they emit is Doppler shifted.  I am struggling to understand the following.
How does the galaxy "know" that it is moving?  (I think that it is safe to assume that it is moving relatively uniformly so the teacher's statement about "uniformly moving frames" should hold.)  So in the galaxy's reference frame it is stationary, so from its point of view it should emit un-shifted light with energy $E$ and speed $c$.  Sometime later the photon strikes our telescope with those same properties.  Regardless of how fast we are going with respect to the originating galaxy, the photon moves at speed $c$ and has energy $E$ when we observe it.  So it seems to me that special relativity should conclude that the Doppler effect should not be observed because a source does not have an absolute speed; from its point of view, it is stationary.  
So the crux of my question is this:  How does a distant galaxy know about the relative speed of a future observer in order to know how to Doppler shift its emitted photons.  This seems to break causality.
 A: "Regardless of how fast we are going with respect to the originating galaxy, the photon moves at speed c and has energy E when we observe it."
Not true. The photon moves at c, but it will have a shifted energy E' < E (if the relative velocity is moving away from us). The emitter doesn't "know" that it's moving, and it doesn't need to. The point is that different reference frames don't necessarily agree about the energy of that emitted photon, which is the red-shift. This must hold because, for instance, we can imagine a device that produced an EM wave with a certain frequency and used this as a clock. But to an observer in relative motion, this clock appears to be running slow--that is, the frequency is different.
If you're doing any mathematics for this course, it is not too complicated to work out the effect of the Lorentz transform on the four-vector formed by $(\omega /c, \vec{k})$ and see this.
A: 
So in the galaxy's reference frame it is stationary, so from its point of view it should emit un-shifted light with energy $E$ and speed $c$.

This is correct. The part you have confused is:

Regardless of how fast we are going with respect to the originating galaxy, the photon moves at speed $c$ and has energy $E$ when we observe it.

The observed energy depends on your relative motion to the source.
The energy of a photon relates to its frequency by $E = hf$.
The speed of a photon relates to its frequency by $v = \lambda f$ with $v = c$.
You can see that because $v$ must be a constant for all observers, the only element that can change is $f$ or $\lambda$. Both must change at the same time proportionately to maintain a constant speed of light - if wavelength doubles, frequency must halve.
Doppler Shifting makes this apparent - when moving away from a source of waves, the distance between each wave front increases, which reduces frequency, since each wave front takes a bit longer to reach you. Signals who's source was moving away from you at the time of emission will appear to have lower frequency then they ought to by virtue of their source's motion at the time.
Due to Doppler Shifting, if the source galaxy is moving away from us, then the arriving photons appear more 'stretched' then they ought to be - just like sound waves would be (without the simplicity of air to "vibrate in"). They too would have lower frequency from our point of view, and from the galaxy's point of view the photon will always have the same frequency.
This doesn't mean any energy has gone missing. What it does mean is that the energy you measure depends on relative motion, so depending on your choice of reference frame, values for energy (just like for speed and momentum) can change numerically but not physically.
Consider a photon trapped between two perfect aligned mirrors - each 'bounce' would be transferring momentum from one mirror to the other with known energy. If you're flying past the mirrors at relativistic speeds, you would never see the mirrors measure a different force despite seeing the photon taking on a Doppler-Shifted value for energy and always traveling at $c$.
What will complicate this answer is that the universe appears to be expanding. So in fact not only would a distant galaxy be moving away from us, but also appear to be accelerating away from us. This means that for a galaxy emitting a photon, if it could see it somehow, it would notice it slowly Doppler Shifting further into lower frequencies as it gets further from the galaxy.
So to address this directly:

How does a distant galaxy know about the relative speed of a future observer in order to know how to Doppler shift its emitted photons.

It doesn't.
It is a bit mind-bending but it is the case that a photon emitted from one galaxy and seen in another, has traveled that entire distance in 'an instant'. As far as the photon is concerned, the emission and absorption (in your eyes for example) happened at the same time, so the relative motions of the source and destination are seen 'at the same time' from the photon's POV.
Though, care has to be taken when talking about the POV of a photon - an inertial reference frame does not exist at light speed but for argument's sake (and some hand-waving) you can think of anything undergoing motion at light speed as 'frozen in time'.
Effectively we're seeing a photon that is carrying a set amount of energy, that was emitted in a reference frame that is moving away from us, and because it's still (in a sense) in a reference frame that is moving away despite traveling all this way, it will be shifted.
A: For simplicity, let's ignore the expansion of space in general relativity and just consider how things work for two galaxies moving apart in the flat spacetime of special relativity. Suppose a galaxy is moving away from the Earth at 0.6c, and it's emitting a radio wave that in its own rest frame has a wavelength of 4 light-nanoseconds (a light-nanosecond the distance light travels in a nanosecond, or 0.299792458 meters). So in this galaxy's rest frame, the distance between successive peaks of the wave is 4 light-nanoseconds, and since the wave moves at c, the frequency must be given by (c/wavelength) = (1 light-nanosecond per nanosecond)/(4 light-nanoseconds) = 0.25 peaks per nanosecond. This means that in the galaxy's frame, it emits a new peak once every 4 nanoseconds.
So, what is the wavelength and frequency in the Earth's rest frame? Well, if the galaxy is moving at 0.6c in the Earth's frame, then it must be time dilated by a factor of $1/\sqrt{1 - 0.6^2} = 1/0.8 = 1.25$, so instead of emitting a peak every 4 nanoseconds, in our frame it emits a new peak every 4*1.25 = 5 nanoseconds. So if the galaxy is X light-nanoseconds away when it emits peak #1, then 5 nanoseconds later it will be emitting peak #2, and at that moment peak #1 will have moved towards us at c so it'll be at (X - 5) light-nanoseconds away, while the galaxy itself will have moved further away by 0.6c * 5 nanoseconds = 3 light-nanoseconds, so the galaxy will be at (X + 3) light-nanoseconds away from us. Thus, the distance between peak #1 and peak #2 at the moment peak #2 is emitted is actually 8 light-nanoseconds in our frame, not 4. So that will remain the wavelength of the radio wave in our frame, and since the radio wave moves at c in our frame, the frequency must be (c/wavelength) = 0.125 peaks per nanosecond. And these are exactly the wavelength and frequency predicted in our frame by the relativistic Doppler equation, given the wavelength and frequency in the emitter's frame, and the fact that the emitter is moving away at 0.6c. And once you know the frequency in our frame, the energy in our frame can be found by E=hf. So as you can see from this example, the light doesn't really have to "know" anything, to get the correct shift we just have to take into account the fact that the emitter is time dilated (so the time between successive peaks is stretched), and that the emitter moves away from us a bit between emitting successive peaks, which further stretches the wavelength in our frame.
