Catalyzes the oxidative deamination of primary amines to the corresponding aldehydes with the concomitant production of hydrogen peroxide and ammonia (PubMed:12072962, PubMed:19764817, PubMed:239684, PubMed:8144586). Its preferred substrates are the diamines histamine and 1-methylhistamine and it could therefore play a role in allergic and immune responses (PubMed:12072962). Has a broad specificity for diamines and can also act on cadaverine and putrescine, two products of amino acid catabolism (PubMed:12072962). It could also act on polyamines, like spermidine and spermine though less efficiently, and regulate various biological processes (PubMed:12072962, PubMed:239684).