Then Venerable Ānanda went up to the Buddha, bowed, sat down to one side, and said to him:
“Sir, there are these three kinds of fragrance that spread only with the wind, not against it. What three? The fragrance of roots, heartwood, and flowers. These are the three kinds of fragrance that spread only with the wind, not against it. Is there a kind of fragrance that spreads with the wind, and against it, and both ways?”
“There is, Ānanda, such a kind of fragrance.”
“So what, sir, is that kind of fragrance?”
“It’s when, Ānanda, in some village or town, a woman or man has gone for refuge to the Buddha, the teaching, and the Saṅgha. They don’t kill living creatures, steal, commit sexual misconduct, lie, or take alcoholic drinks that cause negligence. They’re ethical, of good character. They live at home with a heart rid of the stain of stinginess, freely generous, open-handed, loving to let go, committed to charity, loving to give and to share.
Ascetics and brahmins everywhere praise them for these good qualities; even the deities praise them. This is the kind of fragrance that spreads with the wind, and against it, and both.
The fragrance of flowers doesn’t spread against the wind,
nor sandalwood, pinwheel flowers, or jasmine;
but the fragrance of the good spreads against the wind;
a good person’s virtue spreads in every direction.”
Source: https://suttacentral.net/an3.79 Gandhajāta Sutta AN 3.79 AN i 225