Optimization of compound permeation into Gram-negative bacteria is one of the most challenging tasks in the development of antibacterial agents. Two permeability barriers�the passive diffusion barrier of the outer membrane (OM) and active drug efflux�act synergistically to protect cells from the antibacterial action of compounds. In Escherichia coli (E. coli) and relatives, these two barriers sieve compounds based on different physicochemical properties that are defined by their interactions with OM porins and efflux pumps, respectively. In this study, we critically tested the hypothesis that the best substrates and inhibitors of efflux pumps are compounds that can effectively permeate the OM and are available at relatively high concentrations in the periplasm. For this purpose, we filtered a large subset of the ZINC15 database of commercially available compounds for compounds containing a primary amine, a chemical feature known to facilitate the uptake through E. coli general porins. The assembled library was screened by ensemble docking to AcrA, the periplasmic component of the AcrAB-TolC efflux pump, followed by experimental testing of the top predicted binders for antibacterial activities, efflux recognition, and inhibition. We found that the filtered primary amine library is a rich source of compounds with effluxinhibiting activities and identified efflux pump inhibitors with novel chemical scaffolds effective against E. coli AcrAB-TolC and efflux pumps of multidrug-resistant clinical isolates of Acinetobacter baumannii. However, primary amines are not required for the recognition of compounds by efflux pumps and their efflux-inhibitory activities.