Wiki

Clone wiki

PowerDNS_Admin / Configuration

Create a file PowerDNS_Admin-config.groovy with the content below and edit it to suit your setup.

The PowerDNS_Admin-config.groovy file should be placed somewhere in the classpath (eg. in the /usr/share/jetty8/resources/ folder for Jetty8 on Debian/Ubuntu).

#!groovy

/* DataSource Configuration */

dataSource {
    pooled = true
    dbCreate = "update"  
    //dbCreate = "validate" // Makes no changes, but reports any warnings   

    // For PostgreSQL uncomment
    //driverClassName = "org.postgresql.Driver"
    //dialect = org.hibernate.dialect.PostgreSQLDialect
    //url = "jdbc:postgresql://localhost:5432/pdns"

    // For MySQL uncomment
    driverClassName = "com.mysql.jdbc.Driver"
    dialect = "org.hibernate.dialect.MySQL5InnoDBDialect"
    url = "jdbc:mysql://localhost:3306/pdns"

    // Database credentials
    username = "pdns"
    password = "somepassword"
}


grails {

    /* Mail Configuration */
    mail {

        // SMTP host and port
        host = "localhost"
        port = 25

        // For authentication uncomment
        //username = "powerdns@domain.com"
        //password = "somepassword"
        //props = ["mail.smtp.auth":"true"]

        // For SSL uncomment
        /*props = ["mail.smtp.auth":"true",
                "mail.smtp.socketFactory.port":"465",
                "mail.smtp.socketFactory.class":"javax.net.ssl.SSLSocketFactory",
                "mail.smtp.socketFactory.fallback":"false"]*/

        // To debug/test and send all email to the address below, uncomment
        //overrideAddress="you@domain.com"
    }

    /* PowerDNS Admin Configuration */
    powerdns {
        // Enable or Disable the new account registration
        register = false
    }


    plugin {

        /* Spring Security Plugin Configuration */
        springsecurity {
            ui {
                password {
                    minLength = 8
                    maxLength = 64
                    validationRegex = '^.*(?=.*\\d)(?=.*[a-zA-Z])(?=.*[!@#$%^&]).*$'
                }

                register {
                    //emailBody = '...'
                    emailFrom = 'PowerDNS Admin <powerdns@domain.com>'
                    //emailSubject = 'Welcome to PowerDNS Admin'
                }

                forgotPassword {
                    //emailBody
                    emailFrom = 'PowerDNS Admin <powerdns@domain.com>'
                    //emailSubject = ''
                }

            }

        }

    }
}

Updated