How to use imap blocks in OB2

I want to make a mail access config that gets domains and ports(IMAP) from the domain lists and then checks it for valid with the matched domain? how do I do it in OB2?

Search in the forum this has already been asked