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
+ − 109 online_detect = "pipe"
+ − 110 online_pipe = "/bin/echo default"
+ − 111
+ − 112 Now masqmail will send online mail automatically through the default
+ − 113 route, each time it does a queue run (every ten minutes).
+ − 114
+ − 115
+ − 116 In case of problems
+ − 117 -------------------
+ − 118
+ − 119 Have a look at the log file: /var/log/masqmail/masqmail.log
+ − 120
+ − 121 Set the debug level in masqmail.conf, restart the daemon, redo the
+ − 122 test, and look at the debug file: /var/log/masqmail/debug.log
+ − 123
+ − 124 If you use a wrapper, test it manually and interactively on the
+ − 125 command line.
+ − 126
+ − 127 Ask on the mailing list: <masqmail@marmaro.de>
+ − 128
+ − 129
+ − 130
+ − 131 meillo