mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
* Documentation update
* see #38 : reverted work from [49b589f08988] * Style update for permissions
This commit is contained in:
@@ -117,6 +117,8 @@ existing database.**
|
||||
|
||||
#. Update SQL queries used in your environnement (see :ref:`postfix-label` or :ref:`dovecot-label`).
|
||||
|
||||
#. Update *postfix* configuration so that he can handle domain aliases (see :ref:`postfix-label`).
|
||||
|
||||
|
||||
0.8.2: ckeditor integration and more
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@@ -214,6 +216,14 @@ First, define the following map files on your server (it should work with
|
||||
hosts = 127.0.0.1
|
||||
query = SELECT name FROM admin_domain WHERE name='%s' AND enabled='1'
|
||||
|
||||
``/etc/postfix/sql-domain-aliases.cf``::
|
||||
|
||||
user = <user>
|
||||
password = <password>
|
||||
dbname = <database>
|
||||
hosts = 127.0.0.1
|
||||
query = SELECT t2.name FROM admin_domainalias AS t1, admin_domain AS t2 WHERE t1.target_id=t2.id AND t1.enabled=1 AND t2.enabled=1 AND t1.name='%s'
|
||||
|
||||
``/etc/postfix/sql-mailboxes.cf``::
|
||||
|
||||
user = <user>
|
||||
@@ -230,6 +240,14 @@ First, define the following map files on your server (it should work with
|
||||
hosts = 127.0.0.1
|
||||
query = SELECT concat(t3.address, '@', t4.name) FROM admin_alias AS t1, admin_alias_mboxes AS t2, admin_mailbox AS t3, admin_domain AS t4 WHERE t1.enabled='1' AND t1.address='%u' AND t1.id=t2.alias_id AND t2.mailbox_id=t3.id AND t3.domain_id=t4.id AND t4.name='%d'
|
||||
|
||||
``/etc/postfix/sql-domain-aliases-mailboxes.cf``::
|
||||
|
||||
user = <user>
|
||||
password = <password>
|
||||
dbname = <database>
|
||||
hosts = 127.0.0.1
|
||||
query = SELECT concat(t2.address, '@', t3.name) FROM admin_domainaliases AS t1, admin_mailbox AS t2, admin_domain AS t3 WHERE t1.target_id=t2.domain_id AND t2.domain_id=t3.id AND t2.enabled=1 AND t1.name='%d' AND t2.address='%u'
|
||||
|
||||
Then, use the following configuration in the */etc/postfix/main.cf* file
|
||||
(this is just one possible configuration)::
|
||||
|
||||
@@ -244,7 +262,9 @@ Then, use the following configuration in the */etc/postfix/main.cf* file
|
||||
|
||||
relay_domains =
|
||||
virtual_mailbox_domains = mysql:/etc/postfix/sql-domains.cf
|
||||
virtual_alias_domains = mysql:/etc/postfix/sql-domain-aliases.cf
|
||||
virtual_mailbox_maps = mysql:/etc/postfix/sql-mailboxes.cf
|
||||
mysql:/etc/postfix/sql-domain-aliases-mailboxes.cf
|
||||
virtual_alias_maps = mysql:/etc/postfix/sql-aliases.cf
|
||||
# Stuff after
|
||||
|
||||
|
||||
@@ -179,60 +179,7 @@ textarea:hover {
|
||||
}
|
||||
|
||||
#mailheader {
|
||||
width: 70%;
|
||||
padding-bottom: 5px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#attachments {
|
||||
width: 29%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#attachments h3 {
|
||||
float: left;
|
||||
font-size: 1em;
|
||||
margin: 0;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#attachments img {
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
#attachments a:link, a:visited {
|
||||
background: transparent;
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#finput_container {
|
||||
display: block;
|
||||
width: 100px;
|
||||
height: 20px;
|
||||
overflow: hidden
|
||||
}
|
||||
|
||||
#upload_input {
|
||||
font-size: 50px;
|
||||
width: 120px;
|
||||
opacity: 0;
|
||||
filter: alpha(opacity: 0);
|
||||
position: relative;
|
||||
top: -40px;
|
||||
left: -20px;
|
||||
}
|
||||
|
||||
#attachments ul {
|
||||
list-style: none;
|
||||
padding: 5px 5px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#attachments li {
|
||||
margin-bottom: 4px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
/* Progress bar */
|
||||
|
||||
@@ -4,16 +4,6 @@
|
||||
<div id="mailheader">
|
||||
{% include "common/genericform.html" %}
|
||||
</div>
|
||||
<div id="attachments">
|
||||
<h3><img src="{{ MEDIA_URL }}pics/attachment.png" /> {% trans "Attachments" %}</h3>
|
||||
<div id="finput_container">
|
||||
<a href="javascript: void(0)"><img src="{{ MEDIA_URL }}pics/add.png" />
|
||||
{% trans "Add" %}</a>
|
||||
<input type="file" id="upload_input" name="upload" />
|
||||
</div>
|
||||
<ul id="files2upload">
|
||||
</ul>
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
{% if body %}
|
||||
<textarea id="id_body" name="id_body" class="editor">{% if bodyheader %}{{ bodyheader }}{% endif %}
|
||||
|
||||
@@ -130,28 +130,6 @@
|
||||
}
|
||||
$("composemail").send();
|
||||
});
|
||||
|
||||
var files2upload = new Array();
|
||||
|
||||
delete_attachment = function(evt) {
|
||||
var litag = evt.target.getParents("li");
|
||||
var attachment = litag.get("text");
|
||||
|
||||
files2upload.erase(attachment);
|
||||
litag.destroy();
|
||||
};
|
||||
|
||||
$("upload_input").addEvent("change", function(evt) {
|
||||
var atag = new Element("a").set("name", "delete_attachment");
|
||||
var imgtag = new Element("img").set("src", "{{ MEDIA_URL }}pics/remove.png");
|
||||
var litag = new Element("li").set("text", evt.target.value);
|
||||
|
||||
files2upload.include(evt.target.value);
|
||||
imgtag.inject(atag);
|
||||
atag.inject(litag);
|
||||
litag.inject($("files2upload"));
|
||||
atag.addEvent("click", delete_attachment);
|
||||
});
|
||||
};
|
||||
|
||||
loadCompose = function(event) {
|
||||
|
||||
@@ -55,11 +55,11 @@ def __render_common_components(request, folder, lst=None, content=None, menu=Non
|
||||
if page:
|
||||
navbar = EmailListing.render_navbar(page)
|
||||
if lst:
|
||||
listing = lst.fetch(request, page.id_start, page.id_stop)
|
||||
content = lst.fetch(request, page.id_start, page.id_stop)
|
||||
else:
|
||||
navbar = ""
|
||||
if lst:
|
||||
listing = "<div class='info'>%s</div>" \
|
||||
content = "<div class='info'>%s</div>" \
|
||||
% _("This folder contains no messages")
|
||||
|
||||
ret = {
|
||||
@@ -68,7 +68,7 @@ def __render_common_components(request, folder, lst=None, content=None, menu=Non
|
||||
"folders" : mbc.getfolders(request.user)
|
||||
}),
|
||||
"menu" : menu,
|
||||
"listing" : listing,
|
||||
"listing" : content,
|
||||
"navbar" : navbar,
|
||||
"quota" : ImapListing.computequota(mbc)
|
||||
}
|
||||
@@ -149,7 +149,7 @@ def viewmail(request, folder, mail_id=None):
|
||||
mbc = IMAPconnector(user=request.user.username,
|
||||
password=request.session["password"])
|
||||
ctx = getctx("ok", **__render_common_components(request, folder,
|
||||
menu=menu, listing=content))
|
||||
menu=menu, content=content))
|
||||
return HttpResponse(simplejson.dumps(ctx), mimetype="application/json")
|
||||
|
||||
@login_required
|
||||
@@ -276,7 +276,7 @@ def render_compose(request, form, posturl, email=None, insert_signature=False):
|
||||
password=request.session["password"])
|
||||
ctx = getctx("ok", level=2, editor=editor,
|
||||
**__render_common_components(request, request.session["folder"],
|
||||
menu=menu, listing=content))
|
||||
menu=menu, content=content))
|
||||
return HttpResponse(simplejson.dumps(ctx), mimetype="application/json")
|
||||
|
||||
def __html2plaintext(content):
|
||||
|
||||
@@ -130,6 +130,7 @@ div#footer {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
|
||||
.uibar {
|
||||
background: #153F65;
|
||||
padding: 0;
|
||||
@@ -444,3 +445,12 @@ div.row label {
|
||||
width: 90px;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
/* Permission tables */
|
||||
#accordion {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.element {
|
||||
margin: 10px 5px 10px 5px;
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 912 B |
@@ -1,7 +1,7 @@
|
||||
{% load i18n %}
|
||||
{% load admin_extras %}
|
||||
{% if gparams %}
|
||||
<p><input type="submit" name="update" value="{% trans 'Save' %}" /></p>
|
||||
<p><input style="margin: 5px" type="submit" name="update" value="{% trans 'Save' %}" /></p>
|
||||
<div id="accordion">
|
||||
{% for app in gparams %}
|
||||
<h3 class="toggler atStart">{{ app.name }}</h3>
|
||||
|
||||
Reference in New Issue
Block a user