HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2012-09-21 f33c40fad74b2b44025ece2352c0f8c3c0ba50aa
format source
1 files modified
32 ■■■■ changed files
hsarback/test/de/hsadmin/remote/DomainTest.java 32 ●●●● patch | view | raw | blame | history
hsarback/test/de/hsadmin/remote/DomainTest.java
@@ -283,25 +283,23 @@
        });
    }
private void testGreylistingOnOff(boolean onoff, String message)
        throws UnknownHostException, IOException {
    testDomainptionOnOf(onoff, message, new DomainOptionTester() {
    private void testGreylistingOnOff(boolean onoff, String message)
            throws UnknownHostException, IOException {
        testDomainptionOnOf(onoff, message, new DomainOptionTester() {
        @Override
        public String getOptionName() {
            return "greylisting";
        }
            @Override
            public String getOptionName() {
                return "greylisting";
            }
        @Override
        public boolean isOptionConfigured(String domain)
                throws UnknownHostException, IOException {
            String host = "test-h99.hostsharing.net";
            String answer = socketQuery( host, 25,
                    "HELO " + domain + "\n" +
                    "MAIl FROM: hsadmin-testing@" + domain + "\n" +
                    "RCPT TO: postmaster@" + domain + "\n" +
                    "DATA\n" +
                    ".\n") ;
            @Override
            public boolean isOptionConfigured(String domain)
                    throws UnknownHostException, IOException {
                String host = "test-h99.hostsharing.net";
                String answer = socketQuery(host, 25, "HELO " + domain + "\n"
                        + "MAIL FROM: hsadmin-testing@" + domain + "\n"
                        + "RCPT TO: postmaster@" + domain + "\n" + "DATA\n"
                        + ".\n");
                return answer.contains("450") && answer.contains("reylisting");
            }
        });