This paper deals with a generalized M/G/1 feedback queue in which customers are either ‘positive’ or ‘negative’. We assume that the service time distribution of a positive customer who initiates a busy period is Ge(x) and all subsequent positive customers in the same busy period have service time drawn independently from the distribution Gb(x). The server is idle until a random number N of positive customers accumulate in the queue. Following the arrival of the N-th positive customer, the server serves exhaustively the positive customers in the queue and then a new idle period commences. This queueing system is a generalization of the conventional N-policy queue with N a constant number. Explicit expressions for the probability generating function and mean of the system size of positive customers are obtained under steady-state condition. Various vacation models are discussed as special cases. The effects of various parameters on the mean system size and the probability that the system is empty are also analysed numerically.