Re: [exim] virtual users, multiple domains, and multiple use…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: anthony ry
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] virtual users, multiple domains, and multiple usernames
Hey peter,

Thanks for the reply. Basically the control panel is using a basic exim
with simple modification. The exact conf im using is as follows:


## EXIM CONFIGURATION

# primary_hostname =
# qualify_domain =
# qualify_recipient =
perl_startup = do '/etc/exim.pl'
system_filter = /etc/system_filter.exim
message_size_limit = 10M
smtp_receive_timeout = 5m
smtp_accept_max = 100
smtp_accept_queue = 35
smtp_accept_max_per_host = 5
smtp_accept_max_nonmail = 10
smtp_banner = "$primary_hostname ESMTP Exim $version_number $tod_full"
#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}}}
${if def:tls_cipher {${tls_cipher}}}\n\t (Exim ${version_number} id
${message_id}) ${if def:received_for {\n\tfor <$received_for>}}"
helo_allow_chars = _

# define what to log:
# define the => log lines
# +delivery_size
# +sender_on_delivery
#
# define the <= log lines:
# +received_recipients
# +received_sender
# +smtp_confirmation
# +subject
#
# define other non '<= =>' log lines:
# +smtp_incomplete_transaction
###################################
# define what to not log:
# define other non "<= =>' log lines:
# -dnslist_defer
# -host_lookup_failed
# -queue_run
# -rejected_header
# -retry_defer
# -skip_delivery
###################################

log_selector = \
+delivery_size \
+sender_on_delivery \
+received_recipients \
+received_sender \
+smtp_confirmation \
+subject \
+smtp_incomplete_transaction \
-dnslist_defer \
-host_lookup_failed \
-queue_run \
-rejected_header \
-retry_defer \
-skip_delivery

syslog_duplication = false
acl_smtp_rcpt = check_recipient
acl_smtp_data = check_message

# define local lists

domainlist blacklist_domains = lsearch;/etc/virtual/blacklist_domains
domainlist whitelist_from = lsearch;/etc/virtual/whitelist_from
domainlist local_domains = lsearch;/etc/virtual/domains
domainlist relay_domains = lsearch;/etc/virtual/domains : localhost
domainlist use_rbl_domains = lsearch;/etc/virtual/use_rbl_domains
hostlist relay_hosts = net-lsearch;/etc/virtual/pophosts : 127.0.0.1
hostlist auth_relay_hosts = *

# local_domains_include_host_literals
allow_domain_literals = false
never_users = root
host_lookup = *
rfc1413_hosts = *
rfc1413_query_timeout = 0s
auto_thaw = 1h
ignore_bounce_errors_after = 2h
timeout_frozen_after = 14h
trusted_users = mail:majordomo:www
tls_certificate = /etc/exim.cert
tls_privatekey = /etc/exim.key
tls_advertise_hosts = *
#auth_over_tls_hosts = *

begin acl

check_recipient:
  accept  hosts = :
  deny  domains       = +local_domains
        local_parts   = ^[.] : ^.*[@%!/|]
  deny  domains       = !+local_domains
        local_parts   = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
  accept domains      = +whitelist_from
  accept  local_parts = postmaster
          domains     = +local_domains
  accept  local_parts = abuse
          domains     = +local_domains
  accept  local_parts = hostmaster
          domains     =+local_domains
  accept  local_parts = dns
          domains     = tentric.com
  deny message = Go play with your self
       domains = +use_rbl_domains
       sender_domains = +blacklist_domains
  require verify = sender
  deny message = Mail from $sender_host_name rejected; see 
http://rss.mail-abuse.com/cgi-bin/nph-rss?query=$sender_ip_address
       domains = +use_rbl_domains
       dnslists = relays.mail-abuse.org
  deny message = Mail from $sender_host_name rejected; see 
http://njabl.org/cgi-bin/lookup.cgi?query=$sender_ip_address
        domains = +use_rbl_domains
        dnslists = dnsbl.njabl.org
  deny message = Mail from $sender_host_name rejected; see 
http://ordb.org/lookup/?host=$sender_ip_address
        domains = +use_rbl_domains
        dnslists = relays.ordb.org
  deny message = Mail from $sender_host_name rejected; see 
