
### router/225_elho-mta-mailserver_roleaccount_aliases
######################################################

# This router handles aliasing using the /etc/aliases-roleaccount file to
# handle mail to role accounts as per RFC2142.
#
# This router is placed early in the list of routers to ensure role accounts
# are valid even for fully virtual domains.
#
# This router handles the local part in a case-insensitive way which
# satisfies the RFCs requirement.
#
# Delivery to arbitrary directories, files, and piping to programs in
# /etc/aliases-roleaccount is disabled per default.
# If that is a problem for you, see
#   /usr/share/doc/exim4-base/README.Debian.gz
# for explanation and some workarounds.

roleaccount_aliases:
  debug_print = "R: roleaccount_aliases for $local_part@$domain"
  driver = redirect
  domains = +local_domains
  allow_fail
  allow_defer
  data = ${lookup{$local_part}lsearch{/etc/aliases-roleaccount}}
  .ifdef SYSTEM_ALIASES_USER
  user = SYSTEM_ALIASES_USER
  .endif
  .ifdef SYSTEM_ALIASES_GROUP
  group = SYSTEM_ALIASES_GROUP
  .endif
  .ifdef SYSTEM_ALIASES_FILE_TRANSPORT
  file_transport = SYSTEM_ALIASES_FILE_TRANSPORT
  .endif
  .ifdef SYSTEM_ALIASES_PIPE_TRANSPORT
  pipe_transport = SYSTEM_ALIASES_PIPE_TRANSPORT
  .endif
  .ifdef SYSTEM_ALIASES_DIRECTORY_TRANSPORT
  directory_transport = SYSTEM_ALIASES_DIRECTORY_TRANSPORT
  .endif
