Mercurial > masqmail
annotate docs/simple-relay-setup @ 310:f10a56dc7481
reworked online_detect to the simpler online_query
Only pipe is supported now. Use
online_query="/bin/cat /path/to/file"
instead of
online_detect=file
online_file=/path/to/file
and
online_query="/path/to/some/script foo"
instead of
online_detect=pipe
online_pipe="/path/to/some/script foo"
See man page masqmail.conf(5) and admin/config-transition.
author | meillo@marmaro.de |
---|---|
date | Sun, 24 Apr 2011 19:14:38 +0200 |
parents | 9814e75de61c |
children | e230bcd0f1c6 |
rev | line source |
---|---|
186 | 1 Simple Setup |
2 ============ | |
3 | |
4 You want | |
5 -------- | |
6 | |
7 - submit mail on stdin by calling masqmail on the commandline | |
8 - submit mail with SMTP from the local machine | |
9 - let masqmail deliver mail locally to the system mailboxes /var/mail/* | |
10 - let masqmail forward non-local mail through a smart host | |
11 | |
12 This is like the simple-local-setup plus the forwarding. | |
13 | |
14 | |
15 Set up | |
16 ------ | |
17 | |
18 Follow the description in INSTALL. | |
19 | |
20 A common configure call would be: | |
21 | |
22 ./configure --enable-auth --enable-ident | |
23 | |
24 | |
25 Configuration | |
26 ------------- | |
27 | |
28 You need a config file like this one: | |
29 | |
30 host_name = "foo.example.org" | |
31 online_routes.default = /etc/masqmail/default.route | |
32 | |
33 (Substitute a real hostname, of course.) | |
34 | |
35 Addionally you need to create the route config file like: | |
36 | |
37 protocol = smtp | |
38 | |
39 # where to relay to; the address and port of the smart host | |
40 mail_host = "mail.gmx.net:25" | |
223 | 41 # use a wrapper to enable encryption |
42 # for STARTTLS on port 25: | |
43 #instant_helo=true | |
44 #wrapper="/usr/bin/openssl s_client -quiet -starttls smtp -connect mail.gmx.net:25 2>/dev/null" | |
45 # for SMTP over SSL on port 465: | |
46 #wrapper = "/usr/bin/openssl s_client -quiet -connect mail.gmx.net:465 2>/dev/null" | |
186 | 47 |
48 do_correct_helo = true | |
49 | |
50 # rewrite the From addresses to ones visible from the outside | |
51 map_return_path_addresses = "meillo: schnalke4@gmx.de" | |
52 map_h_from_addresses = "meillo: markus schnalke <schnalke4@gmx.de>" | |
53 | |
54 # it's good to use "login" only if the connection is encrypted | |
55 auth_name = "login" | |
56 #auth_name = "cram-md5" | |
57 auth_login = "UID_OR_EMAIL_ADDRESS" | |
58 auth_secret = "PASSWORD" | |
59 | |
60 | |
61 | |
62 Starting the daemon | |
63 ------------------- | |
64 | |
65 Listening for SMTP connections on a port requires masqmail to run as | |
66 daemon. You probably want to start masqmail as daemon each time the | |
67 system comes up. How you have to do that is system dependent. | |
68 /etc/rc.local is a good try to add the daemon call, because this file | |
69 seems to be frequently available. | |
70 | |
71 /usr/local/sbin/masqmail -bd -q10m | |
72 | |
73 This starts masqmail in daemon mode and does a queue run every ten | |
74 minutes. | |
75 | |
76 | |
77 Check the setup | |
78 --------------- | |
79 | |
80 Like in simple-local-setup plus ... | |
81 | |
82 Send a mail to a remote location: | |
83 | |
84 $ echo "some text" | mail foo@somewhereelse.example.org | |
85 | |
86 Check if it is queued: | |
87 | |
88 $ masqmail -bp | |
89 | |
90 Deliver it with: | |
91 | |
92 $ masqmail -qo default | |
93 | |
94 Check the queue contents again. | |
95 | |
96 You need to do such queue runs for online routes explicitely. For | |
97 instance by cron. | |
98 | |
99 | |
100 Automatic queue runs | |
101 -------------------- | |
102 | |
103 You can also tell masqmail to send queued mails through a route each | |
104 time the daemon does a queue run. Therefor you need to tell masqmail | |
105 that it is online and can use the default route to deliver mail. | |
106 | |
107 Add this to masqmail.conf: | |
108 | |
310
f10a56dc7481
reworked online_detect to the simpler online_query
meillo@marmaro.de
parents:
223
diff
changeset
|
109 online_query = "/bin/echo default" |
186 | 110 |
111 Now masqmail will send online mail automatically through the default | |
112 route, each time it does a queue run (every ten minutes). | |
113 | |
114 | |
115 In case of problems | |
116 ------------------- | |
117 | |
118 Have a look at the log file: /var/log/masqmail/masqmail.log | |
119 | |
120 Set the debug level in masqmail.conf, restart the daemon, redo the | |
121 test, and look at the debug file: /var/log/masqmail/debug.log | |
122 | |
123 If you use a wrapper, test it manually and interactively on the | |
124 command line. | |
125 | |
126 Ask on the mailing list: <masqmail@marmaro.de> | |
127 | |
128 | |
129 | |
130 meillo |