NOVELTY - Purifying a biodiesel feedstock involves: filtering a biodiesel feedstock, thus separating from the feedstock solid particles having a diameter up to 2 microns, to provide a filtrate and a retentate; separating water from the filtrate, to provide a dried filtrate; distilling the dried filtrate, to provide a distillate and a residue; distilling the distillate to provide a subsequent distillate and optionally a subsequent residue; and passing the subsequent distillate through an ion exchange resin to obtain a purified biodiesel feedstock e.g. edible oils or fats.    USE - For purifying a biodiesel feedstock comprising edible oils, inedible oils, fats, greases, brown grease, trap grease, used cooking oil, used cooking fat, animal fat, animal grease, and fatty acid distillate (all claimed).    ADVANTAGE - The pretreatment process separate from the biodiesel feedstock, impurities such as sulfur, phosphorus, gums/lipids, sterols, calcium, magnesium, iron, copper, cobalt, manganese, nickel, sodium, potassium, chlorophyll, carotenoids, xanthophylls, proteins, carbohydrates, aldehydes, ketones, carboxylic acids, perchloroethylene, polyaromatic hydrocarbons, polychlorinated hydrocarbons, polymerized triglycerides, pesticides, soaps, detergents, sulfonates, sulfates, phosphatides, phytosterols, sitosterols, cholesterol, and sterol glucosides; has the ability to handle biodiesel feedstock having high levels of gums, phosphorus, sterols, sulfur, and/or color contaminants. The pretreatment process can significantly reduce the phosphorus and sulfur levels to below 10 ppm in the treated feedstock. The pretreatment process can also significantly reduce the levels of chlorophyll, color bodies, gums, phosphatides, gums, sterols, and/or metals (e.g. calcium, magnesium, iron, copper, sodium, and potassium) in the treated feedstock. The method does not employ the introduction of water; does not employ the introduction of a toxic mineral acid (e.g. phosphoric acid, sulfuric acid, hydrochloric acid or citric acid. The esterification process can be carried out in the absence of a toxic mineral acid. The method uses relatively wide-variety of inexpensive and low-grade, that would otherwise be considered waste and disposed of e.g. in a land-fill.    DETAILED DESCRIPTION - Purifying a biodiesel feedstock involves: filtering a biodiesel feedstock, thus separating from the feedstock solid particles having a diameter up to 2 microns, to provide a filtrate and a retentate; separating water from the filtrate, to provide a dried filtrate; distilling the dried filtrate, to provide a distillate and a residue; distilling the distillate to provide a subsequent distillate and optionally a subsequent residue; and passing the subsequent distillate through an ion exchange resin to obtain a purified biodiesel feedstock, where the biodiesel feedstock comprises at least one of edible oils, inedible oils, fats, greases, brown grease, trap grease, used cooking oil, used cooking fat, animal fat, animal grease, and fatty acid distillate and where the following are substantially separated from the biodiesel fuelstock in first to fifth steps, as present; sulfur, phosphorus, gums/lipids, sterols, calcium, magnesium, iron, copper, cobalt, manganese, nickel, sodium, potassium, chlorophyll, carotenoids, xanthophylls, proteins, carbohydrates, aldehydes, ketones, carboxylic acids, perchloroethylene, polyaromatic hydrocarbons, polychlorinated hydrocarbons, polymerized triglycerides, pesticides, soaps, detergents, sulfonates, sulfates, phosphatides, phytosterols, sitosterols, cholesterol, and sterol glucosides.