# # virtual domain handling # # Use /etc/exim/virtual_domains to set up a virtual server. # # aliases in virtual domains # For a virtual domain, an optional aliases file may be created # in /etc/exim/aliases.d, named like the virtual domain itself. # If the file doesn't exist, /etc/exim/aliases.default is used. virtual_domain_aliases: driver = aliasfile require_files = /etc/exim/aliases.d/$domain file = /etc/exim/aliases.d/$domain optional domains = lsearch;/etc/exim/virtual_domains local_parts = ${if ! eq {$local_part} {owner} {$local_part}} search_type = lsearch* qualify_preserve_domain expand #pipe_transport = list_request_transport skip_syntax_errors syntax_errors_to = postmaster@$qualify_domain syntax_errors_text = "Syntax error in configuration file /etc/exim/aliases.d/$domain found. Skipped one line." # owner of domain # Each domain has an owner, as defined in /etc/exim/virtual_domains. # "owner" is a reserved word for a local part in a virtual domain. # owner@ gets mapped to the defined @. virtual_domain_owner: driver = smartuser local_parts = owner new_address = ${lookup {$domain} lsearch {/etc/exim/virtual_domains}\ {$value}fail} qualify_preserve_domain new_director = virtual_domain_to_local # local delivery preparation # Convert virtual domain users to local users. # A line in /etc/exim/alias.d/ can be of the form # : # This means @ gets mapped to @. virtual_domain_to_local: driver = smartuser require_files = /etc/exim/aliases.d/$domain domains = lsearch;/etc/exim/virtual_domains no_panic_expansion_fail # qualify local_part with the system qualify_domain, if an entry of the form 'user : user' # is found in the domain's alias file. new_address = ${if eq {$local_part}\ {${expand:${lookup {$local_part} \ lsearch {/etc/exim/aliases.d/$domain} \ {$value}}}} \ {$local_part}fail} new_director = virtual_domain_dummy # provide defaults # Certain addresses, like postmaster and abuse should exist in every domain. # You can provide mapings to the domain owner in /etc/exim/aliases.default. virtual_domain_default: driver = aliasfile # no list found and not owner and no alias condition = ${if and\ {\ {! exists {/etc/exim/lists.d/$local_part@$domain} } \ {! eq\ {$local_part}\ {\ ${lookup {$domain} lsearch {/etc/exim/virtual_domains}\ {$value}\ }\ }\ }\ {eq\ {\ ${if exists {/etc/exim/aliases.d/$domain}\ {\ ${lookup {$local_part}\ lsearch {/etc/exim/aliases.d/$domain}\ {has_alias}{no_alias}\ }\ }\ {no_alias}\ }\ }\ {no_alias}\ }\ }\ {get_default}\ {no}\ } domains = lsearch;/etc/exim/virtual_domains require_files = /etc/exim/aliases.default file = /etc/exim/aliases.default search_type = lsearch* qualify_preserve_domain expand # dummy director # The last director for virtual domain handling serves as a # a "jumping target" for earlier directors. virtual_domain_dummy: driver = smartuser condition = no new_address = finished_processing_virtuals # simple lists # Set up a file named like the list's address # in /etc/exim/lists.d/@ # containing one address on each line. Mail will be # delivered to each such address. simple_lists: driver = aliasfile condition = ${lookup {$local_part} \ lsearch {/etc/exim/lists.d/$local_part@$domain} \ {no}{yes}} require_files = /etc/exim/lists.d/$local_part@$domain file = /etc/exim/lists.default search_type = lsearch* expand qualify_preserve_domain skip_syntax_errors syntax_errors_to = postmaster@$qualify_domain syntax_errors_text = "Syntax error in configuration file /etc/exim/lists.d/$local_part@$domain found. Skipped one line." # end of virtual domain handling