masqmail
annotate docs/simple-local-setup @ 421:f37384470855
Changed lockdir to /var/lock/masqmail; Create lockdir and piddir on startup.
Moved the lockdir out of the spool dir. (When /var/lock is a ramdisk
we do well to have the lock files there.) Added the new configure option
--with-lockdir to change that location. Nontheless, if we run_as_user,
then lock files are always stored in the spool dir directly.
Instead of installing the lockdir and piddir at installation time, we
create them on startup time now if they are missing. This is necessary
if lockdir or piddir are a tmpfs.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Wed, 30 May 2012 09:38:38 +0200 |
parents | 72653295b75d |
children |
rev | line source |
---|---|
meillo@186 | 1 Simple Setup |
meillo@186 | 2 ============ |
meillo@186 | 3 |
meillo@186 | 4 You want |
meillo@186 | 5 -------- |
meillo@186 | 6 |
meillo@186 | 7 - submit mail on stdin by calling masqmail on the commandline |
meillo@186 | 8 - submit mail with SMTP from the local machine |
meillo@186 | 9 - let masqmail deliver mail locally to the system mailboxes /var/mail/* |
meillo@186 | 10 |
meillo@186 | 11 You have luck, because this is what masqmail does by default. |
meillo@186 | 12 |
meillo@186 | 13 |
meillo@186 | 14 Set up |
meillo@186 | 15 ------ |
meillo@186 | 16 |
meillo@186 | 17 Follow the description in INSTALL. |
meillo@186 | 18 |
meillo@378 | 19 Most times it's simply: |
meillo@186 | 20 |
meillo@378 | 21 ./configure |
meillo@186 | 22 |
meillo@186 | 23 |
meillo@186 | 24 Configuration |
meillo@186 | 25 ------------- |
meillo@186 | 26 |
meillo@186 | 27 You just need a minimal config file, having one line: |
meillo@186 | 28 |
meillo@186 | 29 host_name = "foo.example.org" |
meillo@186 | 30 |
meillo@186 | 31 (Substitute a real value, of course.) |
meillo@186 | 32 |
meillo@186 | 33 |
meillo@186 | 34 Starting the daemon |
meillo@186 | 35 ------------------- |
meillo@186 | 36 |
meillo@186 | 37 Listening for SMTP connections on a port requires masqmail to run as |
meillo@186 | 38 daemon. You probably want to start masqmail as daemon each time the |
meillo@186 | 39 system comes up. How you have to do that is system dependent. |
meillo@186 | 40 /etc/rc.local is a good try to add the daemon call, because this file |
meillo@186 | 41 seems to be frequently available. |
meillo@186 | 42 |
meillo@186 | 43 /usr/local/sbin/masqmail -bd -q10m |
meillo@186 | 44 |
meillo@186 | 45 This starts masqmail in daemon mode and does a queue run every ten |
meillo@186 | 46 minutes. |
meillo@186 | 47 |
meillo@186 | 48 |
meillo@186 | 49 Check the setup |
meillo@186 | 50 --------------- |
meillo@186 | 51 |
meillo@186 | 52 Ensure you have the sendmail links correct: |
meillo@186 | 53 |
meillo@186 | 54 $ ls -l /usr/lib/sendmail /usr/sbin/sendmail |
meillo@186 | 55 lrwxrwxrwx 1 root root 25 2010-03-06 13:50 /usr/lib/sendmail -> /usr/local/sbin/masqmail* |
meillo@186 | 56 lrwxrwxrwx 1 root root 25 2010-03-06 13:50 /usr/sbin/sendmail -> /usr/local/sbin/masqmail* |
meillo@186 | 57 |
meillo@186 | 58 Send a mail to yourself: |
meillo@186 | 59 |
meillo@186 | 60 $ echo "some text" | mail `whoami` |
meillo@186 | 61 |
meillo@186 | 62 Check if the mail was delivered (then delete it and quit): |
meillo@186 | 63 |
meillo@186 | 64 $ mail |
meillo@186 | 65 Mail version 8.1.2 01/15/2001. Type ? for help. |
meillo@186 | 66 "/var/mail/meillo": 1 message 1 new |
meillo@186 | 67 >N 1 meillo@serveme.sc Wed Jul 14 22:50 13/467 |
meillo@186 | 68 & p |
meillo@186 | 69 Message 1: |
meillo@186 | 70 From <meillo@serveme.schnalke.local> Wed Jul 14 22:50:13 2010 |
meillo@186 | 71 Envelope-to: <meillo@serveme.schnalke.local> |
meillo@186 | 72 To: meillo |
meillo@186 | 73 From: <meillo@serveme.schnalke.local> |
meillo@186 | 74 Date: Wed, 14 Jul 2010 22:50:13 +0200 |
meillo@186 | 75 |
meillo@186 | 76 some text |
meillo@186 | 77 |
meillo@186 | 78 & d |
meillo@186 | 79 & q |
meillo@186 | 80 |
meillo@186 | 81 |
meillo@186 | 82 In case of problems |
meillo@186 | 83 ------------------- |
meillo@186 | 84 |
meillo@186 | 85 Have a look at the log file: /var/log/masqmail/masqmail.log |
meillo@186 | 86 |
meillo@186 | 87 Set the debug level in masqmail.conf, restart the daemon, redo the |
meillo@186 | 88 test, and look at the debug file: /var/log/masqmail/debug.log |
meillo@186 | 89 |
meillo@186 | 90 Ask on the mailing list: <masqmail@marmaro.de> |
meillo@186 | 91 |
meillo@186 | 92 |
meillo@186 | 93 |
meillo@186 | 94 meillo |