Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ A1 OK [READ-WRITE] Completed
Some simple integration tests are available via:

----
$ sbt test
$ sbt GatlingIt/test
----

Finally execute your gatling scenarios:
Finally, execute your gatling scenarios:

----
$ sbt gatling:test
Expand Down
24 changes: 24 additions & 0 deletions src/it/resources/james-conf/imapserver.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<imapservers>
<imapserver enabled="true">
<jmxName>imapserver</jmxName>
<bind>0.0.0.0:143</bind>
<connectionBacklog>200</connectionBacklog>
<tls socketTLS="false" startTLS="true">
<keystore>file://conf/keystore</keystore>
<keystoreType>PKCS12</keystoreType>
<secret>james72laBalle</secret>
<provider>org.bouncycastle.jce.provider.BouncyCastleProvider</provider>
</tls>
<connectionLimit>0</connectionLimit>
<connectionLimitPerIP>0</connectionLimitPerIP>
<idleTimeInterval>120</idleTimeInterval>
<idleTimeIntervalUnit>SECONDS</idleTimeIntervalUnit>
<enableIdle>true</enableIdle>
<plainAuthDisallowed>false</plainAuthDisallowed>
<auth>
<plainAuthEnabled>true</plainAuthEnabled>
</auth>
<compress>true</compress>
</imapserver>
</imapservers>
51 changes: 51 additions & 0 deletions src/it/resources/james-conf/jwt_privatekey
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
-----BEGIN RSA PRIVATE KEY-----
MIIJKAIBAAKCAgEAubqHygJu1wvhKH4ctiT03u2E/OotP6qOh+lc0UZTeT9tSvpw
Aqc+5QZvbo1eQNEzeNkgFazCLJTV2YKfZClwYDwjTiWgVOUDMVVpDZrYnKiEgTAd
rlO3iWg2bDMLlgcnbGxEXlzUQcj0vZiDNajKTqC3NvgdgLtdW31akbTS5vIR4v7/
yC1AS11Pr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vjqzaty71iwAfKk9NF6ZENS547n2H0A5a
f4vyc+Z1nWz+z3TmniQSlBnMGwKDvOvgoZgEsvWn7BMzjUZEfxvGU4wKIO2od5YN
r5QnuQKCAQBtcdg0x3pfEZBQVCQ2GuF4+3TpmtWgKCTzGrhttPwiyfSI5WCsRaeB
N9SNPNS31ieU7ytsqg0vmmZ53a9EMcjlzB4WtDhEXoxMM1QFIxJz+6qPoZA2y8ee
XvS03lKaT5CqQuR2rar17JU/HZGh458X3F2I6TRI2iMQBsHyFhwIXnUdmC17jdjF
CCVyld3Nn25IwiZx8koot3AxztkjO9VaEWzl314PQdtQn+Edjm3fplN/tgq0sAhy
uOJ+kkSBNiBPME+HoUrkyXQo2lKrAr4YVU9uchEZqt/JXUUWNkgFdD9Fhgp1poXE
4VP7uCZ5Kb8hWo2Qf7NJDHcCTabJYTDBAoIBADio8b/6zR61vFFntdO7DQ2Pt4Zy
jravxBgIHe91XQrexIQQpwDheUf6/xwwwciL6eY81eiVKxMV0zbAlhifg1Yt213R
yo8EmkraQVs+hCZInz2dFwmd74CW/KCBAfQLpMFifQLS6oRvBBmoJGhjOVWU8cUE
DSoA6IZ9CmNzkUnkbWVGY/B3oOth8OnD94qyR/Fg0VTkclqYR39h1aIxyWG9+C+9
q3akB+kMAR5m6Pipkc5Kg6lj/28hcrszQ1MUBa2gp5tNz8sII0gaA6oMScXruXum
GUIyBTgmS9ifFbdO7gRTen3ghkbkO0ZSWghyOkCruEq2Kz6XcRbC344iKpo=
-----END RSA PRIVATE KEY-----
14 changes: 14 additions & 0 deletions src/it/resources/james-conf/jwt_publickey
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-----BEGIN PUBLIC KEY-----
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAubqHygJu1wvhKH4ctiT0
3u2E/OotP6qOh+lc0UZTeT9tSvpwAqc+5QZvbo1eQNEzeNkgFazCLJTV2YKfZClw
YDwjTiWgVOUDMVVpDZrYnKiEgTAdrlO3iWg2bDMLlgcnbGxEXlzUQcj0vZiDNajK
TqC3NvgdgLtdW31akbTS5vIR4v7/yC1AS11PrEjEKofKYuMaAPAX/MBsWK/gYodr
tl+AIVUNLi/J8/Gen34oQi/346s9FxrDqvbFdH5caXyaMTmhPKDXc72YSn1cVSct
epXllLlauLBoLi4+o+STbDzgfkTypHiAttCk38vy5mNdJpTH40vyCyq3gKVzLLqD
/BNh5EMTKHs3HDZ9TRmFRyoxzeG15dNwOJxQfre9ZN06QbQOXr1sJkfAFCM5vzox
7Fie3ShrYFdOTunGS9W01NBrcT6TB57xpJftDhYRfm5XbbOB+v7bmBGmqxJh0j1I
F1os48f+LvSA1p7L4OrWwym1UVLqtl7brI7aNMbrnRzkVVJbvj+/NF+HOBfQ24pf
FtaZ1+H3nvUP68YCk8cnl2XcABB1GyW6Adbwz8F2ojIgJGGEPVjga6YghgY5YBgj
zfIoxPvQS9JEdx6n6Qk3q2Epa3yuMe5s1eBSoCiaNuJZ3yiyTj6fXGvaBYxo/uSS
0kQCecXUl1KG2yFy1BRsYdMCAwEAAQ==
-----END PUBLIC KEY-----
Binary file added src/it/resources/james-conf/keystore
Binary file not shown.
35 changes: 35 additions & 0 deletions src/it/resources/james-conf/smtpserver.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0"?>
<smtpservers>
<smtpserver enabled="true">
<jmxName>smtpserver-startTLS</jmxName>
<bind>0.0.0.0:587</bind>
<connectionBacklog>200</connectionBacklog>
<tls socketTLS="false" startTLS="true">
<keystore>file://conf/keystore</keystore>
<keystoreType>PKCS12</keystoreType>
<secret>james72laBalle</secret>
<provider>org.bouncycastle.jce.provider.BouncyCastleProvider</provider>
<algorithm>SunX509</algorithm>
</tls>
<connectiontimeout>360</connectiontimeout>
<connectionLimit>0</connectionLimit>
<connectionLimitPerIP>0</connectionLimitPerIP>
<auth>
<announce>forUnauthorizedAddresses</announce>
<requireSSL>false</requireSSL>
<plainAuthEnabled>true</plainAuthEnabled>
</auth>
<authorizedAddresses>127.0.0.0/8</authorizedAddresses>
<!-- Trust authenticated users -->
<verifyIdentity>false</verifyIdentity>
<maxmessagesize>0</maxmessagesize>
<addressBracketsEnforcement>true</addressBracketsEnforcement>
<smtpGreeting>Apache JAMES awesome SMTP Server</smtpGreeting>
<handlerchain>
<handler class="org.apache.james.smtpserver.fastfail.ValidRcptHandler"/>
<handler class="org.apache.james.smtpserver.CoreCmdHandlerLoader"/>
</handlerchain>
</smtpserver>
</smtpservers>


