masqmail
changeset 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 | b6fc62ea6058 |
children | bd7c52a36b0c |
files | docs/simple-local-setup docs/simple-relay-setup |
diffstat | 2 files changed, 221 insertions(+), 0 deletions(-) [+] |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/docs/simple-local-setup Wed Jul 14 23:26:20 2010 +0200 1.3 @@ -0,0 +1,94 @@ 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 + 1.14 +You have luck, because this is what masqmail does by default. 1.15 + 1.16 + 1.17 +Set up 1.18 +------ 1.19 + 1.20 +Follow the description in INSTALL. 1.21 + 1.22 +A common configure call would be: 1.23 + 1.24 + ./configure --enable-auth --enable-ident 1.25 + 1.26 + 1.27 +Configuration 1.28 +------------- 1.29 + 1.30 +You just need a minimal config file, having one line: 1.31 + 1.32 + host_name = "foo.example.org" 1.33 + 1.34 +(Substitute a real value, of course.) 1.35 + 1.36 + 1.37 +Starting the daemon 1.38 +------------------- 1.39 + 1.40 +Listening for SMTP connections on a port requires masqmail to run as 1.41 +daemon. You probably want to start masqmail as daemon each time the 1.42 +system comes up. How you have to do that is system dependent. 1.43 +/etc/rc.local is a good try to add the daemon call, because this file 1.44 +seems to be frequently available. 1.45 + 1.46 + /usr/local/sbin/masqmail -bd -q10m 1.47 + 1.48 +This starts masqmail in daemon mode and does a queue run every ten 1.49 +minutes. 1.50 + 1.51 + 1.52 +Check the setup 1.53 +--------------- 1.54 + 1.55 +Ensure you have the sendmail links correct: 1.56 + 1.57 + $ ls -l /usr/lib/sendmail /usr/sbin/sendmail 1.58 + lrwxrwxrwx 1 root root 25 2010-03-06 13:50 /usr/lib/sendmail -> /usr/local/sbin/masqmail* 1.59 + lrwxrwxrwx 1 root root 25 2010-03-06 13:50 /usr/sbin/sendmail -> /usr/local/sbin/masqmail* 1.60 + 1.61 +Send a mail to yourself: 1.62 + 1.63 + $ echo "some text" | mail `whoami` 1.64 + 1.65 +Check if the mail was delivered (then delete it and quit): 1.66 + 1.67 + $ mail 1.68 + Mail version 8.1.2 01/15/2001. Type ? for help. 1.69 + "/var/mail/meillo": 1 message 1 new 1.70 + >N 1 meillo@serveme.sc Wed Jul 14 22:50 13/467 1.71 + & p 1.72 + Message 1: 1.73 + From <meillo@serveme.schnalke.local> Wed Jul 14 22:50:13 2010 1.74 + Envelope-to: <meillo@serveme.schnalke.local> 1.75 + To: meillo 1.76 + From: <meillo@serveme.schnalke.local> 1.77 + Date: Wed, 14 Jul 2010 22:50:13 +0200 1.78 + 1.79 + some text 1.80 + 1.81 + & d 1.82 + & q 1.83 + 1.84 + 1.85 +In case of problems 1.86 +------------------- 1.87 + 1.88 +Have a look at the log file: /var/log/masqmail/masqmail.log 1.89 + 1.90 +Set the debug level in masqmail.conf, restart the daemon, redo the 1.91 +test, and look at the debug file: /var/log/masqmail/debug.log 1.92 + 1.93 +Ask on the mailing list: <masqmail@marmaro.de> 1.94 + 1.95 + 1.96 + 1.97 +meillo
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/docs/simple-relay-setup Wed Jul 14 23:26:20 2010 +0200 2.3 @@ -0,0 +1,127 @@ 2.4 +Simple Setup 2.5 +============ 2.6 + 2.7 +You want 2.8 +-------- 2.9 + 2.10 +- submit mail on stdin by calling masqmail on the commandline 2.11 +- submit mail with SMTP from the local machine 2.12 +- let masqmail deliver mail locally to the system mailboxes /var/mail/* 2.13 +- let masqmail forward non-local mail through a smart host 2.14 + 2.15 +This is like the simple-local-setup plus the forwarding. 2.16 + 2.17 + 2.18 +Set up 2.19 +------ 2.20 + 2.21 +Follow the description in INSTALL. 2.22 + 2.23 +A common configure call would be: 2.24 + 2.25 + ./configure --enable-auth --enable-ident 2.26 + 2.27 + 2.28 +Configuration 2.29 +------------- 2.30 + 2.31 +You need a config file like this one: 2.32 + 2.33 + host_name = "foo.example.org" 2.34 + online_routes.default = /etc/masqmail/default.route 2.35 + 2.36 +(Substitute a real hostname, of course.) 2.37 + 2.38 +Addionally you need to create the route config file like: 2.39 + 2.40 + protocol = smtp 2.41 + 2.42 + # where to relay to; the address and port of the smart host 2.43 + mail_host = "mail.gmx.net:25" 2.44 + # use the wrapper to enable encryption 2.45 + #wrapper = "openssl s_client -quiet -connect mail.gmx.net:465 2>/dev/null" 2.46 + 2.47 + do_correct_helo = true 2.48 + 2.49 + # rewrite the From addresses to ones visible from the outside 2.50 + map_return_path_addresses = "meillo: schnalke4@gmx.de" 2.51 + map_h_from_addresses = "meillo: markus schnalke <schnalke4@gmx.de>" 2.52 + 2.53 + # it's good to use "login" only if the connection is encrypted 2.54 + auth_name = "login" 2.55 + #auth_name = "cram-md5" 2.56 + auth_login = "UID_OR_EMAIL_ADDRESS" 2.57 + auth_secret = "PASSWORD" 2.58 + 2.59 + 2.60 + 2.61 +Starting the daemon 2.62 +------------------- 2.63 + 2.64 +Listening for SMTP connections on a port requires masqmail to run as 2.65 +daemon. You probably want to start masqmail as daemon each time the 2.66 +system comes up. How you have to do that is system dependent. 2.67 +/etc/rc.local is a good try to add the daemon call, because this file 2.68 +seems to be frequently available. 2.69 + 2.70 + /usr/local/sbin/masqmail -bd -q10m 2.71 + 2.72 +This starts masqmail in daemon mode and does a queue run every ten 2.73 +minutes. 2.74 + 2.75 + 2.76 +Check the setup 2.77 +--------------- 2.78 + 2.79 +Like in simple-local-setup plus ... 2.80 + 2.81 +Send a mail to a remote location: 2.82 + 2.83 + $ echo "some text" | mail foo@somewhereelse.example.org 2.84 + 2.85 +Check if it is queued: 2.86 + 2.87 + $ masqmail -bp 2.88 + 2.89 +Deliver it with: 2.90 + 2.91 + $ masqmail -qo default 2.92 + 2.93 +Check the queue contents again. 2.94 + 2.95 +You need to do such queue runs for online routes explicitely. For 2.96 +instance by cron. 2.97 + 2.98 + 2.99 +Automatic queue runs 2.100 +-------------------- 2.101 + 2.102 +You can also tell masqmail to send queued mails through a route each 2.103 +time the daemon does a queue run. Therefor you need to tell masqmail 2.104 +that it is online and can use the default route to deliver mail. 2.105 + 2.106 +Add this to masqmail.conf: 2.107 + 2.108 + online_detect = "pipe" 2.109 + online_pipe = "/bin/echo default" 2.110 + 2.111 +Now masqmail will send online mail automatically through the default 2.112 +route, each time it does a queue run (every ten minutes). 2.113 + 2.114 + 2.115 +In case of problems 2.116 +------------------- 2.117 + 2.118 +Have a look at the log file: /var/log/masqmail/masqmail.log 2.119 + 2.120 +Set the debug level in masqmail.conf, restart the daemon, redo the 2.121 +test, and look at the debug file: /var/log/masqmail/debug.log 2.122 + 2.123 +If you use a wrapper, test it manually and interactively on the 2.124 +command line. 2.125 + 2.126 +Ask on the mailing list: <masqmail@marmaro.de> 2.127 + 2.128 + 2.129 + 2.130 +meillo