In order to investigate the interaction between tax policy, welfare benefits, the government technology for monitoring and sanctioning inadequate search, workfare, and externalities from work, we incorporate endogenous job search and involuntary unemployment into a model of optimal nonlinear income taxation. In this setting, the government faces a trade-off between boosting employment of low-skilled agents and raising work effort of high-skilled workers. If sanctions for inadequate search effort can be targeted at high productivity types for whom it is socially optimal to search, the government can afford to levy higher labor taxes on marginal workers without discouraging these agents from seeking work. This allows for lower marginal taxes on work effort of agents with a job. In contrast to workfare, job externalities in the private sector raise marginal tax rates, as the government attaches more importance to boosting employment of low-skilled workers.