masqmail
diff docs/simple-relay-setup @ 186:3dff59a4e764
added two setup guides
they surely need improvements
please help to improve them
author | meillo@marmaro.de |
---|---|
date | Wed, 14 Jul 2010 23:26:20 +0200 |
parents | |
children | 9814e75de61c |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/docs/simple-relay-setup Wed Jul 14 23:26:20 2010 +0200 1.3 @@ -0,0 +1,127 @@ 1.4 +Simple Setup 1.5 +============ 1.6 + 1.7 +You want 1.8 +-------- 1.9 + 1.10 +- submit mail on stdin by calling masqmail on the commandline 1.11 +- submit mail with SMTP from the local machine 1.12 +- let masqmail deliver mail locally to the system mailboxes /var/mail/* 1.13 +- let masqmail forward non-local mail through a smart host 1.14 + 1.15 +This is like the simple-local-setup plus the forwarding. 1.16 + 1.17 + 1.18 +Set up 1.19 +------ 1.20 + 1.21 +Follow the description in INSTALL. 1.22 + 1.23 +A common configure call would be: 1.24 + 1.25 + ./configure --enable-auth --enable-ident 1.26 + 1.27 + 1.28 +Configuration 1.29 +------------- 1.30 + 1.31 +You need a config file like this one: 1.32 + 1.33 + host_name = "foo.example.org" 1.34 + online_routes.default = /etc/masqmail/default.route 1.35 + 1.36 +(Substitute a real hostname, of course.) 1.37 + 1.38 +Addionally you need to create the route config file like: 1.39 + 1.40 + protocol = smtp 1.41 + 1.42 + # where to relay to; the address and port of the smart host 1.43 + mail_host = "mail.gmx.net:25" 1.44 + # use the wrapper to enable encryption 1.45 + #wrapper = "openssl s_client -quiet -connect mail.gmx.net:465 2>/dev/null" 1.46 + 1.47 + do_correct_helo = true 1.48 + 1.49 + # rewrite the From addresses to ones visible from the outside 1.50 + map_return_path_addresses = "meillo: schnalke4@gmx.de" 1.51 + map_h_from_addresses = "meillo: markus schnalke <schnalke4@gmx.de>" 1.52 + 1.53 + # it's good to use "login" only if the connection is encrypted 1.54 + auth_name = "login" 1.55 + #auth_name = "cram-md5" 1.56 + auth_login = "UID_OR_EMAIL_ADDRESS" 1.57 + auth_secret = "PASSWORD" 1.58 + 1.59 + 1.60 + 1.61 +Starting the daemon 1.62 +------------------- 1.63 + 1.64 +Listening for SMTP connections on a port requires masqmail to run as 1.65 +daemon. You probably want to start masqmail as daemon each time the 1.66 +system comes up. How you have to do that is system dependent. 1.67 +/etc/rc.local is a good try to add the daemon call, because this file 1.68 +seems to be frequently available. 1.69 + 1.70 + /usr/local/sbin/masqmail -bd -q10m 1.71 + 1.72 +This starts masqmail in daemon mode and does a queue run every ten 1.73 +minutes. 1.74 + 1.75 + 1.76 +Check the setup 1.77 +--------------- 1.78 + 1.79 +Like in simple-local-setup plus ... 1.80 + 1.81 +Send a mail to a remote location: 1.82 + 1.83 + $ echo "some text" | mail foo@somewhereelse.example.org 1.84 + 1.85 +Check if it is queued: 1.86 + 1.87 + $ masqmail -bp 1.88 + 1.89 +Deliver it with: 1.90 + 1.91 + $ masqmail -qo default 1.92 + 1.93 +Check the queue contents again. 1.94 + 1.95 +You need to do such queue runs for online routes explicitely. For 1.96 +instance by cron. 1.97 + 1.98 + 1.99 +Automatic queue runs 1.100 +-------------------- 1.101 + 1.102 +You can also tell masqmail to send queued mails through a route each 1.103 +time the daemon does a queue run. Therefor you need to tell masqmail 1.104 +that it is online and can use the default route to deliver mail. 1.105 + 1.106 +Add this to masqmail.conf: 1.107 + 1.108 + online_detect = "pipe" 1.109 + online_pipe = "/bin/echo default" 1.110 + 1.111 +Now masqmail will send online mail automatically through the default 1.112 +route, each time it does a queue run (every ten minutes). 1.113 + 1.114 + 1.115 +In case of problems 1.116 +------------------- 1.117 + 1.118 +Have a look at the log file: /var/log/masqmail/masqmail.log 1.119 + 1.120 +Set the debug level in masqmail.conf, restart the daemon, redo the 1.121 +test, and look at the debug file: /var/log/masqmail/debug.log 1.122 + 1.123 +If you use a wrapper, test it manually and interactively on the 1.124 +command line. 1.125 + 1.126 +Ask on the mailing list: <masqmail@marmaro.de> 1.127 + 1.128 + 1.129 + 1.130 +meillo