Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesLgn committed Nov 30, 2024
2 parents 1bb6276 + 00be63a commit e779b29
Show file tree
Hide file tree
Showing 16 changed files with 58 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jobs:
cache: 'maven'
- name: Build with Maven
# See https://maven.apache.org/ref/current/maven-embedder/cli.html
run: ./mvnw --batch-mode -V --fail-at-end --errors install
run: ./mvnw --batch-mode -V --fail-at-end --errors install -Pdocker
22 changes: 11 additions & 11 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ <h1>GreenMail</h1>
<p class="lead">Open Source suite of lightweight and sand-boxed email servers supporting SMTP, POP3 and
IMAP.</p>

<p class="version">Currently <a href="https://github.com/greenmail-mail-test/greenmail/releases">v2.1.0 (stable) / v2.0.1 (maintenance) / v1.6.15 (maintenance)</a></p>
<p class="version">Currently <a href="https://github.com/greenmail-mail-test/greenmail/releases">v2.1.2 (stable) / v2.0.1 (maintenance) / v1.6.15 (maintenance)</a></p>
</div>
</div>

Expand Down Expand Up @@ -104,7 +104,7 @@ <h1>GreenMail</h1>
<a class="nav-item nav-link nav-pills" href="#download" data-toggle="collapse"
data-target="#nav_download">Download</a>
<nav id="nav_download" class="nav nav-pills flex-column collapse" data-parent="#sidebar">
<a class="nav-item nav-link ml-3" href="#download_2_1_0">2.1.0 (JakartaMail 2.1, JDK 11)</a>
<a class="nav-item nav-link ml-3" href="#download_2_1_2">2.1.2 (JakartaMail 2.1, JDK 11)</a>
<a class="nav-item nav-link ml-3" href="#download_2_0_1">2.0.1 (JakartaMail 2.0, JDK 8)</a>
<a class="nav-item nav-link ml-3" href="#download_1_6_15">1.6.15 (JakartaMail 1.6, JDK 8)</a>
<a class="nav-item nav-link ml-3" href="#download_1_5_14">1.5.14 (JDK 8)</a>
Expand Down Expand Up @@ -166,7 +166,7 @@ <h3 id="intro" class="anchor">Introduction</h3>
<div class="alert alert-info" role="alert">
Releases and compatibility:
<ul>
<li>2.1.0 <b>stable</b>
<li>2.1.x <b>stable</b>
<ul>
<li><a href="https://jakarta.ee/specifications/mail/2.1/">Jakarta Mail 2.1.x</a></li>
<li><a href="https://eclipse-ee4j.github.io/angus-mail/">Angus Mail</a></li>
Expand Down Expand Up @@ -1280,9 +1280,9 @@ <h5>Quick-links</h5>

<p id="download_2_1_x" class="anchor"></p>

<h4 id="download_2_1_0" class="anchor"><a
href="https://github.com/greenmail-mail-test/greenmail/releases" title="2.1.0 Release Notes">2.1.0</a>
- October 5th, 2024</h4>
<h4 id="download_2_1_2" class="anchor"><a
href="https://github.com/greenmail-mail-test/greenmail/releases" title="2.1.2 Release Notes">2.1.2</a>
- November 30th, 2024</h4>

<div class="alert alert-info" role="alert">
<p>This version requires JDK 1.8 (JDK 11) and Jakarta Mail 2.1 .</p>
Expand All @@ -1303,31 +1303,31 @@ <h4 id="download_2_1_0" class="anchor"><a
<tr>
<td>GreenMail Core</td>
<td>
<a href="https://repo1.maven.org/maven2/com/icegreen/greenmail/2.1.0/greenmail-2.1.0.jar">com.icegreen:greenmail:2.1.0</a>
<a href="https://repo1.maven.org/maven2/com/icegreen/greenmail/2.1.2/greenmail-2.1.2.jar">com.icegreen:greenmail:2.1.2</a>
</td>
</tr>
<tr>
<td>GreenMail Standalone</td>
<td>
<a href="https://repo1.maven.org/maven2/com/icegreen/greenmail-standalone/2.1.0/greenmail-standalone-2.1.0.jar">com.icegreen:greenmail-standalone:2.1.0</a>
<a href="https://repo1.maven.org/maven2/com/icegreen/greenmail-standalone/2.1.2/greenmail-standalone-2.1.2.jar">com.icegreen:greenmail-standalone:2.1.2</a>
(<a href="https://hub.docker.com/r/greenmail/standalone/">Docker Hub</a>)
</td>
</tr>
<tr>
<td>GreenMail Webapp</td>
<td>
<a href="https://repo1.maven.org/maven2/com/icegreen/greenmail-webapp/2.1.0/greenmail-webapp-2.1.0.war">com.icegreen:greenmail-webapp:2.1.0:war</a>
<a href="https://repo1.maven.org/maven2/com/icegreen/greenmail-webapp/2.1.2/greenmail-webapp-2.1.2.war">com.icegreen:greenmail-webapp:2.1.2:war</a>
</td>
</tr>
<tr>
<td>GreenMail Spring</td>
<td>
<a href="https://repo1.maven.org/maven2/com/icegreen/greenmail-spring/2.1.0/greenmail-spring-2.1.0.jar">com.icegreen:greenmail-spring:2.1.0</a>
<a href="https://repo1.maven.org/maven2/com/icegreen/greenmail-spring/2.1.2/greenmail-spring-2.1.2.jar">com.icegreen:greenmail-spring:2.1.2</a>
</td>
</tr>
</table>
<p>Available via Maven repository or as a <a
href="https://github.com/greenmail-mail-test/greenmail/archive/release-2.1.0.zip">ZIP from
href="https://github.com/greenmail-mail-test/greenmail/archive/release-2.1.2.zip">ZIP from
GitHub</a>.

