Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract db access from Postfix and Dovecot #612

Merged
merged 40 commits into from Oct 10, 2018
Merged

Conversation

kaiyou
Copy link
Member

@kaiyou kaiyou commented Sep 27, 2018

This is a work in progress but I guess the review can start already as 90% of it is testable.

Most of the original work is discussed in #420 and #445. The general idea is that

  • Podop (https://github.com/mailu/podop) is a proxy framework between Postfix/Dovecot and any Python available service, including notably a REST API
  • A fairly simple (and still a bit too tightly dependent on Postfix/Dovecot structures) API was written as part of the internal REST API already leveraged for authentication, the API includes transparent authentication for Dovecot, domain, alias, mailbox and transport resolution for Postfix, quotas, sieve scripts.
  • A simple sieve script as a Jinja template was written, removing the need for extdata in sieve.
  • Dovecot and Postfix were bound to the admin container API using Podop, embedded as a side process in both start scripts.
  • Fetchmail was bound to a simple internal API on the admin container.

No change should be required in a standard compose environment. There are still a lot of tests to run before declaring this equivalent to the current database queries.

kaiyou added 30 commits July 3, 2018 20:13
@muhlemmer
Copy link
Member

@kaiyou Did you see the conflict?

@muhlemmer muhlemmer self-assigned this Oct 7, 2018
@kaiyou
Copy link
Member Author

kaiyou commented Oct 7, 2018

Yes, the conflict can be resolved at merge time and is pretty straightforward :)

HorayNarea
HorayNarea previously approved these changes Oct 7, 2018
muhlemmer
muhlemmer previously approved these changes Oct 8, 2018
Copy link
Member

@muhlemmer muhlemmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All seems good 🥇

@muhlemmer
Copy link
Member

@kaiyou, I looked to resolving the merge conflict myself, but I'm not comfortable doing it. Especially for the core/postfix/conf/master.cf I have my doubts.

@kaiyou
Copy link
Member Author

kaiyou commented Oct 8, 2018

I'll resolve it tomorrow then :)
Thank you so much for reviewing

@kaiyou kaiyou dismissed stale reviews from muhlemmer and HorayNarea via 00b5ae1 October 10, 2018 06:41
@kaiyou
Copy link
Member Author

kaiyou commented Oct 10, 2018

Merged, if you could have a quick look and see everything still runs fine, especially the tenacity part :)

@@ -1,7 +1,7 @@
FROM alpine:3.8

RUN apk add --no-cache postfix postfix-pcre rsyslog \
python3 py3-pip \
&& python3 py3-pip \
&& pip3 install --upgrade pip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need another backslash at the end of this line.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

God do I need more coffee.

@muhlemmer
Copy link
Member

muhlemmer commented Oct 10, 2018

We might put an expresso machine on the "Donation list":
ERROR: Service 'smtp' failed to build: The command '/bin/sh -c apk add --no-cache postfix postfix-pcre rsyslog && python3 py3-pip && pip3 install --upgrade pip && pip3 install jinja2 podop tenacity' returned a non-zero code: 127

Edit
Sorry, pushed send too soon.

See:
https://travis-ci.org/Mailu/Mailu/builds/439511658#L1023

I think you are trying to install python3, not running it? So the first && should be \ as well.

@@ -2,7 +2,7 @@ FROM alpine:3.8

RUN apk add --no-cache postfix postfix-pcre rsyslog \
&& python3 py3-pip \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omit && beginning of line

@@ -2,7 +2,7 @@ FROM alpine:3.8

RUN apk add --no-cache postfix postfix-pcre rsyslog \
&& python3 py3-pip \
&& pip3 install --upgrade pip \
pip3 install --upgrade pip \
Copy link
Member

@muhlemmer muhlemmer Oct 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kaiyou Wrong line, the build fails on line 3 /4. apk add needs to install python3 and py3-pip. With the && in front, you just try to run python3 which is not installed.

@muhlemmer
Copy link
Member

All back to normal again :p. It works fine now.

Copy link
Member

@HorayNarea HorayNarea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have a merge \o/

@mergify mergify bot merged commit 4641ae6 into master Oct 10, 2018
@muhlemmer
Copy link
Member

🎉 🎈 🎂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants