Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

MailPortlet v2.0.0-alpha-

...

4 User Manual

Foreword

Matt Young and Ren Provey of the Internet Frameworks Services division of Duke University's Office Of Information Technology (OIT) created the original version of this portlet in 2007 and it was contributed by Duke University to the JA-SIG community in early 2008. Since then Jen Bourey (of Yale University), Eric Dalquist (of University of Wisconsin-Madison), Erik A. Olsson (of University of California, Irvine), and Gary Weaver (of Duke University) have made contributions. Mail Portlet was free under the BSD License upon original contribution and since then has converted to an Apache 2.0 license per Jasig. The MailPortlet is a collaborative open-source project whose source control, wiki, and project tracking is hosted by Jasig.

...

Code Block
svn co https://www.ja-sig.org/svn/sandbox/MailPortlet/tags/rel-2.0.0-alpha-34

To get the latest dev version of the source (which may not build and may be buggy and/or unstable):

...

Customize the mail account templates in [https://www.ja-sig.org/svn/sandbox/MailPortlet/tags/rel-2.0.0-alpha-4/src/main/webapp/WEB-INF/context/portlet/mailservers.xml|WEB-INF/context/portlet/mailservers. The following are the defaults with some commented examples of further customization and customization of JavaMail properties:

...

xml. The default mailservers.xml contains examples.

Encrypting User Mail Account Passwords

If you let your users add their own mail accounts then it is likely that they will be storing passwords as well. This means you should really have some level of security on the passwords that are stored. Hopefully you also have your server environment and database locked down among other things, and this is just a little icing on the cake.

If right now you are scared, don't be. With the default configuration of MailPortlet, the following change to set the AES encryption key is the only change you should have to make to the configuration to get it up and running and letting your users connect to their Gmail, AOL, ISP, etc. accounts, although you may want to customize it more, which is why there are other steps below.

Here is an example of a 40-byte hex key that someone might put into WEB-INF/context/portlet/mailsecurity.xml for 128-bit AES encryption, but USE YOUR OWN KEY - do NOT use the 1f1f1f... provided here. If you use 1f1f1f... then you may as well not have encrypted the passwords at all:

Code Block

...

    <bean name="encryptionTool" class="org.jasig.portlet.mail.encryption.impl.AesEncryptionToolImpl">
       xsi:schemaLocation="
            http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd <!-- REPLACE THIS KEY WITH A KEY YOU MAKE UP IN HEX THAT IS THE SAME LENGTH. THIS LENGTH OF KEY IS ONLY ALLOWED IN THE U.S. -->
        <property    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
            http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">name="key" value="1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f"/>
    </bean>
...
</beans>

Here is an example of a 16-byte hex key that someone might put into WEB-INF/context/portlet/mailsecurity.xml for 64-bit AES encryption. Again, USE YOUR OWN KEY - do NOT use the 1f1f1f... provided here. If you use 1f1f1f... then you may as well not have encrypted the passwords at all:

Code Block

...

    <bean name="mailAccountTemplateManagerencryptionTool" class="org.jasig.portlet.mail.encryption.impl.MailAccountTemplateManagerAesEncryptionToolImpl">
        <property name="templates">
            <list>
                <!-- Order here doesn't matter, as order is dictated by ordinal set in each bean<!-- REPLACE THIS KEY WITH A KEY YOU MAKE UP IN HEX THAT IS THE SAME LENGTH. THIS LENGTH OF KEY IS FOR LOCATIONS OUTSIDE OF THE U.S. -->
        <property   name="key" value="1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f"/>
    <!-- Anything you add below must be added here. -->
                <ref bean="custom"/>
                <ref bean="aol"/>
                <ref bean="gmail"/>
                <ref bean="dotMac"/>
                <ref bean="mobileMe"/>
                <!-- examples:
                <ref bean="myInstitutionalMailServer"/>
                <ref bean="anotherInstitutionalMailServer"/>
                <ref bean="demo"/>
                -->
            </list>
        </property>
    </bean>

    <!-- Change the values of this bean to reflect the situation at your institution -->

    <!-- Note: name is the formal name of the account that will be listed. displayName is the default tabname. -->



    <bean name="gmail" parent="imaps">
        <property name="host" value="imap.gmail.com"/>
        <property name="link" value="http://mail.google.com"/>
        <property name="name" value="Gmail"/>
        <property name="displayName" value="Gmail"/>
        <property name="ordinal" value="100"/>
    </bean>
    <!-- remember to make sure your server bean name is listed in the mailAccountTemplateManager above -->

    <bean name="dotMac" parent="imaps">
        <property name="host" value="mail.mac.com"/>
        <property name="link" value="http://www.mac.com"/>
        <property name="name" value=".Mac"/>
        <property name="displayName" value=".Mac"/>
        <property name="ordinal" value="200"/>
    </bean>
    <!-- remember to make sure your server bean name is listed in the mailAccountTemplateManager above -->

    <bean name="mobileMe" parent="imaps">
        <property name="host" value="mail.me.com"/>
        <property name="link" value="http://www.me.com"/>
        <property name="name" value="MobileMe"/>
        <property name="displayName" value="MobileMe"/>
        <property name="ordinal" value="300"/>
    </bean>
    <!-- remember to make sure your server bean name is listed in the mailAccountTemplateManager above -->

    <bean name="aol" parent="imaps">
        <property name="host" value="imap.aol.com"/>
        <property name="link" value="http://webmail.aol.com"/>
        <property name="name" value="AOL"/>
        <property name="displayName" value="AOL"/>
        <property name="ordinal" value="400"/>
    </bean>
    <!-- remember to make sure your server bean name is listed in the mailAccountTemplateManager above -->

    <bean name="custom" class="org.jasig.portlet.mail.model.MailAccountTemplate">
        <property name="fixed" value="false"/>
        <property name="defaultFolder" value="INBOX"/>
        <property name="name" value="Other Email"/>
        <property name="displayName" value="Other Email"/>
        <property name="ordinal" value="99999"/>
        <property name="custom" value="true"/>
        <!-- note: credentialsService is the key of the service in CredentialsServiceManager, not the bean -->
        <property name="credentialsService" value="encryptedCredentialsService"/>
        <property name="includeInDefault" value="false"/>
    </bean>
    <!-- remember to make sure your server bean name is listed in the mailAccountTemplateManager above -->

    <!-- Other examples: -->

    <!-- Example of a mail tab that gets username from REMOTE_USER and password from a userinfo attribute you would
         define in mailsecurity.xml. This mail tab would show up by default but can be removed or added by the user.
         To make it such that the user could not remove it, we'd change fixed to true. -->
    <!--
    <bean name="myInstitutionalMailServer" parent="imap">
        <property name="host" value="imap.exampleuniversity.edu"/>
        <property name="link" value="https://webmail.exampleuniversity.edu"/>
        <property name="name" value="EU Mail"/>
        <property name="displayName" value="EU"/>
        <property name="ordinal" value="10"/>
        <property name="credentialsService" value="userInfoCredentialsService"/>
        <property name="includeInDefault" value="true"/>
        <property name="fixed" value="false"/>
    </bean>
    -->

    <!-- Example of a mail tab for a server that defines some extra javamail properties and requires the student to be
         in a PAGS group with the PAGS group key "sample". Note that in order to have a PAGS group work, it must be also
         declared in the portlet.xml in the portlet.xml's portlet element like:

         <security-role-ref>
            <role-link>pags.Law</role-link>
         </security-role-ref>

         The user must enter their own username and password since it inherits the .
         This mail tab would not show up by default but is user addable.

         This example also shows how custom JavaMail properties can be defined. Note that JavaMail properties that are
         defined here will override the ones set by setting host and port, for example (so if set in both places, the
         JavaMail properties trump the others).
         -->
    <!--
    <bean name="anotherInstitutionalMailServer" parent="imaps">
        <property name="host" value="imap.law.exampleuniversity.edu"/>
        <property name="port" value="888"/>
        <property name="javaMailProperties">
            <props merge="true">
                <prop key="mail.imap.fetchsize">16384</prop>
                <prop key="mail.imap.allowreadonlyselect">true</prop>
            </props>
        </property>
        <property name="link" value="https://webmail.law.exampleuniversity.edu"/>
        <property name="name" value="Law School Mail"/>
        <property name="displayName" value="Law"/>
        <property name="memberOfAny">
            <list>
                <value>pags.Law</value>
            </list>
        </property>
        <property name="ordinal" value="20"/>
        <property name="includeInDefault" value="false"/>
        <property name="fixed" value="false"/>
    </bean>
    -->

    <!-- Example of a configured test account for test/demonstration purposes. This could also be used to allow everyone
         or certain PAGS group(s) access to a shared account, in theory, not that we're suggesting that. The password
         should be encrypted, so a way to do this is to create the account manually using the portlet and then
         copy that password from the database into the credentials below. At one point I tried offering plain text
         credentials as an option for testing, but there is too much danger of exposing credentials as those are
         persisted also. -->
    <!--
    <bean name="demo" parent="imaps">
        <property name="host" value="imap.gmail.com"/>
        <property name="link" value="http://mail.google.com"/>
        <property name="name" value="Demo"/>
        <property name="displayName" value="Demo"/>
        <property name="ordinal" value="40"/>
        <property name="includeInDefault" value="true"/>
        <property name="credentials" ref="demoCredentials"/>
        <property name="custom" value="true"/>
    </bean>

    <bean name="demoCredentials" class="org.jasig.portlet.mail.model.impl.MailCredentialsImpl">
        <property name="username" value="test"/>
        <property name="password" value="test"/>
    </bean>
    -->

</beans>

Encrypting User Mail Account Passwords

If you let your users add their own mail accounts then it is likely that they will be storing passwords as well. This means you should really have some level of security on the passwords that are stored. Hopefully you also have your server environment and database locked down among other things, and this is just a little icing on the cake.

If right now you are scared, don't be. With the default configuration of MailPortlet, the following change to set the AES encryption key is the only change you should have to make to the configuration to get it up and running and letting your users connect to their Gmail, AOL, ISP, etc. accounts, although you may want to customize it more, which is why there are other steps below.

Here is an example of a 40-byte hex key that someone might put into WEB-INF/context/portlet/mailsecurity.xml for 128-bit AES encryption, but USE YOUR OWN KEY - do NOT use the 1f1f1f... provided here. If you use 1f1f1f... then you may as well not have encrypted the passwords at all:

Code Block

...

    <bean name="encryptionTool" class="org.jasig.portlet.mail.encryption.impl.AesEncryptionToolImpl">
        <!-- REPLACE THIS KEY WITH A KEY YOU MAKE UP IN HEX THAT IS THE SAME LENGTH. THIS LENGTH OF KEY IS ONLY ALLOWED IN THE U.S. -->
        <property name="key" value="1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f"/>
    </bean>
...
</beans>

Here is an example of a 16-byte hex key that someone might put into WEB-INF/context/portlet/mailsecurity.xml for 64-bit AES encryption. Again, USE YOUR OWN KEY - do NOT use the 1f1f1f... provided here. If you use 1f1f1f... then you may as well not have encrypted the passwords at all:

Code Block

...

    <bean name="encryptionTool" class="org.jasig.portlet.mail.encryption.impl.AesEncryptionToolImpl">
        <!-- REPLACE THIS KEY WITH A KEY YOU MAKE UP IN HEX THAT IS THE SAME LENGTH. THIS LENGTH OF KEY IS FOR LOCATIONS OUTSIDE OF THE U.S. -->
        <property name="key" value="1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f"/>
    </bean>
...
</beans>

For those interested, it might also be a good idea to load key/iv for password encryption from one or more files separate from the spring config (that way the portal admin wouldn't necessarily have the key to decrypt passwords if you wanted to set it up that way), but I assume that if someone really wanted to do that they could figure it out on their own. I think you'd involve org.springframework.core.io.FileSystemResource in a bean somewhere, but I'm having trouble finding a good example. If you find one, please add it here (without any confidential info, please).

Using CAS for Mail Server Authentication

Yale University contributed classes and configuration to support CAS. To enable CAS support, modify the spring config files in the exploded war file or file the overlay technique described in this document, specifically (generically) take a look at files in either WEB-INF/context/.xml or WEB-INF/context/portlet/.xml as well as WEB-INF/web.xml.

You will see various sections in those configuration files commented out relating to CAS that you must uncomment and configure for CAS support in your environment.

Warning

Note that version 2.0.0-alpha-3 has not been tested with CAS authentication, so it likely needs additional work.

Using UserInfo for Mail Server Authentication

In WEB-INF/context/portlet/mailsecurity.xml be sure that the userInfoCredentialsService is setup (it should be by default):

Code Block

...
    <bean name="credentialsServiceManager" class="org.jasig.portlet.mail.CredentialsServiceManager">
        <property name="services">
            <map>
                ...
                <entry key="userInfoCredentialsService" value-ref="userInfoCredentialsService"/>
                ...
            </map>
        </property>
    </bean>
    ...
    <bean name="userInfoCredentialsService" class="org.jasig.portlet.mail.service.impl.UserInfoCredentialsService">
        <!-- if you want to get the password from userinfo, change exampleProxyTicket to the name of the attribute
             in userinfo that contains the password -->
        <property name="userInfoPasswordAttributeName" value="exampleProxyTicket"/>
    </bean>
    ...

Be sure that "exampleProxyTicket" is replaced with the UserInfo key that holds the MailServer password. Note that it currently gets the username by calling getRemoteUser() on the PortletRequest. If you would like the UserInfoCredentialsService to get the username from somewhere else, contact us (see the Feedback section).

We suggest that this attribute contain a password that a token that can only be used for the current login session. Passing in a plain-text password via UserInfo is probably not a good idea (for example- what if there were something outputting UserInfo to the screen for debugging purposes in another portlet- then the mailpassword would show up on the screen).

CSS

Starting with MailPortlet v2.0.0-alpha-3, we're trying our best to use some sort of uPortal standard styling that would be most compatible with existing and custom skins.

Note that later versions of uPortal (not sure which ones yet) may possibly change fl-activeTab to a newer class name since that one was changed in 1.0 (or earlier) of Fluid Infusion (or prior). So, if you find that the active tab is not being highlighted properly, then check to make sure that fl-activeTab is defined.

uPortal v2.5.x-v3.0.x

The MailPortlet UI depends on FSS classes (Fluid Skinning System CSS) introduced in uPortal 3.1.x. While we don't expect that you implement all of the FSS and related skin classes as defined in uPortal 3.1.x, in order for the tabs to look like tabs, you'll need to add the following to each of your skins if these classes are not already implemented. Please forgive the redefines here (copied the FSS and FSS uPortal 3.1 skin redefines).

No Format

/* The following is basically copied from uPortal 3.1.1's css with exception of removal of the skin class from the lower-half. Please modify to suit your skins */

.fl-container-flex {width: 100%; clear:both;}

/*
 * Tabs: a quick tab system
 * Dependency: list-based markup ?
 */
.fl-tabs {margin:0.75em 0 0 0; border-bottom:1px solid #000; text-align:center; padding-bottom:0.2em;}
.fl-tabs li {list-style-type:none; display:inline;}
.fl-tabs li a {padding:0.25em 1.25em; background-color:#fff; margin-left:-5px; *margin-bottom:-8px; zoom:1; border:1px solid #000; border-bottom:1px solid #fff;}
.fl-tabs li a:hover {}
.fl-tabs .orderable-drop-marker {padding:0 3px; background-color:#c00;margin:0 5px 0 -5px; zoom:1;}

.fl-tabs .fl-activeTab {}

.fl-tabs-center {text-align:center;}
.fl-tabs-left {text-align:left; padding-left:10px;}
.fl-tabs-right {text-align:right; padding-right:15px;}

/* Helper: Tabs */
.fl-tabs {border-bottom-color:#4070a1;}
.fl-tabs li {background-color:#dfefff;}
.fl-tabs li,
.fl-tabs li a {font-weight:bold; color:#4070a1; border-color:#4070a1; text-decoration:none;}
.fl-tabs li:hover,
.fl-tabs li:hover a,
.fl-tabs li a:hover {background-color:#5a95cf; color:#fff;}
.fl-tabs li.fl-activeTab,
.fl-tabs li.fl-activeTab:hover,
.fl-tabs li.fl-activeTab a,
.fl-tabs li.fl-activeTab a:hover {background-color: #fff; border-bottom-color:#fff; color:#508cc9;}
.fl-tab-content {background-color:#ffffff; color:#000;}

In addition, if you don't have the following JSR-168 PLT.C classes defined (the "portlet-*" classes), you might want to define them to suit your skin's needs. In older versions of uPortal these classes were defined per portlet in the skin, like cartoon_portlet.css in uPortal 2.5.3.1. In comparison, the default skin has a dedicated CSS file in the skin jsr168_portlet_spec.css in uPortal 3.1.1. Here are the portlet-* CSS classes it uses as of 2.0-alpha-3:

  • portlet-msg-info
  • portlet-msg-error
  • portlet-form-button
  • portlet-section-header
  • portlet-section-subheader
  • portlet-form-field-label

Internationalization/Internationalisation/I18n/Localization/Localisation/L10n/Message Customization

The messages properties files are located in WEB-INF/classes/org/jasig/portlet/mail/i18n/.

For example, in WEB-INF/classes/org/jasig/portlet/mail/i18n/MailPortlet_en_US.properties there is:

Code Block

# MailPortlet messages

# All entries for CredentialsServiceManager in /bean>
...
</beans>

For those interested, it might also be a good idea to load key/iv for password encryption from one or more files separate from the spring config (that way the portal admin wouldn't necessarily have the key to decrypt passwords if you wanted to set it up that way), but I assume that if someone really wanted to do that they could figure it out on their own. I think you'd involve org.springframework.core.io.FileSystemResource in a bean somewhere, but I'm having trouble finding a good example. If you find one, please add it here (without any confidential info, please).

Using CAS for Mail Server Authentication

Yale University contributed classes and configuration to support CAS. To enable CAS support, modify the spring config files in the exploded war file or file the overlay technique described in this document, specifically (generically) take a look at files in either WEB-INF/context/.xml or WEB-INF/context/portlet/.xml as well as WEB-INF/web.xml.

You will see various sections in those configuration files commented out relating to CAS that you must uncomment and configure for CAS support in your environment.

Warning

Note that version 2.0.0-alpha-4 has not been tested with CAS authentication, so it likely needs additional work.

Using UserInfo for Mail Server Authentication

In WEB-INF/context/portlet/mailsecurity.xml

...

Please see the corresponding properties file in the tag of the release you are using for additional detail, as more may be added or keys could change during further developmentbe sure that the userInfoCredentialsService is setup (it should be by default):

Code Block

...
    <bean name="credentialsServiceManager" class="org.jasig.portlet.mail.CredentialsServiceManager">
        <property name="services">
            <map>
                ...
                <entry key="userInfoCredentialsService" value-ref="userInfoCredentialsService"/>
                ...
            </map>
        </property>
    </bean>
    ...
    <bean name="userInfoCredentialsService" class="org.jasig.portlet.mail.service.impl.UserInfoCredentialsService">
        <!-- if you want to get the password from userinfo, change exampleProxyTicket to the name of the attribute
             in userinfo that contains the password -->
        <property name="userInfoPasswordAttributeName" value="exampleProxyTicket"/>
    </bean>
    ...

Be sure that "exampleProxyTicket" is replaced with the UserInfo key that holds the MailServer password. Note that it currently gets the username by calling getRemoteUser() on the PortletRequest. If you would like the UserInfoCredentialsService to get the username from somewhere else, contact us (see the Feedback section).

We suggest that this attribute contain a password that a token that can only be used for the current login session. Passing in a plain-text password via UserInfo is probably not a good idea (for example- what if there were something outputting UserInfo to the screen for debugging purposes in another portlet- then the mailpassword would show up on the screen).

CSS

Starting with MailPortlet v2.0.0-alpha-4, we're trying our best to use some sort of uPortal standard styling that would be most compatible with existing and custom skins.

Note that later versions of uPortal (not sure which ones yet) may possibly change fl-activeTab to a newer class name since that one was changed in 1.0 (or earlier) of Fluid Infusion (or prior). So, if you find that the active tab is not being highlighted properly, then check to make sure that fl-activeTab is defined.

uPortal v2.5.x-v3.0.x

The MailPortlet UI depends on FSS classes (Fluid Skinning System CSS) introduced in uPortal 3.1.x. While we don't expect that you implement all of the FSS and related skin classes as defined in uPortal 3.1.x, in order for the tabs to look like tabs, you'll need to add the following to each of your skins if these classes are not already implemented. Please forgive the redefines here (copied the FSS and FSS uPortal 3.1 skin redefines).

No Format

/* The following is basically copied from uPortal 3.1.1's css with exception of removal of the skin class from the lower-half. Please modify to suit your skins */

.fl-container-flex {width: 100%; clear:both;}

/*
 * Tabs: a quick tab system
 * Dependency: list-based markup ?
 */
.fl-tabs {margin:0.75em 0 0 0; border-bottom:1px solid #000; text-align:center; padding-bottom:0.2em;}
.fl-tabs li {list-style-type:none; display:inline;}
.fl-tabs li a {padding:0.25em 1.25em; background-color:#fff; margin-left:-5px; *margin-bottom:-8px; zoom:1; border:1px solid #000; border-bottom:1px solid #fff;}
.fl-tabs li a:hover {}
.fl-tabs .orderable-drop-marker {padding:0 3px; background-color:#c00;margin:0 5px 0 -5px; zoom:1;}

.fl-tabs .fl-activeTab {}

.fl-tabs-center {text-align:center;}
.fl-tabs-left {text-align:left; padding-left:10px;}
.fl-tabs-right {text-align:right; padding-right:15px;}

/* Helper: Tabs */
.fl-tabs {border-bottom-color:#4070a1;}
.fl-tabs li {background-color:#dfefff;}
.fl-tabs li,
.fl-tabs li a {font-weight:bold; color:#4070a1; border-color:#4070a1; text-decoration:none;}
.fl-tabs li:hover,
.fl-tabs li:hover a,
.fl-tabs li a:hover {background-color:#5a95cf; color:#fff;}
.fl-tabs li.fl-activeTab,
.fl-tabs li.fl-activeTab:hover,
.fl-tabs li.fl-activeTab a,
.fl-tabs li.fl-activeTab a:hover {background-color: #fff; border-bottom-color:#fff; color:#508cc9;}
.fl-tab-content {background-color:#ffffff; color:#000;}

In addition, if you don't have the following JSR-168 PLT.C classes defined (the "portlet-*" classes), you might want to define them to suit your skin's needs. In older versions of uPortal these classes were defined per portlet in the skin, like cartoon_portlet.css in uPortal 2.5.3.1. In comparison, the default skin has a dedicated CSS file in the skin jsr168_portlet_spec.css in uPortal 3.1.1. Here are the portlet-* CSS classes it uses as of 2.0-alpha-4:

  • portlet-msg-info
  • portlet-msg-error
  • portlet-form-button
  • portlet-section-header
  • portlet-section-subheader
  • portlet-form-field-label

Internationalization/Internationalisation/I18n/Localization/Localisation/L10n/Message Customization

The i18n message files are located in WEB-INF/classes/org/jasig/portlet/mail/i18n/. For example, the modifiable US English default properties are in mailservers.xml.

Advanced Configuration

Restrict/Add JavaMail Providers

...

If you add new providers (protocols), you need to add them to your i18n messages file for your locale, for example: WEB-INF/classes/org/jasig/portlet/mail/i18n/MailPortlet_en_US. properties. Here are the labels for the ones provided by default:

...

Create the following file at the root of some new project directory you create. Note that this is only an example and you should tailor the groupId and artifactId up top and the finalName to meet the needs of your environment. Please change the versions to match the version of the Jasig MailPortlet as defined in that version's pom.xml (so, for example, you should change the version on the the MailPortlet dependency war to 2.0-alpha-3 4 for that tag or 2.0-SNAPSHOT for trunk).

Code Block
<project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>edu.example.university</groupId>
    <artifactId>mail</artifactId>
    <packaging>war</packaging>

    <name>Mail</name>
    <version>yourversionnumbergoeshere</version>

    <dependencies>
      <dependency>
        <groupId>org.jasig.portlet</groupId>
        <artifactId>MailPortlet</artifactId>
        <type>war</type>
        <version>2.0.0-alpha-3<4</version>
      </dependency>
    </dependencies>

    <build>
        <finalName>mailportlet</finalName>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.0</version>
          </plugin>
        </plugins>
    </build>
</project>

...

Code Block
mkdir -P src/main/resources/
mkdir -P src/main/webapp/WEB-INF/context/portlet
mkdir -P src/test

Put the custom datasource.properties and log4j.properties files that you want to use into:

...

Put the Spring config files (mailsecurity.xml and mailservers.xml usually) that you want to use into:

...