http://www.spamhaus.org/query/bl?ip=$sender_ip_address
        domains = +use_rbl_domains
        dnslists = sbl.spamhaus.org
  deny message = Mail from $sender_host_name rejected; youre domain may be 
hacked or infected as per http://opm.blitzed.org/proxy?ip=$sender_ip_address
        domains = +use_rbl_domains
        dnslists = opm.blitzed.org
  deny message = Mail from $sender_host_name rejected; youre domain may be 
hacked or infected as per http://www.dnsbl.us.sorbs.net/lookup.shtml
        domains = +use_rbl_domains
        dnslists = dnsbl.sorbs.net=127.0.0.5
  deny message = Mail from $sender_host_name rejected; youre domain may be 
hacked or infected as per http://www.dnsbl.us.sorbs.net/lookup.shtml
        hosts = !+relay_hosts
        domains = +use_rbl_domains
        !authenticated = *
        dnslists = dnsbl.sorbs.net!=127.0.0.6
  deny message = Mail from $sender_host_name rejected.
       hosts = !+relay_hosts
       domains =+use_rbl_domains
       !authenticated = *
       dnslists = bl.spamcop.net : cbl.abuseat.org
  deny message = Mail from $sender_host_name rejected.
       domains =+use_rbl_domains
       dnslists = rhsbl.sorbs.net/$sender_address_domain
  accept  domains = +local_domains
          endpass
          verify = recipient
  accept  domains = +relay_domains
          endpass
          verify=recipient
  accept  hosts = +relay_hosts
  accept  hosts = +auth_relay_hosts
          endpass
          message = authentication required
          authenticated = *
  deny    message = relay not permitted
  deny    message = relay not permitted


check_message:
accept

begin authenticators

plain:
    driver = plaintext
    public_name = PLAIN
    server_condition = "${perl{smtpauth}}"
    server_set_id = $2


login:
    driver = plaintext
    public_name = LOGIN
    server_prompts = "Username:: : Password::"
    server_condition = "${perl{smtpauth}}"
    server_set_id = $1



begin routers

lookuphost:
driver = dnslookup
domains = ! +local_domains
ignore_target_hosts = 127.0.0.0/8
transport = remote_smtp
no_more

# domain_literal:
# driver = ipliteral
# transport = remote_smtp

#spamcheck_director:
# driver = accept
#condition = "${if and { {!def:h_X-Spam-Flag:} {!eq
{$received_protocol}{spam-scanned}} {!eq {$received_protocol}{local}} }
{1}{0}}"
# retry_use_local_part
#transport = spamcheck
#no_verify

majordomo_aliases:
driver = redirect
allow_defer
allow_fail
data = ${if
exists{/etc/virtual/${domain}/majordomo/list.aliases}{${lookup{$local_part}lsearch{/etc/virtual/${domain}/majordomo/list.aliases}}}}
domains = lsearch;/etc/virtual/domainowners
file_transport = address_file
group = daemon
pipe_transport = majordomo_pipe
retry_use_local_part
no_rewrite
user = majordomo

majordomo_private:
  driver = redirect
  allow_defer
  allow_fail
  condition = "${if eq {$received_protocol} {local} \
                        {true} {false} }"
  data = ${if 
exists{/etc/virtual/${domain}/majordomo/private.aliases}{${lookup{$local_part}lsearch{/etc/virtual/${domain}/majordomo/private.aliases}}}}
  domains = lsearch;/etc/virtual/domainowners
  file_transport = address_file
  group = daemon
  pipe_transport = majordomo_pipe
  retry_use_local_part
  user = majordomo


domain_filter:
driver = redirect
allow_filter
no_check_local_user
user = "mail"
file = /etc/virtual/${domain}/filter
file_transport = address_file
pipe_transport = virtual_address_pipe
retry_use_local_part
no_verify

uservacation:
driver = accept
condition = ${lookup{$local_part} lsearch
{/etc/virtual/${domain}/vacation.conf}{yes}{no}}
require_files = /etc/virtual/${domain}/reply/${local_part}.msg
transport = uservacation
unseen

userautoreply:
driver = accept
condition = ${lookup{$local_part} lsearch
{/etc/virtual/${domain}/autoresponder.conf}{yes}{no}}
require_files = /etc/virtual/${domain}/reply/${local_part}.msg
transport = userautoreply

