[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Exim und mehrere Smarthost/Mailprovider - ein Beispiel



Hallo Dietmar,

Dietmar Segbert <didi.segbert@arcor.de> (Sa 21 Dez 2013 11:16:00 CET):
> Hallo Matthias,
> hallo Heiko,
> danke für das Beispiel,
> Wohin muss den die exim4.conf hin kopiert werden, nach /etc/exim4/?
> Und wie muss exim konfiguriert sein, dpkg-reconfigure exim4-config?
> Und dann "Smarthost fetchmail", muss dann ein Smarthost eingetragen  
> werden?
> 
> Mit den hier schon vorher veröffentlichten Ergänzungen in exim4 habe ich  
> das nicht zum Laufen gekriegt.

Das was ich da als Beispiel habe, ist nicht für's blinde Kopieren
gedacht, es ist auf die wesentlichen Dinge beschränkt, die nur zeigen
sollen, dass es möglich ist, je nach Absender einen anderen Smarthost zu
verwenden.

Ich habe unten mal die Teile markiert, die Du in Deine Konfiguration
übernehmen müsstest. Das funktioniert aber nur gut, wenn Du eine
exim4.conf schon da hast. Wenn Du die Debian-Split-Config verwendest,
dann müsstest Du abwarten, bis Weihnachten vorbei ist, dann kann ich mal
versucht haben, das in dieses Schema von Marc eingebaut zu haben.


    # this is by no way a complete configuration file!
    # it's just intended as a starting point
    # source: hg clone https://ssl.schlittermann.de/hg/exim-smart-config

    # The providers file
    # ------------------
    # All relevant information about the smart providers is stored
    # in one place. This place is the "providers" file. The structure
    # is simple. It consists of lines as in the example:
    #
    # # sender     |servers[::port]  |user|password
    # # -----------+-----------------+----+---------
    # foo@bar.com	foobar.com       foo  secret
    # baz@bar.com   a.com:b.com::25  foo  sicrit
    # *@bar.com     bar.com/mx:25    fuz  secret2
    # *		smtp.gmail.com   xxx  baz
    #
    # Note: the "servers::[port]" field is used as "route_data", thus all
    # rules for route_data apply (see spec.txt, 20.3). 
    # - multiple servers are colon (:) separated
    # - you can use indirect lists by appending /mx
    # - you can specifiy a port number numerically (per default we use 587)

,--- das geht in den globalen Teil der Config
|   PROVIDERS = <your file name for the providers file here>
|
|   # some macros to ease the understanding
|   ADDRESS_DATA = ${sg{${lookup{$sender_address}lsearch*@{PROVIDERS}}}{\\s+}{\t}}
|   SMARTHOST    = ${extract{1}{\t}{$address_data}}
|   USER         = ${extract{2}{\t}{$address_data}}
|   PASS         = ${extract{3}{\t}{$address_data}}
`--------

    domainlist local_domains = @

    begin router

    # the first router routes according the sender_address
,----- das sollte der erste Router sein
|   smarthost:
|           driver = manualroute
|           address_data = ADDRESS_DATA
|           route_data = SMARTHOST
|           transport = smtp_auth
`------------------
    # in case you don't have a '*' line in your providers file

    dnslookup:
            driver = dnslookup
            domains = !+local_domains
            transport = smtp
            no_more

    begin transport

,-------- das in die transports, egal wohin
|   smtp_auth:
|           driver = smtp
|           port = submission
|           hosts_require_auth = *
`--------------

    smtp:
            driver = smtp

    begin authenticators

,--------- zu den Authenticators
|          es genügt der, der von Deinen Providern unterstützt wird
|  plain:
|          driver = plaintext
|           public_name = PLAIN
|           client_send = ^USER^PASS
|           
|   login:
|           driver = plaintext
|           public_name = LOGIN	
|           client_send = :USER:PASS
`------------

Attachment: signature.asc
Description: Digital signature


Reply to: