All checks were successful
Container Build / build-image (push) Successful in 40s
78 lines
3.3 KiB
Markdown
78 lines
3.3 KiB
Markdown
---
|
||
title: 'Proxmox e Nginx Proxy Manager: installazione e configurazione di un server per offrire servizi web in una scuola – parte 3'
|
||
author: Omar Lazzari
|
||
type: post
|
||
draft: true
|
||
date: 2023-03-01T11:50:39+00:00
|
||
url: /?p=2475
|
||
classic-editor-remember:
|
||
- block-editor
|
||
categories:
|
||
- Documentazione
|
||
- Hardware
|
||
- News
|
||
- Scuola
|
||
- Software
|
||
tags:
|
||
- installazioni
|
||
- proxmox
|
||
- scuola
|
||
|
||
---
|
||
## Gestione dei backup {.wp-block-heading}
|
||
|
||
_Da definire..._
|
||
|
||
## Configurazione di POSTFIX {.wp-block-heading}
|
||
|
||
Per permettere a Proxmox VE di inviare mail di notifica all'admin è necessario configurare il servizio **postfix**.
|
||
|
||
Quando riportato è tratto dai due seguenti thread.
|
||
|
||
[Impostazione di Postfix per l'invio di notifiche][1] e [Impostazione di smtp_halo][2]
|
||
|
||
Modificare il file _/etc/postfix/main.cf_ aggiungendo (controllare che non ci siano righe ripetute):
|
||
|
||
<pre class="wp-block-code"><code>relayhost = [smtp.gmail.com]:587
|
||
smtp_use_tls = yes
|
||
smtp_sasl_auth_enable = yes
|
||
smtp_sasl_security_options = noanonymous
|
||
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
|
||
smtp_helo_name = pve.nomedominio.it
|
||
|
||
#smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
|
||
#mydestination = $myhostname, localhost.$mydomain, localhost</code></pre>
|
||
|
||
Creare il file /etc/postfix/sasl_passwd inserendo:
|
||
|
||
<pre class="wp-block-code"><code>[smtp.gmail.com]:587 mia_mail@gmail.com:PASSWD</code></pre>
|
||
|
||
Nelle sezione <a rel="noreferrer noopener" href="https://myaccount.google.com/security" target="_blank">sicurezza dell'account google</a> ricordarsi di impostare la "Password per le app", necessaria per poter utilizzare dispositivi che non supportano la verifica in due passaggi.
|
||
|
||
Eseguire i comandi:
|
||
|
||
<pre class="wp-block-code"><code>chmod 600 /etc/postfix/sasl_passwd
|
||
postmap /etc/postfix/sasl_passwd</code></pre>
|
||
|
||
installare e riavviare il servizio:
|
||
|
||
<pre class="wp-block-code"><code>apt-get install libsasl2-modules
|
||
systemctl restart postfix.service</code></pre>
|
||
|
||
Inviare una mail di prova:
|
||
|
||
<pre class="wp-block-code"><code>echo "Test mail from postfix" | mail -s "Test Postfix" test@test.com</code></pre>
|
||
|
||
<pre class="wp-block-code"><code>/var/log/mail.log
|
||
/var/log/mail.info
|
||
/var/log/mail.warn</code></pre>
|
||
|
||
<hr class="wp-block-separator has-alpha-channel-opacity" />
|
||
|
||
Non perdere il prossimo articolo in cui parleremo di ...<figure class="wp-block-image size-large">
|
||
|
||
[<img loading="lazy" decoding="async" width="1024" height="576" src="https://bglug.it/wp-content/uploads/2023/02/proxmox-pc-1-1024x576.jpg" alt="" class="wp-image-2454" srcset="https://bglug.it/wp-content/uploads/2023/02/proxmox-pc-1-1024x576.jpg 1024w, https://bglug.it/wp-content/uploads/2023/02/proxmox-pc-1-300x169.jpg 300w, https://bglug.it/wp-content/uploads/2023/02/proxmox-pc-1-768x432.jpg 768w, https://bglug.it/wp-content/uploads/2023/02/proxmox-pc-1-1536x864.jpg 1536w, https://bglug.it/wp-content/uploads/2023/02/proxmox-pc-1-2048x1152.jpg 2048w, https://bglug.it/wp-content/uploads/2023/02/proxmox-pc-1-640x360.jpg 640w" sizes="(max-width: 1024px) 100vw, 1024px" />][3]<figcaption class="wp-element-caption">Hands-on</figcaption></figure>
|
||
|
||
[1]: https://forum.proxmox.com/threads/get-postfix-to-send-notifications-email-externally.59940/
|
||
[2]: https://forum.proxmox.com/threads/change-helo-hostname.52582/
|
||
[3]: https://bglug.it/wp-content/uploads/2023/02/proxmox-pc-1-scaled.jpg |