ClearFoundation Tracker - ClearOS
View Issue Details
0000926ClearOSapp-smtp - SMTP Serverpublic2013-01-09 06:522013-01-29 13:20
timb80 
user2 
normalminoralways
closedfixed 
6.3.0 
6.3.0 Updates6.3.0 Updates 
0000926: Mail forward domains should not be added to searchdomains list for zarafa-alias lookup
As described here
http://www.clearfoundation.com/component/option,com_kunena/Itemid,232/catid,14/func,view/id,45297/limit,10/limitstart,10/#49429 [^]

Mail Forwarding domains are not meant to be delivered locally, and should not be added to the searchdomains list, to enumerate aliases

alias1@mydestinationdomain.com is OK
alias1@myforwardingdomain.com should not be added

At present email sent to alias1@myforwardingdomain.com goes to alias1@mydesintationdomain.com (local user mailbox)
No tags attached.
related to 0000689closed user2 Add a hash file of local domains in order support mail alias lookups 
Issue History
2013-01-09 06:52timb80New Issue
2013-01-09 06:53timb80Relationship addedrelated to 0000689
2013-01-09 07:05timb80Note Added: 0000628
2013-01-09 07:06timb80Note Edited: 0000628bug_revision_view_page.php?bugnote_id=628#r26
2013-01-09 07:07timb80Note Edited: 0000628bug_revision_view_page.php?bugnote_id=628#r27
2013-01-09 08:30user2Assigned To => user2
2013-01-09 08:30user2Statusnew => confirmed
2013-01-09 12:06user2Note Added: 0000629
2013-01-09 12:06user2Target Version => 6.3.0 Updates
2013-01-09 12:06user2Note Edited: 0000629bug_revision_view_page.php?bugnote_id=629#r29
2013-01-09 12:08user2Statusconfirmed => resolved
2013-01-09 12:08user2Fixed in Version => 6.3.0 Updates
2013-01-09 12:08user2Resolutionopen => fixed
2013-01-29 13:20user2Statusresolved => closed

Notes
(0000628)
timb80   
2013-01-09 07:05   
(edited on: 2013-01-09 07:07)
Forwarded domains should not be part of get_local_domains... (only seems to be used for updating search domains)
/usr/clearos/apps/smtp/libraries/Postfix.php

    /**
     * Returns local domains.
     *
     * Local domains include:
     * - primary domain (mydomain)
     * - destination domains (mydestination)
     * - forwarder domains (/etc/postfix/transport)
     *
     * @return array list of local domains
     * @throws Engine_Exception
     */

    public function get_local_domains()
    {
        clearos_profile(__METHOD__, __LINE__);

        $domains = array();

        // Primary domain
        $domains[] = $this->get_domain();

        // Destination domains
        $domains = array_merge($this->get_destinations(TRUE), $domains);

---- // Forwarder domains
---- $forwarders = $this->get_forwarders();

---- foreach ($forwarders as $id => $details)
---- $domains[] = $details['domain'];

        return $domains;
    }

(0000629)
user2   
2013-01-09 12:06   
The Amavis engine uses Postfix.get_local_domains() to populate the @local_domains_maps parameter. So, I created another method -- get_delivery_domains() -- which only includes the primary domain and destination domains.