virtual_aliases_nostar:
driver = redirect
allow_defer
allow_fail
data = ${if
exists{/etc/virtual/${domain}/aliases}{${lookup{$local_part}lsearch{/etc/virtual/${domain}/aliases}}}}
file_transport = address_file
group = mail
pipe_transport = virtual_address_pipe
retry_use_local_part
unseen
#include_domain = true

virtual_user:
driver = accept
condition = ${if eq {}{${if
exists{/etc/virtual/${domain}/passwd}{${lookup{$local_part}lsearch{/etc/virtual/${domain}/passwd}}}}}{no}{yes}}
domains = lsearch;/etc/virtual/domainowners
group = mail
retry_use_local_part
transport = virtual_localdelivery

virtual_aliases:
driver = redirect
allow_defer
allow_fail
data = ${if
exists{/etc/virtual/$domain/aliases}{${lookup{$local_part}lsearch*{/etc/virtual/$domain/aliases}}}}
file_transport = address_file
group = mail
pipe_transport = virtual_address_pipe
retry_use_local_part
#include_domain = true

userforward:
driver = redirect
allow_filter
check_ancestor
check_local_user
no_expn
file = $home/.forward
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply
no_verify

localuser:
driver = accept
check_local_user
transport = local_delivery

system_aliases:
driver = redirect
allow_defer
allow_fail
data = ${lookup{$local_part}lsearch{/etc/aliases}}
file_transport = address_file
pipe_transport = address_pipe
retry_use_local_part
user = mail

begin transports

#spamcheck:
# driver = pipe
# batch_max = 100
# command = /usr/sbin/exim -oMr spam-scanned -bS
# current_directory = "/tmp"
# group = mail
# home_directory = "/tmp"
# log_output
# message_prefix =
# message_suffix =
# return_fail_output
# no_return_path_add
# transport_filter = /usr/bin/spamc
# use_bsmtp
# user = mail

majordomo_pipe:
driver = pipe
group = daemon
return_fail_output
user = majordomo

local_delivery:
driver = appendfile
delivery_date_add
envelope_to_add
file = /var/mail/$local_part
group = mail
mode = 0660
return_path_add
user = ${local_part}

virtual_localdelivery:
driver = appendfile
create_directory
delivery_date_add
directory_mode = 700
envelope_to_add
file = /var/spool/virtual/${domain}/${local_part}
group = mail
mode = 660
return_path_add
user = "${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}}"
quota = ${if
exists{/etc/virtual/${domain}/quota}{${lookup{$local_part}lsearch*{/etc/virtual/${domain}/quota}{$value}{0}}}{0}}

uservacation:
  driver = autoreply
  file = /etc/virtual/${domain}/reply/${local_part}.msg
  from = "${local_part}@${domain}"
  log = /etc/virtual/${domain}/reply/${local_part}.log
  no_return_message
  subject = "${if def:h_Subject: {Autoreply: $h_Subject:} {I am on 
vacation}}"
  text = "\
        ------                                                           
------\n\n\
        This message was automatically generated by email software\n\
        The delivery of your message has not been affected.\n\n\
        ------                                                           
------\n\n"
  to = "${sender_address}"
  user = mail
        #once = /etc/virtual/${domain}/reply/${local_part}.once


userautoreply:
driver = autoreply
bcc = ${lookup{${local_part}} lsearch
{/etc/virtual/${domain}/autoresponder.conf}{$value}}
file = /etc/virtual/${domain}/reply/${local_part}.msg
from = "${local_part}@${domain}"
log = /etc/virtual/${domain}/reply/${local_part}.log
no_return_message
subject = "${if def:h_Subject: {Autoreply: $h_Subject:} {Autoreply
Message}}"
to = "${sender_address}"
user = mail
#once = /etc/virtual/${domain}/reply/${local_part}.once

remote_smtp:
driver = smtp

address_pipe:
driver = pipe
return_output

virtual_address_pipe:
driver = pipe
group = nobody
return_output
user = "${lookup{$domain}lsearch* {/etc/virtual/domainowners}{$value}}"

address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add

address_reply:
driver = autoreply

begin retry

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


_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/