masqmail
view docs/simple-relay-setup @ 408:f609a05ddff8
Broke long lines.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Wed, 29 Feb 2012 10:41:51 +0100 |
parents | 72653295b75d |
children |
line source
1 Simple Setup
2 ============
4 You want
5 --------
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
12 This is like the simple-local-setup plus the forwarding.
15 Set up
16 ------
18 Follow the description in INSTALL.
20 Most times it's simply:
22 ./configure
25 Configuration
26 -------------
28 You need a config file like this one:
30 host_name = "foo.example.org"
31 query_routes.default = /etc/masqmail/default.route
33 (Substitute a real hostname, of course.)
35 Addionally you need to create the route config file like:
37 # where to relay to; the address and port of the smart host
38 mail_host = "mail.gmx.net:25"
39 # use a wrapper to enable encryption
40 # for STARTTLS on port 25:
41 #instant_helo=true
42 #wrapper="/usr/bin/openssl s_client -quiet -starttls smtp -connect mail.gmx.net:25 2>/dev/null"
43 # for SMTP over SSL on port 465:
44 #wrapper = "/usr/bin/openssl s_client -quiet -connect mail.gmx.net:465 2>/dev/null"
46 do_correct_helo = true
48 # rewrite the From addresses to ones visible from the outside
49 map_return_path_addresses = "meillo: schnalke4@gmx.de"
50 map_h_from_addresses = "meillo: markus schnalke <schnalke4@gmx.de>"
52 # it's good to use "login" only if the connection is encrypted
53 auth_name = "login"
54 #auth_name = "cram-md5"
55 auth_login = "UID_OR_EMAIL_ADDRESS"
56 auth_secret = "PASSWORD"
60 Starting the daemon
61 -------------------
63 Listening for SMTP connections on a port requires masqmail to run as
64 daemon. You probably want to start masqmail as daemon each time the
65 system comes up. How you have to do that is system dependent.
66 /etc/rc.local is a good try to add the daemon call, because this file
67 seems to be frequently available.
69 /usr/local/sbin/masqmail -bd -q10m
71 This starts masqmail in daemon mode and does a queue run every ten
72 minutes.
75 Check the setup
76 ---------------
78 Like in simple-local-setup plus ...
80 Send a mail to a remote location:
82 $ echo "some text" | mail foo@somewhereelse.example.org
84 Check if it is queued:
86 $ masqmail -bp
88 Deliver it with:
90 $ masqmail -qo default
92 Check the queue contents again.
94 You need to do such queue runs for online routes explicitely. For
95 instance by cron.
98 Automatic queue runs
99 --------------------
101 You can also tell masqmail to send queued mails through a route each
102 time the daemon does a queue run. Therefor you need to tell masqmail
103 that it is online and can use the default route to deliver mail.
105 Add this to masqmail.conf:
107 online_query = "/bin/echo default"
109 Now masqmail will send online mail automatically through the default
110 route, each time it does a queue run (every ten minutes).
113 In case of problems
114 -------------------
116 Have a look at the log file: /var/log/masqmail/masqmail.log
118 Set the debug level in masqmail.conf, restart the daemon, redo the
119 test, and look at the debug file: /var/log/masqmail/debug.log
121 If you use a wrapper, test it manually and interactively on the
122 command line.
124 Ask on the mailing list: <masqmail@marmaro.de>
128 meillo