exim / virtuelle domains

Debian macht sich hervorragend als Web- und Mailserver. Schau auch in den " Tipps und Tricks"-Bereich.
Antworten
zaarkov
Beiträge: 123
Registriert: 14.08.2003 11:08:51

exim / virtuelle domains

Beitrag von zaarkov » 11.09.2003 22:50:56

hallo,

exim soll virtuelle domains verwalten.
das klappt auch ganz gut, nur dass lokale benutzer nix zugetsellt bekommen.
weiterleitungen funktionieren dagegen gut.

in /etc/exim/domains stehen alle gehosteten domains
/etc/exim/virtual/<domainname> ist das alias-file fuer <domainname>

zaarkov


meine exim.conf schaut folgendermassen aus:

Code: Alles auswählen

#########################################
#                    MAIN CONFIGURATION SETTINGS                     #
#########################################

# Specify the domain you want to be added to all unqualified addresses
# here. Unqualified addresses are accepted only from local callers by
# default. See the receiver_unqualified_{hosts,nets} options if you want
# to permit unqualified addresses from remote sources. If this option is
# not set, the primary_hostname value is used for qualification.

qualify_domain = domain1.de

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

# Allow mail addressed to our hostname, or to our IP address.
local_domains_include_host = true
local_domains_include_host_literals = true

never_users = root

# enable relaying, if host or sender matches
relay_match_host_or_sender

# enable relaying, if sender-address is in db
sender_address_relay = lsearch;/etc/exim/senders

# The setting below allows your host to be used as a mail relay only by
# localhost: it locks out the use of your host as a mail relay by any
# other host. See the section of the manual entitled "Control of relaying"
# for more info.

host_accept_relay = 127.0.0.1 : ::::1

# This setting allows anyone who has authenticated to use your host as a
# mail relay. To use this you will need to set up some authenticators at
# the end of the file

host_auth_accept_relay = *

# If this option is set, then any process that is running as one of the
# listed users may pass a message to Exim and specify the sender's
# address using the "-f" command line option, without Exim's adding a
# "Sender" header.

trusted_users = mail

# If this option is true, the SMTP command VRFY is supported on incoming
# SMTP connections; otherwise it is not.

smtp_verify = true

# Some operating systems use the "gecos" field in the system password file
# to hold other information in addition to users' real names. Exim looks up
# this field when it is creating "sender" and "from" headers. If these options
# are set, exim uses "gecos_pattern" to parse the gecos field, and then
# expands "gecos_name" as the user's name. $1 etc refer to sub-fields matched
# by the pattern.

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

# This sets the maximum number of messages that will be accepted in one
# connection and immediately delivered. If one connection sends more
# messages than this, any further ones are accepted and queued but not
# delivered. The default is 10, which is probably enough for most purposes,
# but is too low on dialup SMTP systems, which often have many more mails
# queued for them when they connect.

smtp_accept_queue_per_connection = 10

freeze_tell_mailmaster = true

# Intervals a warning message to the sender when there is a delay
# Default is 24h
delay_warning = 2h:8h:24h:48h

# Time before a queue runner will try a new delivery attempt
# on any frozen message. Default is 0s
auto_thaw = 1d

# If a frozen message of any description that has been on the
# queue for longer than the given time is automatically cancelled
# at the next queue run. Default is 0s
timeout_frozen_after = 7d

# This string defines the contents of the \`Received' message header that
# is added to each message, except for the timestamp, which is automatically
# added on at the end, preceded by a semicolon. The string is expanded each
# time it is used.

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

# Attempt to verify recipient address before receiving mail, so that mails
# to invalid addresses are rejected rather than accepted and then bounced.
# Apparently some spammers are abusing servers that accept and then bounce
# to send bounces containing their spam to people.

receiver_try_verify = true

#
end


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

# This transport is used for local delivery to user mailboxes. On debian
# systems group mail is used so we can write to the /var/spool/mail
# directory. (The alternative, which most other unixes use, is to deliver
# as the user's own group, into a sticky-bitted directory)

