masqmail

view docs/simple-relay-setup @ 201:138e66e1a61f

removed dns_getname() which was already commented seems as if one can use dns_getip() or dns_getmx() instead without problem their code is almost identical to the one of dns_getname() anyway
author meillo@marmaro.de
date Fri, 16 Jul 2010 13:08:29 +0200
parents
children 9814e75de61c
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 A common configure call would be:
22 ./configure --enable-auth --enable-ident
25 Configuration
26 -------------
28 You need a config file like this one:
30 host_name = "foo.example.org"
31 online_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 protocol = smtp
39 # where to relay to; the address and port of the smart host
40 mail_host = "mail.gmx.net:25"
41 # use the wrapper to enable encryption
42 #wrapper = "openssl s_client -quiet -connect mail.gmx.net:465 2>/dev/null"
44 do_correct_helo = true
46 # rewrite the From addresses to ones visible from the outside
47 map_return_path_addresses = "meillo: schnalke4@gmx.de"
48 map_h_from_addresses = "meillo: markus schnalke <schnalke4@gmx.de>"
50 # it's good to use "login" only if the connection is encrypted
51 auth_name = "login"
52 #auth_name = "cram-md5"
53 auth_login = "UID_OR_EMAIL_ADDRESS"
54 auth_secret = "PASSWORD"
58 Starting the daemon
59 -------------------
61 Listening for SMTP connections on a port requires masqmail to run as
62 daemon. You probably want to start masqmail as daemon each time the
63 system comes up. How you have to do that is system dependent.
64 /etc/rc.local is a good try to add the daemon call, because this file
65 seems to be frequently available.
67 /usr/local/sbin/masqmail -bd -q10m
69 This starts masqmail in daemon mode and does a queue run every ten
70 minutes.
73 Check the setup
74 ---------------
76 Like in simple-local-setup plus ...
78 Send a mail to a remote location:
80 $ echo "some text" | mail foo@somewhereelse.example.org
82 Check if it is queued:
84 $ masqmail -bp
86 Deliver it with:
88 $ masqmail -qo default
90 Check the queue contents again.
92 You need to do such queue runs for online routes explicitely. For
93 instance by cron.
96 Automatic queue runs
97 --------------------
99 You can also tell masqmail to send queued mails through a route each
100 time the daemon does a queue run. Therefor you need to tell masqmail
101 that it is online and can use the default route to deliver mail.
103 Add this to masqmail.conf:
105 online_detect = "pipe"
106 online_pipe = "/bin/echo default"
108 Now masqmail will send online mail automatically through the default
109 route, each time it does a queue run (every ten minutes).
112 In case of problems
113 -------------------
115 Have a look at the log file: /var/log/masqmail/masqmail.log
117 Set the debug level in masqmail.conf, restart the daemon, redo the
118 test, and look at the debug file: /var/log/masqmail/debug.log
120 If you use a wrapper, test it manually and interactively on the
121 command line.
123 Ask on the mailing list: <masqmail@marmaro.de>
127 meillo