Skip to content

Commit 9a5c8b5

Browse files
authored
Merge pull request #8 from Monogramm/develop
🔖 Release 1.4.0
2 parents 3b46ea3 + 0099e91 commit 9a5c8b5

15 files changed

Lines changed: 467 additions & 90 deletions
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: madmath03
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
Provide Docker commands or docker-compose file if possible.
21+
22+
**Expected behavior**
23+
A clear and concise description of what you expected to happen.
24+
25+
**Screenshots**
26+
If applicable, add screenshots to help explain your problem.
27+
28+
**Node (please complete the following information):**
29+
30+
- Node / NPM Version: (e.g. Node version 12.16.1)
31+
32+
**Docker (please complete the following information):**
33+
34+
- Docker / Docker-compose Version: (e.g. Docker version 18.03.0-ce, build 0520e24)
35+
- Image (e.g. 7.0-apache)
36+
37+
**Desktop (please complete the following information):**
38+
39+
- OS: (e.g. iOS)
40+
- Browser (e.g. chrome, safari)
41+
- Version (e.g. 22)
42+
43+
**Smartphone (please complete the following information):**
44+
45+
- Device: (e.g. iPhone6)
46+
- OS: (e.g. iOS8.1)
47+
- Browser (e.g. stock browser, safari)
48+
- Version (e.g. 22)
49+
50+
**Additional context**
51+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: madmath03
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when (...)
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!--
2+
3+
Some key notes before you open a PR:
4+
5+
1. Select which branch should this PR be merged in? By default, you should always merge to the develop branch.
6+
2. PR name follows [convention](http://karma-runner.github.io/4.0/dev/git-commit-msg.html)
7+
3. All tests pass locally, UI and Unit tests
8+
4. All business logic and validations must be on the server-side
9+
5. Update necessary Documentation
10+
6. Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes
11+
12+
13+
Also, if you're new here
14+
15+
- Contribution Guide => https://github.com/Monogramm/autodiscover-email-settings/blob/master/CONTRIBUTING.md
16+
17+
-->
18+
19+
> Please provide enough information so that others can review your pull request:
20+
21+
<!-- You can skip this if you're fixing a typo or updating existing documentation -->
22+
23+
> Explain the **details** for making this change. What existing problem does the pull request solve?
24+
25+
<!-- Example: When "Adding a function to do X", explain why it is necessary to have a way to do X. -->
26+
27+
> Screenshots/GIFs
28+
29+
<!-- Add images/recordings to better visualize the change: expected/current behviour -->

.github/config.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome
2+
3+
# Comment to be posted to on first time issues
4+
newIssueWelcomeComment: >
5+
Thanks for opening your first issue here! Be sure to follow the issue template!
6+
7+
# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome
8+
9+
# Comment to be posted to on PRs from first time contributors in your repository
10+
newPRWelcomeComment: >
11+
Thanks for opening this pull request! Please check out our contributing guidelines.
12+
13+
# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge
14+
15+
# Comment to be posted to on pull requests merged by a first time user
16+
firstPRMergeComment: >
17+
:tada: Congrats on merging your first pull request! We here at behaviorbot are proud of you!
18+
19+
# It is recommend to include as many gifs and emojis as possible
20+
21+
# Configuration for request-info - https://github.com/behaviorbot/request-info
22+
23+
# *Required* Comment to reply with
24+
requestInfoReplyComment: >
25+
We would appreciate it if you could provide us with more info about this issue/pr!
26+
27+
# *OPTIONAL* default titles to check against for lack of descriptiveness
28+
# MUST BE ALL LOWERCASE
29+
requestInfoDefaultTitles:
30+
- update readme.md
31+
- updates
32+
33+
34+
# *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given
35+
requestInfoLabelToAdd: needs-more-info

.github/stale.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Configuration for probot-stale - https://github.com/probot/stale
2+
3+
# Number of days of inactivity before an issue becomes stale
4+
daysUntilStale: 60
5+
# Number of days of inactivity before a stale issue is closed
6+
daysUntilClose: 30
7+
8+
# Issues with these labels will never be considered stale
9+
exemptLabels:
10+
- pinned
11+
- security
12+
13+
# Label to use when marking an issue as stale
14+
staleLabel: wontfix
15+
16+
# Comment to post when marking an issue as stale. Set to `false` to disable
17+
markComment: >
18+
This issue has been automatically marked as stale because it has not had
19+
recent activity. It will be closed if no further activity occurs. Thank you
20+
for your contributions.
21+
22+
# Comment to post when closing a stale issue. Set to `false` to disable
23+
closeComment: false

.travis.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,31 @@
1+
os: linux
12
dist: trusty
2-
sudo: required
33

44
services: docker
55

6-
language: bash
6+
language: shell
77

88
branches:
99
only:
1010
- master
1111

12-
before_script:
12+
before_install:
1313
- env | sort
14-
- dir="."
14+
- export home=$(pwd)
15+
- export travis_dir="${home}"
1516

16-
script:
17-
- cd "$dir"
17+
install:
18+
- echo "Changing to travis test directory ($travis_dir)"
19+
- cd "$travis_dir"
1820
# Test container build
1921
- travis_retry docker-compose build
22+
23+
before_script:
2024
- docker images
25+
26+
script:
27+
- echo "Changing to travis test directory ($travis_dir)"
28+
- cd "$travis_dir"
2129
# Test container run
2230
- travis_retry docker-compose up -d && sleep 20
2331
- docker-compose ps

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
This service is created to autodiscover your provider email settings.
1010

11-
It provides IMAP/SMTP/LDAP Autodiscover capabilities on Microsoft Outlook/Apple Mail, Autoconfig capabilities for Thunderbird, and Configuration Profiles for iOS/Apple Mail.
11+
It provides IMAP/POP/SMTP/LDAP Autodiscover capabilities on Microsoft Outlook/Apple Mail, Autoconfig capabilities for Thunderbird, and Configuration Profiles for iOS/Apple Mail.
1212

1313
**A simple support page is also available at the root of the autodiscover domain.**
1414

@@ -21,6 +21,7 @@ It provides IMAP/SMTP/LDAP Autodiscover capabilities on Microsoft Outlook/Apple
2121
@ IN MX 10 {{$MX_DOMAIN}}.
2222
@ IN TXT "mailconf=https://autoconfig.{{$DOMAIN}}/mail/config-v1.1.xml"
2323
_imaps._tcp IN SRV 0 0 {{IMAP_PORT}} {{MX_DOMAIN}}.
24+
_pop3s._tcp IN SRV 0 0 {{POP_PORT}} {{MX_DOMAIN}}.
2425
_submission._tcp IN SRV 0 0 {{SMTP_PORT}} {{MX_DOMAIN}}.
2526
_autodiscover._tcp IN SRV 0 0 443 autodiscover.{{$DOMAIN}}.
2627
_ldap._tcp IN SRV 0 0 {{LDAP_PORT}} {{LDAP_HOST}}.
@@ -33,6 +34,7 @@ Replace above variables with data according to this table
3334
| DOMAIN | Your apex/bare/naked Domain |
3435
| AUTODISCOVER_IP | IP of the Autoconfig HTTP |
3536
| IMAP_PORT | Port for your IMAP server |
37+
| POP_PORT | Port for your POP server |
3638
| SMTP_PORT | Port for your SMTP server |
3739
| LDAP_HOST | The hostname of your LDAP server |
3840
| LDAP_PORT | Port for your LDAP server |
@@ -57,19 +59,27 @@ services:
5759
- COMPANY_NAME=Company
5860
- SUPPORT_URL=https://autodiscover.example.com
5961
- DOMAIN=example.com
62+
# IMAP configuration (host mandatory to enable)
6063
- IMAP_HOST=imap.example.com
6164
- IMAP_PORT=993
6265
- IMAP_SOCKET=SSL
66+
# POP configuration (host mandatory to enable)
67+
- POP_HOST=pop3.example.com
68+
- POP_PORT=995
69+
- POP_SOCKET=SSL
70+
# SMTP configuration (host mandatory to enable)
6371
- SMTP_HOST=smtp.example.com
6472
- SMTP_PORT=587
6573
- SMTP_SOCKET=STARTTLS
74+
# LDAP configuration (host mandatory to enable)
6675
- LDAP_HOST=ldap.example.com
6776
- LDAP_PORT=636
6877
- LDAP_SOCKET=SSL
6978
- LDAP_BASE=dc=ldap,dc=example,dc=com
7079
- LDAP_USER_FIELD=uid
7180
- LDAP_USER_BASE=ou=People,dc=ldap,dc=example,dc=com
7281
- LDAP_SEARCH=(|(objectClass=PostfixBookMailAccount))
82+
# Apple mobile config identifiers (identifier mandatory to enable)
7383
- PROFILE_IDENTIFIER=com.example.autodiscover
7484
- PROFILE_UUID=92943D26-CAB3-4086-897D-DC6C0D8B1E86
7585
- MAIL_UUID=7A981A9E-D5D0-4EF8-87FE-39FD6A506FAC
@@ -92,19 +102,27 @@ services:
92102
- COMPANY_NAME=Company
93103
- SUPPORT_URL=https://autodiscover.example.com
94104
- DOMAIN=example.com
105+
# IMAP configuration (host mandatory to enable)
95106
- IMAP_HOST=imap.example.com
96107
- IMAP_PORT=993
97108
- IMAP_SOCKET=SSL
109+
# POP configuration (host mandatory to enable)
110+
- POP_HOST=pop3.example.com
111+
- POP_PORT=995
112+
- POP_SOCKET=SSL
113+
# SMTP configuration (host mandatory to enable)
98114
- SMTP_HOST=smtp.example.com
99115
- SMTP_PORT=587
100116
- SMTP_SOCKET=STARTTLS
117+
# LDAP configuration (host mandatory to enable)
101118
- LDAP_HOST=ldap.example.com
102119
- LDAP_PORT=636
103120
- LDAP_SOCKET=SSL
104121
- LDAP_BASE=dc=ldap,dc=example,dc=com
105122
- LDAP_USER_FIELD=uid
106123
- LDAP_USER_BASE=ou=People,dc=ldap,dc=example,dc=com
107124
- LDAP_SEARCH=(|(objectClass=PostfixBookMailAccount))
125+
# Apple mobile config identifiers (identifier mandatory to enable)
108126
- PROFILE_IDENTIFIER=com.example.autodiscover
109127
- PROFILE_UUID=92943D26-CAB3-4086-897D-DC6C0D8B1E86
110128
- MAIL_UUID=7A981A9E-D5D0-4EF8-87FE-39FD6A506FAC

index.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ function *autodiscover() {
5151
}
5252

5353
const imapenc = settings.imap.socket === "STARTTLS" ? "TLS" : settings.imap.socket;
54+
const popenc = settings.pop.socket === "STARTTLS" ? "TLS" : settings.pop.socket;
5455
const smtpenc = settings.smtp.socket === "STARTTLS" ? "TLS" : settings.smtp.socket;
5556

5657
yield this.render("autodiscover", {
@@ -59,6 +60,7 @@ function *autodiscover() {
5960
username,
6061
domain,
6162
imapenc,
63+
popenc,
6264
smtpenc
6365
});
6466
}
@@ -99,8 +101,9 @@ router.get("/email.mobileconfig", function *autoconfig() {
99101

100102
const filename = `${domain}.mobileconfig`;
101103

102-
const inssl = settings.imap.socket === "SSL" || settings.imap.socket === "STARTTLS" ? "true" : "false";
103-
const outssl = settings.smtp.socket === "SSL" || settings.smtp.socket === "STARTTLS" ? "true" : "false";
104+
const imapssl = settings.imap.socket === "SSL" || settings.imap.socket === "STARTTLS" ? "true" : "false";
105+
const popssl = settings.pop.socket === "SSL" || settings.pop.socket === "STARTTLS" ? "true" : "false";
106+
const smtpssl = settings.smtp.socket === "SSL" || settings.smtp.socket === "STARTTLS" ? "true" : "false";
104107
const ldapssl = settings.ldap.socket === "SSL" || settings.ldap.port === "636" ? "true" : "false";
105108

106109
this.set("Content-Type", "application/x-apple-aspen-config; charset=utf-8");
@@ -110,8 +113,9 @@ router.get("/email.mobileconfig", function *autoconfig() {
110113
email,
111114
username,
112115
domain,
113-
inssl,
114-
outssl,
116+
imapssl,
117+
popssl,
118+
smtpssl,
115119
ldapssl
116120
});
117121
});

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "autodiscover-email-settings",
3-
"version": "1.3.0",
3+
"version": "1.4.0",
44
"description": "Provides IMAP/SMTP/LDAP Autodiscover capabilities on Microsoft Outlook/Apple Mail, Autoconfig capabilities for Thunderbird, and Configuration Profiles for iOS/Apple Mail.",
55
"main": "index.js",
66
"scripts": {
@@ -37,6 +37,7 @@
3737
"koa-buddy": "^0.1.0",
3838
"koa-router": "^5.1.2",
3939
"koa-swig": "^2.0.0",
40-
"minimist": "^1.2.5"
40+
"minimist": "^1.2.5",
41+
"qs": "^6.9.3"
4142
}
4243
}

settings.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ module.exports = {
99
port: process.env.IMAP_PORT,
1010
socket: process.env.IMAP_SOCKET
1111
},
12+
pop: {
13+
host: process.env.POP_HOST,
14+
port: process.env.POP_PORT,
15+
socket: process.env.POP_SOCKET
16+
},
1217
smtp: {
1318
host: process.env.SMTP_HOST,
1419
port: process.env.SMTP_PORT,

0 commit comments

Comments
 (0)