local_delivery:
  driver = appendfile
  group = mail
  mode = 0660
  mode_fail_narrower = false
  envelope_to_add = true
  return_path_add = true
  file = /var/spool/mail/${local_part}

# This transport is used for handling pipe addresses 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 if you want this to happen only when the
# pipe fails to complete normally.

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

# This transport is used for handling file addresses generated by alias
# or .forward files.


address_file:
  driver = appendfile
  envelope_to_add = true
  return_path_add = true

# This transport is used for handling file addresses generated by alias
# or .forward files if the path ends in "/", which causes it to be treated
# as a directory name rather than a file name. Each message is then delivered
# to a unique file in the directory. If instead you want all such deliveries to
# be in the "maildir" format that is used by some other mail software,
# uncomment the final option below. If this is done, the directory specified
# in the .forward or alias file is the base maildir directory.
#
# Should you want to be able to specify either maildir or non-maildir
# directory-style deliveries, then you must set up yet another transport,
# called address_directory2. This is used if the path ends in "//" so should
# be the one used for maildir, as the double slash suggests another level
# of directory. In the absence of address_directory2, paths ending in //
# are passed to address_directory.

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

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

address_reply:
  driver = autoreply

# This transport is used for procmail

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


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


remote_smtp:
  driver = smtp

end


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

# This allows local delivery to be forced, avoiding alias files and
# forwarding.

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

# This director handles aliasing using a traditional /etc/aliases file.
# If any of your aliases expand to pipes or files, you will need to set
# up a user and a group for these deliveries to run under. You can do
# this by uncommenting the "user" option below (changing the user name
# as appropriate) and adding a "group" option if necessary.

system_aliases:
  driver = aliasfile
  file_transport = address_file
  pipe_transport = address_pipe
  file = /etc/aliases
  search_type = lsearch
# user = list
# Uncomment the above line if you are running smartlist

# our customer domains
# are just virtual domains (seperate alisas-files)
virtual:
  driver = aliasfile
  domains = lsearch;/etc/exim/domains
  file = /etc/exim/virtual/$domain
  search_type = lsearch
  no_more

# This director handles forwarding using traditional .forward files.
# It also allows mail filtering when a forward file starts with the
# string "# Exim filter": to disable filtering, 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.

# For standard debian setup of one group per user, it is acceptable---normal
# even---for .forward to be group writable. If you have everyone in one
# group, you should comment out the "modemask" line. Without it, the exim
# default of 022 will apply, which is probably what you want.

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

# This director runs procmail for users who have a .procmailrc file

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

# This director matches local user mailboxes.

localuser:
  driver = localuser
  transport = local_delivery


# Send all mail with local domain, that cannot be delivered...
# to an specified user...
smartuser:
  driver = smartuser
  new_address = postmaster

end


#########################################

#                      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 with
# default options.

lookuphost:
  driver = lookuphost
  transport = remote_smtp

# This router routes to remote hosts over SMTP by explicit IP address,
# given as a "domain literal" in the form [nnn.nnn.nnn.nnn]. The RFCs
# require this facility, which is why it is enabled by default in Exim.
# If you want to lock it out, set forbid_domain_literals in the main
# configuration section above.

literal:
  driver = ipliteral
  transport = remote_smtp

end


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

...
# unwichtig, gekuerzt

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

...
# unwichtig, gekuerzt

Benutzeravatar
barmeier
Beiträge: 358
Registriert: 12.11.2002 17:33:00
Kontaktdaten:

Beitrag von barmeier » 17.09.2003 13:25:25

Hi,

hast du das /etc/aliases angepasst ??

klingt irgendwie wie ein problem dort.

Schreibt exim log einträge ??

Ciao
Matze

zaarkov
Beiträge: 123
Registriert: 14.08.2003 11:08:51

Beitrag von zaarkov » 17.09.2003 20:05:33

exim mag die mail nicht zustellen.
und jedes domain hat ja sein eigenes alias.
zaarkov

Antworten