Undulator radiation by relativistic electron bunches which are long compared to a wavelangth, is considered. The effect of irregularities in the bunch shape and of finite undulator length is calculated. The radiation power can be strongly enhanced. A numerical example is discussed.