Policies of immunising the susceptibles in the general stochastic epidemic are considered. With costs assigned to the infection and immunisation of susceptibles, an optimal policy is found which at any stage minimises the expected future cost. Optimal policies are also found for the general deterministic epidemic and for an epidemic with carriers model. The three policies are compared and numerical examples are provided. An optimal policy is described in the situation when both isolation of infectives and immunisation of susceptibles are allowed.