Compare commits

...

13 commits

Author SHA1 Message Date
David Prevot e4d6612d58 Update changelog for 1.0.8-1 release
All checks were successful
gitea/evoadmin-mail/pipeline/head This commit looks good
gitea/evoadmin-mail/pipeline/tag This commit looks good
2023-07-26 16:12:32 +02:00
David Prevot c82fab0519 Update upstream source from tag 'upstream/1.0.8'
Update to upstream version '1.0.8'
with Debian dir 833519e853
2023-07-26 16:10:26 +02:00
David Prevot 281a655fef New upstream version 1.0.8
All checks were successful
gitea/evoadmin-mail/pipeline/head This commit looks good
gitea/evoadmin-mail/pipeline/tag This commit looks good
2023-07-26 16:10:26 +02:00
David Prevot 362b44c8b6 Drop changelog entry added to the previous version 2023-07-26 15:54:09 +02:00
David Prevot cf873c35eb Fix USERDIR to delete
All checks were successful
gitea/evoadmin-mail/pipeline/head This commit looks good
gitea/evoadmin-mail/pipeline/tag This commit looks good
Not sure why we didn’t use directly the homeDirectory ldap entry, but
just trying to minimize the patch by trying to figure out the path from
the uid and domain…
2023-07-26 15:16:47 +02:00
David Prevot c7a83045fc [WIP] sudo script doesn’t work yet
All checks were successful
gitea/evoadmin-mail/pipeline/head This commit looks good
2023-07-24 17:58:25 +02:00
David Prevot 145b406c48 tfix 2023-07-24 17:57:20 +02:00
David Prevot bc29eadd15 CI: Push *.buildinfo too
All checks were successful
gitea/evoadmin-mail/pipeline/head This commit looks good
2022-12-22 11:38:11 +01:00
David Prevot 7dfc671fc2 CI: Don’t use Drone CI anymore
All checks were successful
gitea/evoadmin-mail/pipeline/head This commit looks good
2022-12-12 17:28:01 +01:00
David Prevot b8578ebb27 CI: Upload to pub2
All checks were successful
continuous-integration/drone/push Build is passing
gitea/evoadmin-mail/pipeline/head This commit looks good
2022-12-12 17:09:24 +01:00
David Prevot 66c12fa61f docs: tfix
All checks were successful
continuous-integration/drone/push Build is passing
gitea/evoadmin-mail/pipeline/head This commit looks good
2022-10-10 11:19:10 +02:00
David Prevot 1a90dff7f1 CI: Drop .git directory that was not present during first build
All checks were successful
continuous-integration/drone/push Build is passing
gitea.evolix.org on plain agent00/evoadmin-mail/pipeline/head This commit looks good
gitea/evoadmin-mail/pipeline/head This commit looks good
2022-07-11 14:41:06 +02:00
David Prevot a75593f852 CI: Clean up before build
All checks were successful
continuous-integration/drone/push Build is passing
gitea.evolix.org on plain agent00/evoadmin-mail/pipeline/head This commit looks good
2022-06-30 11:49:29 +02:00
8 changed files with 36 additions and 70 deletions

View file

