[Exim] [HELP] Virtual Domains and Forward Files

Top Page
Delete this message
Reply to this message
Author: Lucas J Barbuto
Date:  
To: exim-users
Subject: [Exim] [HELP] Virtual Domains and Forward Files
Hi All,

I'm hoping to get some help with my Exim configuration. A couple of
months ago I implemented multiple virtual domains on my mail server,
with seperate alias and password files for each domain. It took me a
while but eventually I got it working (except for the catchall, I never
managed to have that going properly).

Anyhow, the problem is that the Exim filter files I had setup for
certain user accounts (using the ~/.forward file) stopped working. I
was hoping someone could have a quick look over my configuration and let
me know why Exim isn't looking for the user's forward file. As you will
see, I'm also running Amavis. The exim.conf file is getting quite big
and complicated for me to manage (being an inexperienced mail
administrator). If anyone else spots potential problems, feel free to
point them out.

I have tested the filter files using 'exim -bf', i'm pretty confident
that they are OK and that it's the configuration file that has the
problem.

I'm running Exim version 3.35 #1 built 04-Mar-2002 23:05:40 on Debian
Woody. My exim.conf is attached, minus most comments.

Thanks in advance.

Regards,

Lucas

exim.conf:
-----------------------------------------------------------------------
######################################################################
#                    MAIN CONFIGURATION SETTINGS                     #
######################################################################


message_size_limit = 5120000
return_size_limit = 102400

qualify_domain = qk.com.au
primary_hostname = mail.qk.com.au

local_domains = localhost:\
        lsearch;/etc/exim/virtual/domains


local_domains_include_host = true
local_domains_include_host_literals = true

never_users = root

host_lookup = *
host_accept_relay = 127.0.0.1 : 10.0.0.0/24
host_auth_accept_relay = *
trusted_users = mail:www-data:amavis
smtp_verify = true

gecos_pattern = ^([^,:]*)
gecos_name = $1

smtp_accept_queue_per_connection = 100

freeze_tell_mailmaster = true

received_header_text = "Received: \
         ${if def:sender_rcvhost {from ${sender_rcvhost}\n\t}\
         {${if def:sender_ident {from ${sender_ident} }}\
         ${if def:sender_helo_name {(helo=${sender_helo_name})\n\t}}}}\
         by ${primary_hostname} \
         ${if def:received_protocol {with ${received_protocol}}} \
         (Exim ${version_number} #${compile_number} (Debian))\n\t\
         id ${message_id}\
         ${if def:received_for {\n\tfor <$received_for>}}"


receiver_try_verify = true



######################################################################
#                      TRANSPORTS CONFIGURATION                      #
######################################################################


amavis:
driver = pipe
command = "/usr/local/sbin/amavis -f <${sender_address}> -d ${pipe_addresses}"
prefix =
suffix =
check_string =
escape_string =
headers_add = "X-Virus-Scanned: by AMaViS (http://amavis.org/)"
return_output = false
return_path_add = false
user = amavis
group = amavis
path = "/bin:/sbin:/usr/bin:/usr/sbin"
current_directory = "/var/amavis"

virtual_localdelivery:
driver = appendfile
envelope_to_add = true
user = ${local_part}
group = mail
mode = 0660
mode_fail_narrower = false
return_path_add = true
directory = /var/mail/$local_part/new
directory_mode = 0770
create_directory = true

local_delivery:
driver = appendfile
group = mail
# maildir_format
mode = 0660
mode_fail_narrower = false
envelope_to_add = true
return_path_add = true
# file = /var/spool/mail/${local_part}
directory = /var/mail/${local_part}/new
create_directory = true
directory_mode = 0770

address_pipe:
driver = pipe
path = /usr/bin:/bin:/usr/local/bin
return_output

address_file:
driver = appendfile
envelope_to_add = true
return_path_add = true

address_directory:
driver = appendfile
no_from_hack
prefix = ""
suffix = ""
# message_filter_directory_format
# maildir_format

address_reply:
driver = autoreply

procmail_pipe:
driver = pipe
command = "/usr/bin/procmail"
return_path_add
delivery_date_add
envelope_to_add
# check_string = "From "
# escape_string = ">From "
suffix = ""

remote_smtp:
driver = smtp



######################################################################
#                      DIRECTORS CONFIGURATION                       #
#             Specifies how local addresses are handled              #
######################################################################


amavis_director:
condition = "${if eq {$received_protocol}{scanned-ok} {0}{1}}"
driver = smartuser
transport = amavis

virtual_alias:
driver = aliasfile
domains = lsearch;/etc/exim/virtual/domains
file = /etc/exim/virtual/aliases.${domain}
search_type = lsearch
qualify_preserve_domain

virtual_localuser:
driver = aliasfile
transport = virtual_localdelivery
domains = lsearch;/etc/exim/virtual/domains
file = /etc/exim/virtual/passwd.${domain}
search_type = lsearch
no_more

real_local:
prefix = real-
driver = localuser
transport = local_delivery

userforward:
driver = forwardfile
directory_transport = address_directory
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply
no_verify
check_ancestor
check_local_user
file = .forward
modemask = 002
filter

procmail:
driver = localuser
transport = procmail_pipe
require_files = ${local_part}:+${home}:+${home}/.procmailrc:+/usr/bin/procmail
no_verify

localuser:
driver = localuser
transport = local_delivery



######################################################################
#                      ROUTERS CONFIGURATION                         #
#            Specifies how remote addresses are handled              #
######################################################################


amavis_router:
condition = "${if eq {$received_protocol}{scanned-ok} {0}{1}}"
driver = domainlist
route_list = "*"
transport = amavis

lookuphost:
driver = lookuphost
transport = remote_smtp

literal:
driver = ipliteral
transport = remote_smtp



######################################################################
#                      RETRY CONFIGURATION                           #
######################################################################


*                      *           F,2h,15m; G,16h,2h,1.5; F,4d,8h




######################################################################
#                      REWRITE CONFIGURATION                         #
######################################################################


*@mail.qk.com.au    ${lookup{$1}lsearch{/etc/email-addresses}\
                        {$value}fail} frFs



######################################################################
#                   AUTHENTICATION CONFIGURATION                     #
######################################################################


# end of configuration file
-----------------------------------------------------------------------