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"
+ − 41 # use the wrapper to enable encryption
+ − 42 #wrapper = "openssl s_client -quiet -connect mail.gmx.net:465 2>/dev/null"
+ − 43
+ − 44 do_correct_helo = true
+ − 45
+ − 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>"
+ − 49
+ − 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"
+ − 55
+ − 56
+ − 57
+ − 58 Starting the daemon
+ − 59 -------------------
+ − 60
+ − 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.
+ − 66
+ − 67 /usr/local/sbin/masqmail -bd -q10m
+ − 68
+ − 69 This starts masqmail in daemon mode and does a queue run every ten
+ − 70 minutes.
+ − 71
+ − 72
+ − 73 Check the setup
+ − 74 ---------------
+ − 75
+ − 76 Like in simple-local-setup plus ...
+ − 77
+ − 78 Send a mail to a remote location:
+ − 79
+ − 80 $ echo "some text" | mail foo@somewhereelse.example.org
+ − 81
+ − 82 Check if it is queued:
+ − 83
+ − 84 $ masqmail -bp
+ − 85
+ − 86 Deliver it with:
+ − 87
+ − 88 $ masqmail -qo default
+ − 89
+ − 90 Check the queue contents again.
+ − 91
+ − 92 You need to do such queue runs for online routes explicitely. For
+ − 93 instance by cron.
+ − 94
+ − 95
+ − 96 Automatic queue runs
+ − 97 --------------------
+ − 98
+ − 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.
+ − 102
+ − 103 Add this to masqmail.conf:
+ − 104
+ − 105 online_detect = "pipe"
+ − 106 online_pipe = "/bin/echo default"
+ − 107
+ − 108 Now masqmail will send online mail automatically through the default
+ − 109 route, each time it does a queue run (every ten minutes).
+ − 110
+ − 111
+ − 112 In case of problems
+ − 113 -------------------
+ − 114
+ − 115 Have a look at the log file: /var/log/masqmail/masqmail.log
+ − 116
+ − 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
+ − 119
+ − 120 If you use a wrapper, test it manually and interactively on the
+ − 121 command line.
+ − 122
+ − 123 Ask on the mailing list: <masqmail@marmaro.de>
+ − 124
+ − 125
+ − 126
+ − 127 meillo