In Grails there is support for property placeholders in resources.xml, but for resources.groovy you should do it manually. Fortunately, it is quite easy, here is example:
import org.codehaus.groovy.grails.commons.ConfigurationHolder as CH
beans = {
integration.channel(id:'channel', host:'imaps://user:${CH.config.imap.password}@imap.gmail.com/INBOX')
}