I heard this once and I really try to follow it; I can't tell you how many times it has stopped me from saying something I shouldn't:
Try the acronym T.H.I.N.K. the next time you are not sure whether or not you should say something -
T- It is Truthful?
H - Is it Helpful?
I - Is is Inspiring?
N - Is it Necessary
K - Is it Kind?