HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2012-09-21 ec62249fb8dff1c6dd9347933a7915dba76c8275
revert domain selection with postgrey domainoption
1 files modified
7 ■■■■ changed files
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java 7 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
@@ -193,8 +193,11 @@
    
    private Processor createPostgreyConfiguration(EntityManager em) throws ProcessorException {
        ArrayList<Map<String, String>> domsMaps = new ArrayList<Map<String, String>>();
        Query query = em.createQuery("SELECT d FROM Domains d WHERE d.domainoptions.name = :option");
        query.setParameter("option", "nogreylisting");
        Query query = em.createQuery("SELECT DISTINCT dom FROM Domains WHERE NOT EXISTS " +
            "( SELECT postgreyDom FROM Domains postgreyDom " +
            "   WHERE postgreyDom.domainoptions.name = :option" +
            "         AND postgreyDom.name = dom.name )");
        query.setParameter("option", "greylisting");
        List<?> result = query.getResultList();
        for (Object dom : result) {
            if (dom instanceof Domain) {