chạy trên mỗi phút:
# sudo crontab -e
*/1 * * * * /usr/bin/php /var/www/html/glpi/front/cron.php
Enable timezone after upgrade from GLPI 0.83 to GLPI 10
Login as root
sudo -s
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -p -u root mysql
systemctl restart mariadb
cd /var/www/html/glpi
php bin/console glpi:database:enable_timezones
Change default port smtp 25 send connector to another port for using Proxmox mail gateway
Set-SendConnector -Identity "connector name" -Port 26
Get-SendConnector "connector name"|fl Port
affect servers: Ubuntu 16.04 user Let's encrypt certificates (old root certificate expired)
sudo apt-get remove certbot
sudo apt-get install snapd
sudo snap install --classic certbot
sudo certbot renew --force-renewal --cert-name bbb.xxxxxxx.com --preferred-chain "ISRG Root X1"
bbb-conf --restart
nutanix@cvm$ cluster start
nutanix@cvm$ cluster status
user@mydomain:~$ sudo apt-get install postfix
user@mydomain:~$ cat /etc/postfix/main.cf
mydomain = mydomain.com
myhostname = postfix.mydomain.com
mydestination = mydomain.com, myotherdomain.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
relay_domains = $mydestination
smtpd_recipient_restrictions = permit_mynetworks,\
reject_unauth_destination,reject_invalid_hostname,\
reject_unauth_pipelining,reject_non_fqdn_sender, \
reject_unknown_recipient_domain,reject_unknown_sender_domain
transport_maps = hash:/etc/postfix/transport
local_recipient_maps =
user@mydomain:~$ cat /etc/postfix/transport
mydomain.com smtp:[10.10.10.50]
myotherdomain.com smtp:[10.10.10.50]
user@mydomain:~$ sudo postmap /etc/postfix/transport user@mydomain:~$ sudo postfix reload
user@mydomain:~$ sudo apt-get install amavisd-new spamassassin clamav-daemon user@mydomain:~$ sudo apt-get install libnet-dns-perl pyzor razor user@mydomain:~$ sudo apt-get install arj bzip2 cabextract cpio file gzip user@mydomain:~$ sudo apt-get install lha nomarch pax rar unrar unzip zip user@mydomain:~$ sudo adduser clamav amavis user@mydomain:~$ sudo adduser amavis clamav
user@mydomain:~$ cat /etc/default/spamassassin
ENABLED=1
CRON=1
user@mydomain:~$ sudo /etc/init.d/spamassassin start
user@mydomain:~$ cat /etc/amavis/conf.d/15-content_filter_mode
use strict;
# You can modify this file to re-enable SPAM checking through spamassassin
# and to re-enable antivirus checking.
#
# Default antivirus checking mode
# Please note, that anti-virus checking is DISABLED by
# default.
# If You wish to enable it, please uncomment the following lines:
@bypass_virus_checks_maps = (
\%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re);
#
# Default SPAM checking mode
# Please note, that anti-spam checking is DISABLED by
# default.
# If You wish to enable it, please uncomment the following lines:
@bypass_spam_checks_maps = (
\%bypass_spam_checks, \@bypass_spam_checks_acl, \$bypass_spam_checks_re);
1; # ensure a defined return
user@mydomain:~$ cat /etc/amavis/conf.d/05-node_id $myhostname = "postfix.mydomain.com"; user@mydomain:~$ cat /etc/amavis/conf.d/50-user $final_virus_destiny = D_PASS; # (defaults to D_BOUNCE) $final_spam_destiny = D_PASS; # (defaults to D_REJECT)
user@mydomain:~$ sudo /etc/init.d/amavis restart
user@mydomain:~$ telnet localhost 10024
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 [127.0.0.1] ESMTP amavisd-new service ready
^]
telnet> quit
Connection closed.
user@mydomain:~$ sudo postconf -e "content_filter = smtp-amavis:[127.0.0.1]:10024" user@mydomain:~$ cat /etc/postfix/master.cf pickup fifo n - - 60 1 pickup -o content_filter= -o receive_override_options=no_header_body_checks smtp-amavis unix - - - - 2 smtp -o smtp_data_done_timeout=1200 -o smtp_send_xforward_command=yes -o disable_dns_lookups=yes -o max_use=20 127.0.0.1:10025 inet n - - - - smtpd -o content_filter= -o local_recipient_maps= -o relay_recipient_maps= -o smtpd_restriction_classes= -o smtpd_delay_reject=no -o smtpd_client_restrictions=permit_mynetworks,reject -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o smtpd_data_restrictions=reject_unauth_pipelining -o smtpd_end_of_data_restrictions= -o mynetworks=127.0.0.0/8 -o smtpd_error_sleep_time=0 -o smtpd_soft_error_limit=1001 -o smtpd_hard_error_limit=1000 -o smtpd_client_connection_count_limit=0 -o smtpd_client_connection_rate_limit=0 -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks user@mydomain:~$ sudo /etc/init.d/postfix reload
user@mydomain:~$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 postfix.mydomain.com ESMTP Postfix (Ubuntu)
ehlo postfix.mydomain.com
250-postfix.mydomain.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from: somedude@spammer.com
250 2.1.0 Ok
rcpt to: user@mydomain.com
250 2.1.5 Ok
data
354 End data with .
Subject: Test sending spam email.
This email should be marked as spam because it contains this line
XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X
I should expect this to be delivered to Exchange.
.
250 2.0.0 Ok: queued as CDF272A80E20
quit
221 2.0.0 Bye
Connection closed by foreign host.
user@mydomain:~$ tail -f /var/log/syslog Apr 15 00:19:03 postfix.mydomain.com postfix/cleanup[6059]: CDF272A80E20: me ssage-id=<20130415071754 .cdf272a80e20="" postfix.mydomain.com=""> Apr 15 00:19:03 postfix.mydomain.com postfix/qmgr[5190]: CDF272A80E20: from=, size=552, nrcpt=1 (queue active) Apr 15 00:19:05 postfix.mydomain.com postfix/smtpd[6053]: disconnect from lo calhost[127.0.0.1] Apr 15 00:19:18 postfix.mydomain.com postfix/smtpd[6069]: connect from local host[127.0.0.1] Apr 15 00:19:18 postfix.mydomain.com postfix/smtpd[6069]: 404F42A80E2B: clie nt=localhost[127.0.0.1] Apr 15 00:19:18 postfix.mydomain.com postfix/cleanup[6059]: 404F42A80E2B: me ssage-id=<20130415071754 .cdf272a80e20="" postfix.mydomain.com=""> Apr 15 00:19:18 postfix.mydomain.com postfix/qmgr[5190]: 404F42A80E2B: from = 20130415071754>, size=1294, nrcpt=1 (queue active) Apr 15 00:19:18 postfix.mydomain.com postfix/smtpd[6069]: disconnect from lo calhost[127.0.0.1] Apr 15 00:19:18 postfix.mydomain.com amavis[5485]: (05485-06) Passed SPAM, L OCAL [127.0.0.1] [127.0.0.1] 20130415071754>-> , quarantine: j/spam-jq58tLC6RLYB.gz, Message-ID: <20130415071754 .cdf272a80e20="" postfix.mydomain.com="">, mail_id: jq58tLC6RLYB, Hits: 1000.207, size: 552, que ued_as: 404F42A80E2B, 14398 ms Apr 15 00:19:18 postfix.mydomain.com postfix/smtp[6065]: CDF272A80E20: to=, relay=127.0.0.1[127.0.0.1]:10024, delay=93, delays=79/0.0 1/0.01/14, dsn=2.0.0, status=sent (250 2.0.0 from MTA([127.0.0.1]:10025): 25 0 2.0.0 Ok: queued as 404F42A80E2B) Apr 15 00:19:18 postfix.mydomain.com postfix/qmgr[5190]: CDF272A80E20: remov ed Apr 15 00:19:18 postfix.mydomain.com postfix/smtp[6070]: 404F42A80E2B: to=, relay=10.10.10.50[10.10.10.50]:25, delay=0.21, delays=0.0 1/0.01/0.01/0.18, dsn=2.6.0, status=sent (250 2.6.0 <20130415071754 .cdf272a="" 80e20="" postfix.mydomain.com=""> [InternalId=21972] Queued mail for delivery) Apr 15 00:19:18 postfix.mydomain.com postfix/qmgr[5190]: 404F42A80E2B: remov ed 20130415071754>20130415071754>