The careless disposal of a cigarette was the cause of a six-alarm blaze in Dorchester on Wednesday that caused an estimated $1.2 million in damage and left 30 people homeless, the Boston Fire Department said Friday. The fire began on the third-floor rear porch of the house. It spread to two neighboring properties, the department said. The blaze struck around 6:35 p.m. Wednesday. Fire officials said the fire was a “perfect storm” because the three-deckers were close to each other and the fire swirled in a confined space.Martin Finucane can be reached at firstname.lastname@example.org.