meillo@186: Simple Setup meillo@186: ============ meillo@186: meillo@186: You want meillo@186: -------- meillo@186: meillo@186: - submit mail on stdin by calling masqmail on the commandline meillo@186: - submit mail with SMTP from the local machine meillo@186: - let masqmail deliver mail locally to the system mailboxes /var/mail/* meillo@186: - let masqmail forward non-local mail through a smart host meillo@186: meillo@186: This is like the simple-local-setup plus the forwarding. meillo@186: meillo@186: meillo@186: Set up meillo@186: ------ meillo@186: meillo@186: Follow the description in INSTALL. meillo@186: meillo@378: Most times it's simply: meillo@186: meillo@378: ./configure meillo@186: meillo@186: meillo@186: Configuration meillo@186: ------------- meillo@186: meillo@186: You need a config file like this one: meillo@186: meillo@186: host_name = "foo.example.org" meillo@354: query_routes.default = /etc/masqmail/default.route meillo@186: meillo@186: (Substitute a real hostname, of course.) meillo@186: meillo@186: Addionally you need to create the route config file like: meillo@186: meillo@186: # where to relay to; the address and port of the smart host meillo@186: mail_host = "mail.gmx.net:25" meillo@223: # use a wrapper to enable encryption meillo@223: # for STARTTLS on port 25: meillo@223: #instant_helo=true meillo@223: #wrapper="/usr/bin/openssl s_client -quiet -starttls smtp -connect mail.gmx.net:25 2>/dev/null" meillo@223: # for SMTP over SSL on port 465: meillo@223: #wrapper = "/usr/bin/openssl s_client -quiet -connect mail.gmx.net:465 2>/dev/null" meillo@186: meillo@186: do_correct_helo = true meillo@186: meillo@186: # rewrite the From addresses to ones visible from the outside meillo@186: map_return_path_addresses = "meillo: schnalke4@gmx.de" meillo@186: map_h_from_addresses = "meillo: markus schnalke " meillo@186: meillo@186: # it's good to use "login" only if the connection is encrypted meillo@186: auth_name = "login" meillo@186: #auth_name = "cram-md5" meillo@186: auth_login = "UID_OR_EMAIL_ADDRESS" meillo@186: auth_secret = "PASSWORD" meillo@186: meillo@186: meillo@186: meillo@186: Starting the daemon meillo@186: ------------------- meillo@186: meillo@186: Listening for SMTP connections on a port requires masqmail to run as meillo@186: daemon. You probably want to start masqmail as daemon each time the meillo@186: system comes up. How you have to do that is system dependent. meillo@186: /etc/rc.local is a good try to add the daemon call, because this file meillo@186: seems to be frequently available. meillo@186: meillo@186: /usr/local/sbin/masqmail -bd -q10m meillo@186: meillo@186: This starts masqmail in daemon mode and does a queue run every ten meillo@186: minutes. meillo@186: meillo@186: meillo@186: Check the setup meillo@186: --------------- meillo@186: meillo@186: Like in simple-local-setup plus ... meillo@186: meillo@186: Send a mail to a remote location: meillo@186: meillo@186: $ echo "some text" | mail foo@somewhereelse.example.org meillo@186: meillo@186: Check if it is queued: meillo@186: meillo@186: $ masqmail -bp meillo@186: meillo@186: Deliver it with: meillo@186: meillo@186: $ masqmail -qo default meillo@186: meillo@186: Check the queue contents again. meillo@186: meillo@186: You need to do such queue runs for online routes explicitely. For meillo@186: instance by cron. meillo@186: meillo@186: meillo@186: Automatic queue runs meillo@186: -------------------- meillo@186: meillo@186: You can also tell masqmail to send queued mails through a route each meillo@186: time the daemon does a queue run. Therefor you need to tell masqmail meillo@186: that it is online and can use the default route to deliver mail. meillo@186: meillo@186: Add this to masqmail.conf: meillo@186: meillo@310: online_query = "/bin/echo default" meillo@186: meillo@186: Now masqmail will send online mail automatically through the default meillo@186: route, each time it does a queue run (every ten minutes). meillo@186: meillo@186: meillo@186: In case of problems meillo@186: ------------------- meillo@186: meillo@186: Have a look at the log file: /var/log/masqmail/masqmail.log meillo@186: meillo@186: Set the debug level in masqmail.conf, restart the daemon, redo the meillo@186: test, and look at the debug file: /var/log/masqmail/debug.log meillo@186: meillo@186: If you use a wrapper, test it manually and interactively on the meillo@186: command line. meillo@186: meillo@186: Ask on the mailing list: meillo@186: meillo@186: meillo@186: meillo@186: meillo