Date: Mon, 25 Jan 1999 15:22:11 -0500 From: Ted Wisniewski <ted@wiz.plymouth.edu> To: freebsd-doc@FreeBSD.ORG Subject: Mail services - setting Home directory Mail spooling: Message-ID: <36ACD273.8D9BF46D@wiz.plymouth.edu>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------1E2D40B899C64D3BD85AF1B2 Content-Type: multipart/alternative; boundary="------------7A7BE39E42FED0C43D933FE3" --------------7A7BE39E42FED0C43D933FE3 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Another Tutorial, this one tells you how to set up home directory based E-Mail spooling (as opposed to the standard /var/mail) based. http://wiz.plymouth.edu/Mail-services.html --------------7A7BE39E42FED0C43D933FE3 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> <pre>Another Tutorial, this one tells you how to set up home directory based E-Mail</pre> <pre>spooling (as opposed to the standard /var/mail) based.</pre> <pre></pre> <pre><A HREF="http://wiz.plymouth.edu/Mail-services.html">http://wiz.plymouth.edu/Mail-services.html</A></pre> </html> --------------7A7BE39E42FED0C43D933FE3-- --------------1E2D40B899C64D3BD85AF1B2 Content-Type: text/html; charset=iso-8859-1; name="Mail-services.html" Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="Mail-services.html" Content-Base: "http://wiz/Mail-services.html" Content-Location: "http://wiz/Mail-services.html" <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="Generator" content="Microsoft Word 97"> <meta name="GENERATOR" content="Mozilla/4.5 [en] (Win95; I) [Netscape]"> <title>Mail services - setting Home directory Mail spooling:</title> </head> <body link="#0000FF" vlink="#800080"> <center><font size=+2>Mail services - setting up Home directory Mail spooling</font> <br>by <br>Ted Wisniewski (<a href="mail:ted@wiz.plymouth.edu">ted@wiz.plymouth.edu</a>)</center> <p><font size=-1>The reasons to do "Home directory" spooling are many? Here is a couple of really good reasons:</font> <ul> <ul> <li> <font size=-1>All user files will be in one place, less system administration to maintain.</font></li> <li> <font size=-1>1 filesystem with quotas (as opposed to have one for user files and another for mail)</font></li> </ul> </ul> <font size=-1>What you will need:</font> <ul> <li> <font size=-1>Procmail (to be used as a local delivery agent) the current version is <b>procmail-3.11pre7.tar.gz</b> and can be retrieved from <b><a href="ftp://ftp.informatik.rwth-aachen.de/">ftp.informatik.rwth-aachen.de</a></b> in the <b>/<i>pub/packages/procmail</i> </b>directory.</font></li> <li> <font size=-1>Sendmail version 8.9.1 or better. This can be retrieved from <b><a href="ftp://ftp.sendmail.org/">ftp.sendmail.org</a></b><i> </i></font><i>in the <b>/pub/sendmail</b> directory.</i></li> <li> Mail readers Elm/Pine (installed as packages) and POP/IMAP mail servers (installed from source).</li> </ul> <i>Now that you have the two essential pieces of software we need to extract the files, build and install them.</i> <p><i>Procmail -</i> <ul> <dir> <dir> <ul> <li> <b><i>cd /var/tmp</i></b></li> <li> <b><i>tar zxvf procmail-3.11pre7.tar.gz</i></b></li> <li> <i>c<b>d procmail-3.11pre7/src</b></i></li> <li> <i>Edit the <b>authenticate.c</b> file and uncomment the following line:</i></li> </ul> </dir> </dir> </ul> <dir> <dir> <dir> <dir> <dir> <dir><b><i>/*#define MAILSPOOLHOME "/.mail" /* watch the leading / */</i></b> <p><i>The first two characters on the line need to be removed, it should look like (below) when done.</i> <p><b><i>#define MAILSPOOLHOME "/.mail" /* watch the leading / */</i></b></dir> </dir> </dir> </dir> </dir> </dir> <ul> <dir> <dir> <ul> <li> <b><i>cd ..</i></b></li> <li> <b><i>make</i></b></li> <li> <b><i>(as the root user) make install-suid</i></b></li> <li> <b><i>ln -s /usr/bin/procmail /usr/local/bin/procmail</i></b></li> </ul> </dir> </dir> </ul> <i>Sendmail -</i> <ul> <ul> <li> <b><i>cd /var/tmp</i></b></li> <li> <b><i>tar zxvf sendmail.8.9.1.tar.gz</i></b></li> <li> <b><i>cd sendmail.8.9.1</i></b></li> <li> <b><i>make</i></b></li> <li> <b><i>(as the root user) make install</i></b></li> <li> <i>Now a "<b>sendmail.cf</b>" file must me generated for the host, the one that came with the system is not adequate for our needs (we need to use sendmail as the delivery agent to get the mail spooled into the users? home directory).</i></li> </ul> </ul> <ul> <ul> <li> <i><b>cd cf/cf</b> and edit the file called <b>generic-bsd4.4.mc</b></i></li> </ul> </ul> <dir> <dir> <dir> <dir><i>add the following "Features"</i> <p><b><i>FEATURE(local_procmail)</i></b> <p><b><i>FEATURE(relay_entire_domain)</i></b> <p><b><i>FEATURE(relay_local_from)</i></b></dir> </dir> </dir> </dir> <i>Remove the following line:</i> <p><i> <b> MAILER(local)dnl</b></i> <ul> <ul> <li> <b><i>make generic-bsd4.4.cf</i></b></li> <li> <b><i>cp generic-bsd4.4.cf /etc/sendmail.cf</i></b></li> <li> <b><i>vi /etc/sendmail.cw</i></b><i>, If this file does not already exist, create it, and for each "name" your host has put and entry for that hostname.</i></li> </ul> </ul> <dir> <dir> <dir> <dir><i>Example contents of <b>/etc/sendmail.cw</b> file:</i> <p><i>mail.domain.com</i> <p><font size=-1><a href="http://www.domain.com/">www.domain.com</a></font></dir> </dir> </dir> </dir> <ul> <ul> <li> <b><i><font size=-1>cat /var/run/sendmail.pid</font></i></b><font size=-1>, the listed number (PID) is the process ID of the currently running sendmail daemon, do <b><i>kill -9 PID</i></b><i>,</i> where PID is that number.</font></li> <li> <font size=-1>Restart sendmail<i>: <b>/usr/sbin/sendmail -bd -q30m</b></i></font></li> </ul> </ul> <br> <p><font size=+2>Now, You must tell your mail-readers where the mail is now spooled, most of them assume <b>/var/mail</b> or some other centralized place.</font> <br> <p>For (using csh or tcsh) <b>"elm"</b> and <b>"mail"</b> they respect the <b>"MAIL"</b> environment variable. You can set it in <b>/etc/csh.cshrc </b>as follows: <p> <b>setenv MAIL ~/.mail</b> <p>For pine, you need to edit your system-wide Pine configuration file usually <b>/usr/local/etc/pine.conf</b> and add: <p> <b> inbox-path=~/.mail</b> <br> <p>For POP/IMAP mail readers, you will need to download the source for <b>imap-4.4.tar.Z</b> from <b>ftp.cdrom.com</b> in the <b>/pub/FreeBSD/ports/distfiles</b> directory. <p>Extract the archive: <b>tar zxvf</b> <b>imap-4.4.tar.Z</b> <p>You need to make 1 modification to <b>imap-4.4/src/osdep/unix/env_unix.c, </b>comment out or remove the line indicated below add/replace that line with the one provided. <br> <br> <p>char *sysinbox () <br>{ <br> char tmp[MAILTMPLEN]; <br> if (!sysInbox) { /* initialize if first time */ <br> /*sprintf (tmp,"%s/%s",MAILSPOOL,myusername ()); /*REMOVE*/ <br> sprintf (tmp,"%s/%s",myHomeDir,"/.mail"); /*ADD*/ <br> sysInbox = cpystr (tmp); /* system inbox is from mail spool */ <br> } <br> return sysInbox; <br>} <p>Then build the POP3 and IMAP servers by doing "<b>make bsf</b>" in the <b>imap-4.4</b> directory. <p>Upon completion of the build do the following as root (I assume you have backed up older versions if you are overwriting older executables): <p> <b>cp imapd/imapd /usr/local/bin/imapd</b> <br><b> chmod 755 /usr/local/bin/imapd</b> <p> <b>cp ipopd/ipop3d /usr/local/bin/ipopd</b> <br><b> chmod 755 /usr/local/bin/ipopd</b><b></b> <p>Now edit<b> /etc/inetd.conf </b>and make sure your pop3 & imap entries appear like:<b></b> <p><b> pop3 stream tcp nowait root /usr/local/bin/ipop3d ipop3d</b> <br><b> imap stream tcp nowait root /usr/local/bin/imapd imapd</b><b></b> <p>If <b>/etc/inetd.conf </b>requires editing, you will need to <b>"kill -HUP"</b> the inetd process (<b>"kill -HUP `/var/run/inetd.pid`"</b>) </body> </html> --------------1E2D40B899C64D3BD85AF1B2-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36ACD273.8D9BF46D>