First of all , congrats! And its awesome you want to bf again after a bad round last time.
To avoid mastitis, look out for the signs. I had a red patch on one of my breasts and had a couple blocked ducts. All I had to do was feed, feed, feed. Have a warm/hot shower and massage the affected area.
When you massage, direct the motion toward the nipple. - A little trick I learned from my midwife.
Talk to your midwife for some tips. If you run into trouble/need help, find a lactation consultant in your area. They are fantastic
Good luck!