Compare commits
5 Commits
16.0
...
15.0_mailc
| Author | SHA1 | Date | |
|---|---|---|---|
| f278437df6 | |||
| 4504989145 | |||
| 85942b0339 | |||
| f0d7c56315 | |||
| d57844af24 |
65
README.md
65
README.md
@@ -6,6 +6,32 @@ chmod +x install_mailhog_as_service.sh
|
||||
./install_mailhog_as_service.sh
|
||||
```
|
||||
|
||||
## Workaround bij foutmelding in Ubuntu 22.04: "note: module requires Go 1.20"
|
||||
```
|
||||
- Download gewenste versie van Go:
|
||||
wget -c https://go.dev/dl/go1.22.0.linux-amd64.tar.gz
|
||||
|
||||
- Ga naar de map waar het bestand staat en pak het uit:
|
||||
sudo tar -C /usr/local/ -xzf go1.22.0.linux-amd64.tar.gz
|
||||
|
||||
- Set PATH Environment Variable
|
||||
export PATH=$PATH:/usr/local/go/bin
|
||||
|
||||
- Voeg onderstaande code toe aan .profile om het definitief te maken:
|
||||
# set PATH so it includes /usr/local/go/bin if it exists
|
||||
if [ -d "/usr/local/go/bin" ] ; then
|
||||
PATH="/usr/local/go/bin:$PATH"
|
||||
fi
|
||||
|
||||
- reload .profile (let op: mét punt!)
|
||||
. ~/.profile
|
||||
|
||||
- Controleer welke versie van Go actief is:
|
||||
go version
|
||||
|
||||
- Installeer nu Mailhog met het installatie script
|
||||
```
|
||||
|
||||
## Na de installatie
|
||||
```
|
||||
systemctl enable mailhog
|
||||
@@ -61,18 +87,35 @@ server {
|
||||
|
||||
In de nginx config file een wachtwoord opnemen:
|
||||
```
|
||||
auth_basic "Administrator Area";
|
||||
auth_basic_user_file /etc/nginx/.htpasswd;
|
||||
|
||||
apt-get install apache2-utils
|
||||
apt update
|
||||
apt install apache2-utils
|
||||
ls /etc/apache2
|
||||
cd /etc
|
||||
ls
|
||||
htpasswd -c /etc/nginx/.htpasswd admin
|
||||
|
||||
|
||||
========================================================
|
||||
Voorbeeld:
|
||||
In de nginx config file voor omgeving 499 een wachtwoord instellen:
|
||||
========================================================
|
||||
|
||||
auth_basic "Administrator Area";
|
||||
auth_basic_user_file /etc/nginx/.htpasswd-499;
|
||||
========================================================
|
||||
|
||||
Voor iedere omgeving is op de 401 een aparte .htpasswd aangemaakt in de map /etc/nginx/
|
||||
Voor alle test-omgevingen in de reeks 402 en 499 is een bestand aangemaakt.
|
||||
Om een nieuw htpasswd te maken (bijvoorbeeld in de 500-reeks) kan het beste een bestaande file gekopieerd worden:
|
||||
cp /etc/nginx/.htpasswd-402 /etc/nginx/.htpasswd-499
|
||||
|
||||
Om al de (verborgen) .htpasswd bestanden opvragen:
|
||||
ls -rtla /etc/nginx | grep .htpasswd
|
||||
|
||||
Een .htpasswd kan bekeken worden met nano, maar je ziet dan alleen de user én het encrypte wachtwoord:
|
||||
nano /etc/nginx/.htpasswd-499
|
||||
|
||||
Om een nieuw wachtwoord in te stellen voor de user 'mail' voor omgeving 499:
|
||||
htpasswd /etc/nginx/.htpasswd-499 mail
|
||||
|
||||
=================================================
|
||||
Om de wijzigingen toe te passen moet nginx herstart worden:
|
||||
service nginx restart
|
||||
nano /etc/nginx/.htpasswd
|
||||
=================================================
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,9 @@ class IrActionUrl(models.Model):
|
||||
parameter = parameters[0]
|
||||
cont_nr = parameter.value.split("//",1)[1] #Haal https:// van string
|
||||
cont_nr = cont_nr[0:3] #De eerste 3 karakters is het containernummer
|
||||
act_url = "https://" + cont_nr + "-mailcatcher.staging.open2bizz.com"
|
||||
node = parameter.value.split("staging",1)[1] #Haal alles van string weg t/m staging
|
||||
node = node[0:1] #Het eerste karakters is het de stagingarea
|
||||
act_url = "https://" + cont_nr + "-mailcatcher.staging" + node + ".open2bizz.com"
|
||||
_logger.info('---------- ACT_URL ---------- %s', act_url)
|
||||
action_id = self.env['ir.model.data']._xmlid_to_res_id('mailcatcher_menu.action_mailcatcher_url')
|
||||
action = self.env['ir.actions.act_url'].browse(action_id)
|
||||
|
||||
@@ -25,6 +25,9 @@ class IrLogging(models.Model):
|
||||
UPDATE ir_config_parameter set value = '%s' where key = 'database.uuid';
|
||||
INSERT INTO ir_mail_server(smtp_host,smtp_port,name,smtp_authentication,smtp_encryption,active) VALUES ('127.0.0.1','1025','Lokale mailcatcher','login','name','t');
|
||||
INSERT INTO ir_mail_server(smtp_host,smtp_port,name,smtp_authentication,smtp_encryption,active) VALUES ('192.168.78.199','1025','Algemene mailcatcher','login','name','t');
|
||||
INSERT INTO ir_mail_server(smtp_host,smtp_port,name,smtp_authentication,smtp_encryption,active) VALUES ('hnode6.openworx.nl','1025','Algemene mailcatcher vanaf hnode4','login','name','t');
|
||||
UPDATE website SET google_analytics_key = NULL WHERE google_analytics_key IS NOT NULL;
|
||||
UPDATE product_template SET is_published = FALSE WHERE is_published = TRUE;
|
||||
""" %(db_id))
|
||||
if self.env['ir.config_parameter'].search([('key','=','web.base.url.freeze')]):
|
||||
self.env.cr.execute("""DELETE FROM ir_config_parameter WHERE key = 'web.base.url.freeze';""")
|
||||
|
||||
Reference in New Issue
Block a user