New upstream version 1.0.8
This commit is contained in:
commit
281a655fef
20
.Jenkinsfile
20
.Jenkinsfile
|
@ -1,24 +1,15 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'docker' }
|
agent { label 'sbuild' }
|
||||||
stages {
|
stages {
|
||||||
stage('Build Debian package') {
|
stage('Build Debian package') {
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
image 'evolix/gbp:bullseye'
|
|
||||||
args '-u root --privileged'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
when {
|
when {
|
||||||
branch 'debian'
|
branch 'debian'
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
sh 'mk-build-deps --install --remove debian/control'
|
sh 'gbp buildpackage'
|
||||||
sh 'rm -rf {source,*.gz,*.bz2,*.xz,*.deb,*.dsc,*.changes,*.buildinfo,lintian.txt}'
|
|
||||||
sh "gbp clone --debian-branch=$GIT_BRANCH $GIT_URL source"
|
|
||||||
sh 'cd source && git checkout $GIT_BRANCH && gbp buildpackage -us -uc'
|
|
||||||
}
|
}
|
||||||
archiveArtifacts allowEmptyArchive: true, artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.changes,*.buildinfo,lintian.txt'
|
archiveArtifacts allowEmptyArchive: true, artifacts: 'build-area/*.gz,build-area/*.bz2,build-area/*.xz,build-area/*.deb,build-area/*.dsc,build-area/*.changes,build-area/*.buildinfo,build-area/*.build,build-area/lintian.txt'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,10 +19,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
sh 'echo Dummy line to remove once something actually happens.'
|
sh 'rsync -avP build-area/evoadmin-mail*.deb build-area/evoadmin-mail*.buildinfo build-area/evoadmin-mail*.changes pub.evolix.org:/srv/upload/'
|
||||||
/* No crendentials yet.
|
|
||||||
sh 'rsync -avP evoadmin-mail* droneci@pub.evolix.net:/home/droneci/evoadmin-mail/'
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
34
.drone.yml
34
.drone.yml
|
@ -1,34 +0,0 @@
|
||||||
kind: pipeline
|
|
||||||
name: default
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: fetch
|
|
||||||
image: alpine/git
|
|
||||||
commands:
|
|
||||||
- git fetch --tags
|
|
||||||
|
|
||||||
- name: build debian package
|
|
||||||
image: evolix/gbp:bullseye
|
|
||||||
branches:
|
|
||||||
- debian
|
|
||||||
commands:
|
|
||||||
- mk-build-deps --install --remove debian/control
|
|
||||||
- gbp buildpackage -us -uc
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- debian
|
|
||||||
|
|
||||||
- name: upload debian package
|
|
||||||
image: drillster/drone-rsync
|
|
||||||
settings:
|
|
||||||
hosts: ["pub.evolix.net"]
|
|
||||||
port: 22
|
|
||||||
user: droneci
|
|
||||||
key:
|
|
||||||
from_secret: drone_private_key
|
|
||||||
target: /home/droneci/evoadmin-mail/
|
|
||||||
source: ../evoadmin-mail*
|
|
||||||
delete: true
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- debian
|
|
10
README.md
10
README.md
|
@ -9,20 +9,20 @@ Evoadmin-mail requirements are an LDAP server, a web server and
|
||||||
PHP. See [INSTALL](docs/install.md) for instructions.
|
PHP. See [INSTALL](docs/install.md) for instructions.
|
||||||
|
|
||||||
Multiples services can be configured to use the LDAP directory
|
Multiples services can be configured to use the LDAP directory
|
||||||
managed by Evoadmin-mail :
|
managed by Evoadmin-mail:
|
||||||
|
|
||||||
- TODO
|
- TODO
|
||||||
|
|
||||||
## Test
|
## Test
|
||||||
|
|
||||||
You can deploy a test environment with Vagrant :
|
You can deploy a test environment with Vagrant:
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
vagrant up
|
vagrant up
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
Evoadmin-mail uses the evoadminmail.packmail.example.com domain
|
Evoadmin-mail uses the evoadminmail.packmail.example.com domain
|
||||||
on localhost, so update your /etc/hosts :
|
on localhost, so update your /etc/hosts:
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
127.0.0.1 evoadminmail.packmail.example.com
|
127.0.0.1 evoadminmail.packmail.example.com
|
||||||
|
@ -34,7 +34,7 @@ https://evoadminmail.packmail.example.com:8443
|
||||||
### Authentication
|
### Authentication
|
||||||
|
|
||||||
The default admin user is "evoadmin", the password is randomly
|
The default admin user is "evoadmin", the password is randomly
|
||||||
generated and can be recovered from LDAP :
|
generated and can be recovered from LDAP:
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
vagrant ssh
|
vagrant ssh
|
||||||
|
@ -45,7 +45,7 @@ ldapvi --ldapsearch "(uid=evoadmin)" | grep userPassword | awk '{ print $2 }'
|
||||||
### Deployment
|
### Deployment
|
||||||
|
|
||||||
Launch rsync-auto in a terminal to automatically synchronise your
|
Launch rsync-auto in a terminal to automatically synchronise your
|
||||||
local code with the Vagrant VM :
|
local code with the Vagrant VM:
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
vagrant rsync-auto
|
vagrant rsync-auto
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# Install
|
# Install
|
||||||
|
|
||||||
Evoadmin-mail need an LDAP server, a Web server and PHP. This documentation explain how to configure OpenLDAP and Apache with mod_php.
|
Evoadmin-mail needs an LDAP server, a Web server and PHP. This documentation explains how to configure OpenLDAP and Apache with mod_php.
|
||||||
|
|
||||||
Following files extract are [Jinja2](http://jinja.pocoo.org) templates, **{{ varname }}** must be replaced by custom value, eg.
|
Following files extract are [Jinja2](http://jinja.pocoo.org) templates, **{{ varname }}** must be replaced by custom value, e.g.
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
ldap_hostname: "mailserver"
|
ldap_hostname: "mailserver"
|
||||||
|
@ -237,7 +237,7 @@ git clone https://forge.evolix.org/evoadmin-mail.git /home/evoadmin-mail/www
|
||||||
;
|
;
|
||||||
; You need to copy and edit config-sample.ini to config.ini.
|
; You need to copy and edit config-sample.ini to config.ini.
|
||||||
; This INI file is loaded by evoadmin-mail and contains the
|
; This INI file is loaded by evoadmin-mail and contains the
|
||||||
; following configurations :
|
; following configurations:
|
||||||
;
|
;
|
||||||
; * Global settings
|
; * Global settings
|
||||||
; * LDAP settings
|
; * LDAP settings
|
||||||
|
@ -257,4 +257,4 @@ admin_pass = "{{ ldap_admin_password }}"
|
||||||
superadmin[] = "evoadmin"
|
superadmin[] = "evoadmin"
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
You can now connect to your Evoadmin-mail with **evoadmin** user and your precedently defined password !
|
You can now connect to your Evoadmin-mail with **evoadmin** user and your previously defined password!
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
class Config {
|
class Config {
|
||||||
private static $name='Evoadmin Mail', $mail='root@localhost', $log_level='error', $ldap=array(), $quota_path='';
|
private static $name='Evoadmin Mail', $mail='root@localhost', $log_level='error', $ldap=array(), $quota_path='', $evoexec=array();
|
||||||
public static function load() {
|
public static function load() {
|
||||||
$file = getenv("EVOADMINMAIL_CONFIG_FILE") or $file = '../config/config.ini';
|
$file = getenv("EVOADMINMAIL_CONFIG_FILE") or $file = '../config/config.ini';
|
||||||
$ini = parse_ini_file($file, true);
|
$ini = parse_ini_file($file, true);
|
||||||
|
@ -10,6 +10,7 @@ class Config {
|
||||||
self::$log_level = $ini['global']['log_level'];
|
self::$log_level = $ini['global']['log_level'];
|
||||||
self::$ldap = $ini['ldap'];
|
self::$ldap = $ini['ldap'];
|
||||||
self::$quota_path = $ini['quota']['path'];
|
self::$quota_path = $ini['quota']['path'];
|
||||||
|
self::$evoexec = $ini['evoexec'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getName() {
|
public static function getName() {
|
||||||
|
|
|
@ -139,7 +139,7 @@ class FormController {
|
||||||
PageController::$alerts[] = array('type' => 1, 'message' => 'Suppression du domaine '.self::$form['cn'].' ...');
|
PageController::$alerts[] = array('type' => 1, 'message' => 'Suppression du domaine '.self::$form['cn'].' ...');
|
||||||
try {
|
try {
|
||||||
self::$server->delDomain(self::$form['cn']);
|
self::$server->delDomain(self::$form['cn']);
|
||||||
PageController::$alerts[] = array('type' => 0, 'message' => 'Suppression effectué.');
|
PageController::$alerts[] = array('type' => 0, 'message' => 'Suppression effectuée.');
|
||||||
} catch (Exception $e_ad) {
|
} catch (Exception $e_ad) {
|
||||||
PageController::$alerts[] = array('type' => 2, 'message' => $e_ad->getMessage());
|
PageController::$alerts[] = array('type' => 2, 'message' => $e_ad->getMessage());
|
||||||
}
|
}
|
||||||
|
@ -149,8 +149,8 @@ class FormController {
|
||||||
private static function delAccount() {
|
private static function delAccount() {
|
||||||
PageController::$alerts[] = array('type' => 1, 'message' => 'Suppression du compte '.self::$form['uid'].'...');
|
PageController::$alerts[] = array('type' => 1, 'message' => 'Suppression du compte '.self::$form['uid'].'...');
|
||||||
try {
|
try {
|
||||||
self::$domain->delAccount(self::$form['uid'],self::$form['cn']);
|
self::$domain->delAccount(self::$form['uid'],self::$form['domain']);
|
||||||
PageController::$alerts[] = array('type' => 0, 'message' => "Suppression effectué.");
|
PageController::$alerts[] = array('type' => 0, 'message' => "Suppression effectuée."));
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
PageController::$alerts[] = array('type' => 2, 'message' => $e->getMessage());
|
PageController::$alerts[] = array('type' => 2, 'message' => $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,11 +39,12 @@ if [ "$PASSWORD" != "$READPASS" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# mv pseudo-homeDir to directory.<date> for deleted users
|
# mv pseudo-homeDir to directory.<date> for deleted users
|
||||||
|
USERDIR=${USERIS%%@$DOMAINIS}
|
||||||
if [ "$DEL" == "on" ]; then
|
if [ "$DEL" == "on" ]; then
|
||||||
if [[ -n $USERIS && -n $DOMAINIS && -e "/home/vmail/$DOMAINIS" && -e "/home/vmail/$DOMAINIS/$USERIS" ]]; then
|
if [[ -n $USERIS && -n $DOMAINIS && -n $USERDIR && -e "/home/vmail/$DOMAINIS" && -e "/home/vmail/$DOMAINIS/$USERDIR" ]]; then
|
||||||
mv /home/vmail/$DOMAINIS/$USERIS /home/vmail/$DOMAINIS/$USERIS.$DATE
|
mv /home/vmail/$DOMAINIS/$USERDIR /home/vmail/$DOMAINIS/$USERDIR.$DATE
|
||||||
chown -R root:root /home/vmail/$DOMAINIS/$USERIS.$DATE
|
chown -R root:root /home/vmail/$DOMAINIS/$USERDIR.$DATE
|
||||||
chmod -R 700 /home/vmail/$DOMAINIS/$USERIS.$DATE
|
chmod -R 700 /home/vmail/$DOMAINIS/$USERDIR.$DATE
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue