equal
deleted
inserted
replaced
|
1 # this is by no way a complete configuration file! |
|
2 # it's just intended as a starting point |
|
3 |
|
4 # The providers file |
|
5 # All relevant information about the smart providers is stored |
|
6 # in one place. This place is the "providers" file. The structure |
|
7 # is simple. It consists of lines as in the example: |
|
8 # |
|
9 # # sender |server[:port] |user|password |
|
10 # # -----------+---------------+----+--------- |
|
11 # foo@bar.com foobar.com foo secret |
|
12 # *@bar.com bar.com/mx:smtp fuz secret2 |
|
13 # * smtp.gmail.com xxx baz |
|
14 |
|
15 PROVIDERS = <your file name for the providers file here> |
|
16 |
|
17 # some macros to ease the understanding |
|
18 ADDRESS_DATA = ${sg{${lookup{$sender_address}lsearch*@{PROVIDERS}}}{\\s+}{\t}} |
|
19 SMARTHOST = ${extract{1}{\x20\t}{$address_data}} |
|
20 HOST = ${extract{1}{:}{SMARTHOST}} |
|
21 PORT = ${extract{2}{:}{SMARTHOST}{$value}{submission}} |
|
22 USER = ${extract{2}{\t}{$address_data}} |
|
23 PASS = ${extract{3}{\t}{$address_data}} |
|
24 |
|
25 domainlist local_domains = @ |
|
26 |
|
27 begin router |
|
28 |
|
29 # the first router routes according the sender_address |
|
30 smarthost: |
|
31 driver = manualroute |
|
32 address_data = ADDRESS_DATA |
|
33 route_data = HOST |
|
34 transport = smtp_auth |
|
35 |
|
36 # in case you don't have a '*' line in your providers file |
|
37 |
|
38 dnslookup: |
|
39 driver = dnslookup |
|
40 domains = !+local_domains |
|
41 transport = smtp |
|
42 no_more |
|
43 |
|
44 begin transport |
|
45 |
|
46 smtp_auth: |
|
47 driver = smtp |
|
48 hosts_require_auth = * |
|
49 port = PORT |
|
50 |
|
51 smtp: |
|
52 driver = smtp |
|
53 |
|
54 begin authenticators |
|
55 |
|
56 plain: |
|
57 driver = plaintext |
|
58 public_name = PLAIN |
|
59 client_send = ^USER^PASS |
|
60 |
|
61 |
|
62 login: |
|
63 driver = plaintext |
|
64 public_name = LOGIN |
|
65 client_send = :USER:PASS |