32 changes: 32 additions & 0 deletions src/it/resources/james-conf/webadmin.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
enabled=true
port=8000
host=0.0.0.0

# Defaults to false
https.enabled=false

# Compulsory when enabling HTTPS
#https.keystore=/path/to/keystore
#https.password=password

# Optional when enabling HTTPS (self signed)
#https.trust.keystore
#https.trust.password

# Defaults to false
#jwt.enabled=true
#
## If you wish to use OAuth authentication, you should provide a valid JWT public key.
## The following entry specify the link to the URL of the public key file,
## which should be a PEM format file.
##
#jwt.publickeypem.url=file://conf/jwt_publickey

# Defaults to false
#cors.enable=true
#cors.origin

# List of fully qualified class names that should be exposed over webadmin
# in addition to your product default routes. Routes needs to be located
# within the classpath or in the ./extensions-jars folder.
#extensions.routes=
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import java.net.URL
import com.linagora.gatling.imap.protocol.{Domain, User}
import org.slf4j.{Logger, LoggerFactory}
import org.testcontainers.containers.GenericContainer
import org.testcontainers.utility.MountableFile

import scala.concurrent.Await
import scala.concurrent.duration._
Expand Down Expand Up @@ -37,7 +38,13 @@ object JamesServer extends Server {
}

def start(): RunningServer = {
val james = new GenericContainer("linagora/james-memory")
val james = new GenericContainer("linagora/tmail-backend:memory-0.4.3")
james.withCopyFileToContainer(MountableFile.forClasspathResource("james-conf/jwt_privatekey"), "/root/conf/")
james.withCopyFileToContainer(MountableFile.forClasspathResource("james-conf/jwt_publickey"), "/root/conf/")
james.withCopyFileToContainer(MountableFile.forClasspathResource("james-conf/webadmin.properties"), "/root/conf/")
james.withCopyFileToContainer(MountableFile.forClasspathResource("james-conf/keystore"), "/root/conf/")
james.withCopyFileToContainer(MountableFile.forClasspathResource("james-conf/imapserver.xml"), "/root/conf/")
james.withCopyFileToContainer(MountableFile.forClasspathResource("james-conf/smtpserver.xml"), "/root/conf/")
james.addExposedPorts(jmapPort, imapPort, smtpPort, webadminPort)
james.start()
new RunningJamesServer(james)
Expand Down