<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>MemberManual/Email/VirtualMail</title><revhistory><revision><revnumber>23</revnumber><date>2015-04-13 16:13:37</date><authorinitials>ClintonEbadi</authorinitials><revremark>remove note about DefaultAlias since `dom' container no longer defaults to creating a catch-all</revremark></revision><revision><revnumber>22</revnumber><date>2015-03-27 23:01:19</date><authorinitials>KevinEverets</authorinitials><revremark>Changed the command to determine if $MAILDIR contains any files (a find is straightforward rather than trying to parse an ls output)</revremark></revision><revision><revnumber>21</revnumber><date>2014-05-09 22:54:10</date><authorinitials>ClintonEbadi</authorinitials><revremark>vmail add is relative to your home dir, not your maildir (but this is still bad)</revremark></revision><revision><revnumber>20</revnumber><date>2013-01-14 09:15:05</date><authorinitials>ClintonEbadi</authorinitials><revremark>cat / update</revremark></revision><revision><revnumber>19</revnumber><date>2010-02-06 22:14:13</date><authorinitials>nc-71-50-140-208.dyn.embarqhsd.net</authorinitials></revision><revision><revnumber>18</revnumber><date>2009-06-30 08:54:59</date><authorinitials>85.183.84.62</authorinitials></revision><revision><revnumber>17</revnumber><date>2008-11-18 19:29:27</date><authorinitials>AdamChlipala</authorinitials><revremark>Fix English</revremark></revision><revision><revnumber>16</revnumber><date>2008-10-28 20:32:49</date><authorinitials>c-76-124-3-134.hsd1.nj.comcast.net</authorinitials></revision><revision><revnumber>15</revnumber><date>2008-07-07 04:28:15</date><authorinitials>localhost</authorinitials><revremark>converted to 1.6 markup</revremark></revision><revision><revnumber>14</revnumber><date>2008-05-14 23:51:39</date><authorinitials>MichaelOlson</authorinitials><revremark>s/mail2/mail/</revremark></revision><revision><revnumber>13</revnumber><date>2007-12-27 20:17:56</date><authorinitials>DavorOcelic</authorinitials></revision><revision><revnumber>12</revnumber><date>2007-12-27 20:16:29</date><authorinitials>DavorOcelic</authorinitials></revision><revision><revnumber>11</revnumber><date>2007-12-15 17:29:36</date><authorinitials>AdamChlipala</authorinitials><revremark>members2 -&gt; members</revremark></revision><revision><revnumber>10</revnumber><date>2007-12-09 06:23:19</date><authorinitials>MichaelOlson</authorinitials><revremark>Use https URL for mail2</revremark></revision><revision><revnumber>9</revnumber><date>2007-12-09 02:48:45</date><authorinitials>pool-71-127-159-169.bltmmd.fios.verizon.net</authorinitials><revremark>Added note to example that web interface will fail until an initial message is received.</revremark></revision><revision><revnumber>8</revnumber><date>2007-11-12 06:33:15</date><authorinitials>MichaelOlson</authorinitials><revremark>use bold for some variables</revremark></revision><revision><revnumber>7</revnumber><date>2007-11-12 06:31:44</date><authorinitials>MichaelOlson</authorinitials><revremark>No, we really don't need maildirmake.  I've tested this.</revremark></revision><revision><revnumber>6</revnumber><date>2007-11-09 04:59:39</date><authorinitials>RyanMikulovsky</authorinitials><revremark>use maildirmake instead of just mkdir -p -- because that does not work.</revremark></revision><revision><revnumber>5</revnumber><date>2007-11-08 05:44:54</date><authorinitials>MichaelOlson</authorinitials><revremark>Add example, mention permissions</revremark></revision><revision><revnumber>4</revnumber><date>2007-11-04 22:53:37</date><authorinitials>AdamChlipala</authorinitials></revision><revision><revnumber>3</revnumber><date>2007-11-01 20:32:26</date><authorinitials>MichaelOlson</authorinitials><revremark>Make subpage of Email</revremark></revision><revision><revnumber>2</revnumber><date>2007-11-01 20:31:54</date><authorinitials>MichaelOlson</authorinitials><revremark>Promote headings</revremark></revision><revision><revnumber>1</revnumber><date>2007-11-01 20:31:10</date><authorinitials>MichaelOlson</authorinitials><revremark>Flesh out</revremark></revision></revhistory></articleinfo><para>This page describes how to use virtual mailboxes. </para><section><title>Introduction</title><para>Virtual mailboxes are a good way to give someone a &quot;vanity address&quot; on one of your domains, where they can receive and check email.  You may create virtual e-mail boxes for any domains for which you have write permission in <ulink url="https://wiki.hcoop.net/MemberManual/Email/VirtualMail/DomTool#">DomTool</ulink>. </para><para>Before continuing, please note that <ulink url="https://wiki.hcoop.net/MemberManual/Email/VirtualMail/DomTool#">DomTool</ulink> allows you to create aliases that forward mail from one address to another. Aliases are much preferable to extra mailboxes, both in terms of conserving server resources and convenience for you, as you can continue checking one mail account even if multiple aliases point to it. The basic rule is: If you are creating a virtual mailbox that only you will read, or if you are creating multiple virtual mailboxes to be read by the same other person, then you should be using aliases instead. </para><para>It is also very important that your &quot;daemon&quot; user gets write privileges on the directory that is used to store mail for each vmail username. </para></section><section><title>Complete example</title><para>To be able to receive email for the new virtual user, you need to create their Maildir directory, set the correct permissions on it, and then create the actual virtual mailbox. </para><para>In the working example below,  replace <emphasis role="strong">$USER</emphasis> with your username, <emphasis role="strong">$VUSER</emphasis> with virtual user name, <emphasis role="strong">$DOMAIN</emphasis> with your domain, and <emphasis role="strong">$MAILDIR</emphasis> with the directory where the virtual user's email is to be stored. Note that a relative pathname in <emphasis role="strong">$MAILDIR</emphasis> will be resolved by <code>vmail</code> relative your home directory. </para><screen><![CDATA[maildirmake $MAILDIR
fsr setacl $MAILDIR $USER.daemon write
vmail $DOMAIN add $VUSER $MAILDIR
# Enter a password as prompted.
vmail $DOMAIN list
# You will see that the new account shows up.]]></screen></section><section><title>Administration</title><para>We use a custom program called <code>vmail</code> to manage delivery to virtual mailboxes.  It may be invoked with <emphasis role="strong">vmail $DOMAIN $COMMAND</emphasis>, which indicates that you are configuring the virtual mailboxes for domain <emphasis role="strong">$DOMAIN</emphasis> for which you have <ulink url="https://wiki.hcoop.net/MemberManual/Email/VirtualMail/DomTool#">DomTool</ulink> permissions.  The valid commands are: </para><itemizedlist><listitem><para><emphasis role="strong">list</emphasis>: Print the mapping from usernames to mailbox directories for <code>$DOMAIN</code>. </para></listitem><listitem><para><emphasis role="strong">add $USER $MAILDIR</emphasis>: Add a mapping from <code>$USER@$DOMAIN</code> to a Maildir directory <code>$MAILDIR</code>.  You'll be prompted to enter a password for the user, which he can then use to access IMAP, POP, or restricted SMTP services. </para></listitem><listitem><para><emphasis role="strong">passwd $USER</emphasis>: Reset a virtual user's password. </para></listitem><listitem><para><emphasis role="strong">rm $USER</emphasis>: Remove a mapping.  The mailbox directory remains for you to deal with as you like. </para></listitem></itemizedlist></section><section><title>Access</title><para>People with virtual mailboxes may use the normal services for accessing their email, such as SSL IMAP and POP, and <ulink url="https://webmail.hcoop.net"/>.They authenticate giving their full e-mail addresses as usernames, in contrast to the situation for normal UNIX users. </para><para>Note: If you try to log in to the web interface this will fail because the mail directory has not been initialized yet.  Send a test message to the new account, then verify that the $MAILDIR directory now has some files (not only directories!) using <emphasis role="strong">find $MAILDIR -type f</emphasis>, and then try to access the account from the web interface. </para></section><section><title>Changing password</title><para>People with virtual mailboxes may change their password using the handy web interface at <ulink url="https://members.hcoop.net/passwd"/>. </para><!--rule (<hr>) is not applicable to DocBook--><para> <ulink url="https://wiki.hcoop.net/MemberManual/Email/VirtualMail/CategoryMemberManual#">CategoryMemberManual</ulink> </para></section></article>