<p id="download_2_0_x" class="anchor"></p>
Expand Down
4 changes: 2 additions & 2 deletions greenmail-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@

<artifactId>greenmail</artifactId>
<packaging>jar</packaging>
<version>2.1.1-SNAPSHOT</version>
<version>2.1.3-SNAPSHOT</version>

<parent>
<groupId>com.icegreen</groupId>
<artifactId>greenmail-parent</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>2.1.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public GreenMailConfiguration build(Properties properties) {
}

String sieveIgnoreDetail = properties.getProperty(GREENMAIL_SIEVE_IGNORE_DETAIL, "false");
if (null != sieveIgnoreDetail) {
if (Boolean.TRUE.toString().equalsIgnoreCase(sieveIgnoreDetail)) {
configuration.withSieveIgnoreDetail();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
public class RcptCommand
extends SmtpCommand {
static Pattern param = Pattern.compile("RCPT TO:\\s?<([^>]+)>",
static Pattern param = Pattern.compile("RCPT TO:\\s?<([^>]*)>.*",
Pattern.CASE_INSENSITIVE);

@Override
Expand Down
4 changes: 2 additions & 2 deletions greenmail-docker/standalone/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<description>Docker image running GreenMail Standalone</description>

<artifactId>greenmail-docker-standalone</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>2.1.3-SNAPSHOT</version>
<!-- Does not actually provide a JAR, but requires the JAR Maven lifecycle
for unit test -->
<packaging>jar</packaging>
Expand All @@ -16,7 +16,7 @@
<parent>
<groupId>com.icegreen</groupId>
<artifactId>greenmail-parent</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>2.1.3-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void testAllServices() throws MessagingException, InterruptedException {
"{\"port\":3993,\"address\":\"0.0.0.0\",\"protocol\":\"imaps\",\"isSecure\":true,\"readTimeout\":-1,\"writeTimeout\":-1,\"connectionTimeout\":-1,\"serverStartupTimeout\":2000,\"isDynamicPort\":false}" +
"]," +
"\"authenticationDisabled\":true," +
"\"sieveIgnoreDetail\":true,\"preloadDirectory\":null" +
"\"sieveIgnoreDetail\":false,\"preloadDirectory\":null" +
"}"
);
}
Expand Down
4 changes: 2 additions & 2 deletions greenmail-junit4/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

<artifactId>greenmail-junit4</artifactId>
<packaging>jar</packaging>
<version>2.1.1-SNAPSHOT</version>
<version>2.1.3-SNAPSHOT</version>

<parent>
<groupId>com.icegreen</groupId>
<artifactId>greenmail-parent</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>2.1.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions greenmail-junit5/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

<artifactId>greenmail-junit5</artifactId>
<packaging>jar</packaging>
<version>2.1.1-SNAPSHOT</version>
<version>2.1.3-SNAPSHOT</version>

<parent>
<groupId>com.icegreen</groupId>
<artifactId>greenmail-parent</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>2.1.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions greenmail-spring/pom.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<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 https://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>greenmail-spring</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>2.1.3-SNAPSHOT</version>
<packaging>jar</packaging>
<name>== GreenMail Spring ==</name>
<description>GreenMail support for Spring</description>

<parent>
<groupId>com.icegreen</groupId>
<artifactId>greenmail-parent</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>2.1.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions greenmail-standalone/pom.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<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 https://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>greenmail-standalone</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>2.1.3-SNAPSHOT</version>
<packaging>jar</packaging>
<name>== Greenmail Standalone ==</name>
<description>Run GreenMail standalone</description>

<parent>
<groupId>com.icegreen</groupId>
<artifactId>greenmail-parent</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>2.1.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void testApi() {
"{\"port\":3143,\"address\":\"127.0.0.1\",\"protocol\":\"imap\",\"isSecure\":false,\"readTimeout\":-1," +
"\"writeTimeout\":-1,\"connectionTimeout\":-1,\"serverStartupTimeout\":2000,\"isDynamicPort\":false}]," +
"\"authenticationDisabled\":false," +
"\"sieveIgnoreDetail\":true," +
"\"sieveIgnoreDetail\":false," +
"\"preloadDirectory\":null" +
"}");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void testBuildWithSieveIgnoreDetailEnabledSetting() {
GreenMailConfiguration config = new PropertiesBasedGreenMailConfigurationBuilder().build(props);

assertThat(config).isNotNull();
assertThat(config.isSieveIgnoreDetailEnabled()).isTrue();
assertThat(config.isSieveIgnoreDetailEnabled()).isFalse();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,18 @@ void mailSenderAUTHSuffix() throws IOException, MessagingException {
}
}


@Test
public void rcptToWithParameter() throws IOException, MessagingException {
Session smtpSession = greenMail.getSmtp().createSession();

try (SMTPTransport smtpTransport = new SMTPTransport(smtpSession, smtpURL)) {
Socket smtpSocket = new Socket(hostAddress, port); // Closed by transport
smtpTransport.connect(smtpSocket);
assertThat(smtpTransport.isConnected()).isTrue();
smtpTransport.issueCommand("MAIL FROM: <[email protected]>", -1);
smtpTransport.issueCommand("RCPT TO: <test@localhost> NOTIFY=SUCCESS,FAILURE", -1);
assertThat(smtpTransport.getLastServerResponse()).isEqualToNormalizingWhitespace("250 OK");
}
}
}
4 changes: 2 additions & 2 deletions greenmail-webapp/pom.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<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 https://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>greenmail-webapp</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>2.1.3-SNAPSHOT</version>
<packaging>war</packaging>
<name>== Greenmail Webapp ==</name>
<description>Embedded GreenMail Webapp</description>

<parent>
<groupId>com.icegreen</groupId>
<artifactId>greenmail-parent</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>2.1.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
26 changes: 13 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<artifactId>greenmail-parent</artifactId>
<packaging>pom</packaging>
<!-- This version should get inherited to all subprojects. -->
<version>2.1.1-SNAPSHOT</version>
<version>2.1.3-SNAPSHOT</version>

<licenses>
<license>
Expand Down Expand Up @@ -139,15 +139,15 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.1</version>
<version>3.5.2</version>
<configuration>
<workingDirectory>${project.build.directory}</workingDirectory>
<argLine>@{argLine} -Djava.net.preferIPv4Stack=true --add-opens=java.base/sun.security.x509=ALL-UNNAMED</argLine>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.5.1</version>
<version>3.5.2</version>
<configuration>
<workingDirectory>${project.build.directory}</workingDirectory>
<argLine>@{argLine} -Djava.net.preferIPv4Stack=true</argLine>
Expand Down Expand Up @@ -197,7 +197,7 @@
</plugin>
<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>3.5.1</version>
<version>3.5.2</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
Expand Down Expand Up @@ -237,7 +237,7 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.10.1</version>
<version>3.11.1</version>
<configuration>
<links>
<link>https://docs.oracle.com/javase/8/docs/api/</link>
Expand Down Expand Up @@ -347,7 +347,7 @@

<properties>
<slf4j.version>1.7.36</slf4j.version>
<log4j2.version>2.24.1</log4j2.version>
<log4j2.version>2.24.2</log4j2.version>
<spring.version>5.3.39</spring.version>
<junit5.version>5.11.3</junit5.version>
<jetty.version>11.0.24</jetty.version>
Expand All @@ -363,32 +363,32 @@
<dependency>
<groupId>com.icegreen</groupId>
<artifactId>greenmail</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>2.1.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.icegreen</groupId>
<artifactId>greenmail-standalone</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>2.1.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.icegreen</groupId>
<artifactId>greenmail-webapp</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>2.1.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.icegreen</groupId>
<artifactId>greenmail-spring</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>2.1.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.icegreen</groupId>
<artifactId>greenmail-junit4</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>2.1.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.icegreen</groupId>
<artifactId>greenmail-junit5</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>2.1.3-SNAPSHOT</version>
</dependency>

<!-- Third party -->
Expand Down Expand Up @@ -503,7 +503,7 @@
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>5.4.0</version>
<version>5.5.0</version>
</dependency>
<!-- Transitively by junit:junit -->
<dependency>
Expand Down

0 comments on commit e779b29

Please sign in to comment.