@ -1,24 +1,15 @@
pipeline {
agent { label 'docker' }
agent { label 'sbuild' }
stages {
stage('Build Debian package') {
agent {
docker {
image 'evolix/gbp:bullseye'
args '-u root --privileged'
}
}
when {
branch 'debian'
}
steps {
script {
sh 'mk-build-deps --install --remove debian/control'
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'
sh 'gbp buildpackage'
}
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 {
script {
sh 'echo Dummy line to remove once something actually happens.'
/* No crendentials yet.
sh 'rsync -avP evoadmin-mail* droneci@pub.evolix.net:/home/droneci/evoadmin-mail/'
*/
sh 'rsync -avP build-area/evoadmin-mail*.deb build-area/evoadmin-mail*.buildinfo build-area/evoadmin-mail*.changes pub.evolix.org:/srv/upload/'
}
}
}

View file

@ -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

View file

@ -9,20 +9,20 @@ Evoadmin-mail requirements are an LDAP server, a web server and
PHP. See [INSTALL](docs/install.md) for instructions.
Multiples services can be configured to use the LDAP directory
managed by Evoadmin-mail :
managed by Evoadmin-mail:
- TODO
## Test
You can deploy a test environment with Vagrant :
You can deploy a test environment with Vagrant:
~~~
vagrant up
~~~
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
@ -34,7 +34,7 @@ https://evoadminmail.packmail.example.com:8443
### Authentication
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
@ -45,7 +45,7 @@ ldapvi --ldapsearch "(uid=evoadmin)" | grep userPassword | awk '{ print $2 }'
### Deployment
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

16
debian/changelog vendored
View file

@ -1,7 +1,17 @@
evoadmin-mail (1.0.7-1) unstable; urgency=medium
evoadmin-mail (1.0.8-1) unstable; urgency=medium
[ Will ]
* Rename default admin from "evoadmin" to "evolix".
[ David Prevot ]
* CI: Clean up before build
* Dont impose local build
* CI: Dont use Drone CI anymore
* Fix USERDIR to delete
[ William Hirigoyen ]
* Rename default admin from evoadmin to evolix.
-- David Prévot <dprevot@evolix.fr> Wed, 26 Jul 2023 16:11:09 +0200
evoadmin-mail (1.0.7-1) unstable; urgency=medium
[ Victor LABORIE ]
* Don't force Vagrant::DEFAULT_SERVER_URL (doesn't work with recent Vagrant version)

View file

@ -1,8 +1,8 @@
# 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"
@ -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.
; This INI file is loaded by evoadmin-mail and contains the
; following configurations :
; following configurations:
;
; * Global settings
; * LDAP settings
@ -257,4 +257,4 @@ admin_pass = "{{ ldap_admin_password }}"
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!

View file

@ -1,7 +1,7 @@
<?php
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() {
$file = getenv("EVOADMINMAIL_CONFIG_FILE") or $file = '../config/config.ini';
$ini = parse_ini_file($file, true);
@ -10,6 +10,7 @@ class Config {
self::$log_level = $ini['global']['log_level'];
self::$ldap = $ini['ldap'];
self::$quota_path = $ini['quota']['path'];
self::$evoexec = $ini['evoexec'];
}
public static function getName() {

View file

@ -139,7 +139,7 @@ class FormController {
PageController::$alerts[] = array('type' => 1, 'message' => 'Suppression du domaine '.self::$form['cn'].' ...');
try {
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) {
PageController::$alerts[] = array('type' => 2, 'message' => $e_ad->getMessage());
}
@ -149,8 +149,8 @@ class FormController {
private static function delAccount() {
PageController::$alerts[] = array('type' => 1, 'message' => 'Suppression du compte '.self::$form['uid'].'...');
try {
self::$domain->delAccount(self::$form['uid'],self::$form['cn']);
PageController::$alerts[] = array('type' => 0, 'message' => "Suppression effectué.");
self::$domain->delAccount(self::$form['uid'],self::$form['domain']);
PageController::$alerts[] = array('type' => 0, 'message' => "Suppression effectuée."));
} catch (Exception $e) {
PageController::$alerts[] = array('type' => 2, 'message' => $e->getMessage());
}

View file

@ -39,11 +39,12 @@ if [ "$PASSWORD" != "$READPASS" ]; then
fi
# mv pseudo-homeDir to directory.<date> for deleted users
USERDIR=${USERIS%%@$DOMAINIS}
if [ "$DEL" == "on" ]; then
if [[ -n $USERIS && -n $DOMAINIS && -e "/home/vmail/$DOMAINIS" && -e "/home/vmail/$DOMAINIS/$USERIS" ]]; then
mv /home/vmail/$DOMAINIS/$USERIS /home/vmail/$DOMAINIS/$USERIS.$DATE
chown -R root:root /home/vmail/$DOMAINIS/$USERIS.$DATE
chmod -R 700 /home/vmail/$DOMAINIS/$USERIS.$DATE
if [[ -n $USERIS && -n $DOMAINIS && -n $USERDIR && -e "/home/vmail/$DOMAINIS" && -e "/home/vmail/$DOMAINIS/$USERDIR" ]]; then
mv /home/vmail/$DOMAINIS/$USERDIR /home/vmail/$DOMAINIS/$USERDIR.$DATE
chown -R root:root /home/vmail/$DOMAINIS/$USERDIR.$DATE
chmod -R 700 /home/vmail/$DOMAINIS/$USERDIR.$DATE
fi
exit 0
fi