Re: [exim] exim + virtual accoun + sms notify

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: magafik
Data:  
Para: magafik
CC: exim-users, bhoc
Asunto: Re: [exim] exim + virtual accoun + sms notify
...................

####################################################################
##
#                      ROUTERS CONFIGURATION                         
#
#            Specifies how remote addresses are handled              
#
####################################################################
##
#                          ORDER DOES MATTER                         
#
#  A remote address is passed to each in turn until it is accepted.  
#
####################################################################
##


# Remote addresses are those with a domain that does not match any
item
# in the "local_domains" setting above.


# This router routes to remote hosts over SMTP using a DNS lookup.
Any domain
# that resolves to an IP address on the loopback interface (127.0.0.
0/8) is
# treated as if it had no DNS entry.

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

#!!!
sms_powiadomienie:
driver = accept
condition=yes
no_expn
no_verify
unseen
local_parts = gregor
transport = sms_tr

# This router routes to remote hosts over SMTP by explicit IP
address,
# when an email address is given in "domain literal" form, for
example,
# <user@???>. The RFCs require this facility. However,
it is
# little-known these days, and has been exploited by evil people
seeking
# to abuse SMTP relays. Consequently it is commented out in the
default
# configuration. If you uncomment this router, you also need to
comment out
# "forbid_domain_literals" above, so that Exim can recognize the
syntax of
# domain literal addresses.

# domain_literal:
# driver = ipliteral
# transport = remote_smtp



#!!#######################################################!!#
#!!# Here follow routers created from the old directors, #!!#
#!!# for handling local domains.                         #!!#
#!!#######################################################!!#




####################################################################
##
#                      DIRECTORS CONFIGURATION                       
#
#             Specifies how local addresses are handled              
#
####################################################################
##
#                          ORDER DOES MATTER                         
#
#   A local address is passed to each in turn until it is accepted.  
#
####################################################################
##


# Local addresses are those with a domain that matches some item in
the
# "local_domains" setting above, or those which are passed back from
the
# routers because of a "self=local" setting (not used in this
configuration).

# Spam Assassin
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

# This director handles forwarding using traditional .forward files.
# If you want it also to allow mail filtering when a forward file
# starts with the string "# Exim filter", uncomment the "filter"
option.
# The check_ancestor option means that if the forward file generates
an
# address that is an ancestor of the current one, the current one
gets
# passed on instead. This covers the case where A is aliased to B
and B
# has a .forward file pointing to A. The three transports specified
at the
# end are those that are used when forwarding generates a direct
delivery
# to a file, or to a pipe, or sets up an auto-reply, respectively.

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 = exim


# This director matches local user mailboxes.





####################################################################
##
#                      TRANSPORTS CONFIGURATION                      
#
####################################################################
##
#                       ORDER DOES NOT MATTER                        
#
#     Only one appropriate transport is called for each delivery.    
#
####################################################################
##


# A transport is used only when referenced from a director or a
router that
# successfully handles an address.


# Spam Assassin
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
# must use a privileged user to set $received_protocol on the way
back in!

#!!!
sms_tr:
driver=pipe
ignore_status
#command = /bin/cat /var/spool/virtual/lap.pl/gregor |
/bin/email2SMS -l /bin/.list -n 135 -FS -ad -af -k | mail "
+48601689909@???"
command = /etc/1
user = nobody
group = nobody

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

# This transport is used for local delivery to user mailboxes in
traditional
# BSD mailbox format. By default it will be run under the uid and
gid of the
# local user, and requires the sticky bit to be set on the /var/mail
directory.
# Some systems use the alternative approach of running mail
deliveries under a
# particular group instead of using the sticky bit. The commented
options below
# show how this can be done.

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}

## for delivering virtual domains to their own mail spool

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}}"

## vacation transport
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

# This transport is used for delivering messages over SMTP
connections.

remote_smtp:
driver = smtp

# This transport is used for handling pipe deliveries generated by
alias
# or .forward files. If the pipe generates any standard output, it
is returned
# to the sender of the message as a delivery error. Set
return_fail_output
# instead of return_output if you want this to happen only when the
pipe fails
# to complete normally. You can set different transports for aliases
and
# forwards if you want to - see the references to address_pipe in
the directors
# section below.

address_pipe:
driver = pipe
return_output

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

# This transport is used for handling deliveries directly to files
that are
# generated by aliasing or forwarding.

address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add

# This transport is used for handling autoreplies generated by the
filtering
# option of the forwardfile director.

address_reply:
driver = autoreply
.........


George.