sudo vi /etc/libvirt/qemu.conf
user = "root"
group = "root"
sudo systemctl restart libvirtd.service
sudo vi /etc/libvirt/qemu.conf
user = "root"
group = "root"
sudo systemctl restart libvirtd.service
yum install amavisd-new clamav-scanner clamav-scanner-systemd
systemctl start clamd@amavisd amavisd spamassassin
systemctl enable clamd@amavisd amavisd spamassassin
vi /etc/postfix/main.cf
content_filter=smtp-amavis:[127.0.0.1]:10024
vi /etc/postfix/master.cf
smtp-amavis unix - - n - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
127.0.0.1:10025 inet n - n - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
service restart postfix
vi /etc/postfix/main.cf
smtpd_helo_required = yes
disable_vrfy_command = yes
strict_rfc821_envelopes = yes
invalid_hostname_reject_code = 554
multi_recipient_bounce_reject_code = 554
non_fqdn_reject_code = 554
relay_domains_reject_code = 554
unknown_address_reject_code = 554
unknown_client_reject_code = 554
unknown_hostname_reject_code = 554
unknown_local_recipient_reject_code = 554
unknown_relay_recipient_reject_code = 554
unknown_sender_reject_code = 554
unknown_virtual_alias_reject_code = 554
unknown_virtual_mailbox_reject_code = 554
unverified_recipient_reject_code = 554
unverified_sender_reject_code = 554
smtpd_recipient_restrictions =
reject_invalid_hostname,
reject_unknown_recipient_domain,
reject_unauth_pipelining,
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination,
reject_rbl_client dul.dnsbl.sorbs.net,
reject_rbl_client list.dsbl.org,
reject_rbl_client sbl-xbl.spamhaus.org,
reject_rbl_client bl.spamcop.net,
reject_rbl_client dnsbl.sorbs.net,
reject_rbl_client cbl.abuseat.org,
permit
vi /etc/postfix/whitelist_domains
google.com OK
gmail.com OK
postmap /etc/postfix/whitelist_domains
vi /etc/postfix/main.cf
smtpd_recipient_restrictions =
reject_invalid_hostname,
reject_unknown_recipient_domain,
reject_unauth_pipelining,
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination,
check_client_access hash:/etc/postfix/whitelist_domains,
reject_rbl_client dsn.rfc-ignorant.org,
reject_rbl_client dul.dnsbl.sorbs.net,
reject_rbl_client list.dsbl.org,
reject_rbl_client sbl-xbl.spamhaus.org,
reject_rbl_client bl.spamcop.net,
reject_rbl_client dnsbl.sorbs.net,
reject_rbl_client cbl.abuseat.org,
reject_rbl_client ix.dnsbl.manitu.net,
reject_rbl_client combined.rbl.msrbl.net,
reject_rbl_client rabl.nuclearelephant.com,
permit
service postfix restart
● postfix.service - Postfix Mail Transport Agent
Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)
Active: active (running) since Tr 2018-08-29 18:32:05 CEST; 1s ago
Process: 10656 ExecStop=/usr/sbin/postfix stop (code=exited, status=0/SUCCESS)
Process: 10672 ExecStart=/usr/sbin/postfix start (code=exited, status=0/SUCCESS)
Process: 10669 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS)
Process: 10666 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=0/SUCCESS)
Main PID: 10748 (master)
CGroup: /system.slice/postfix.service
├─10748 /usr/libexec/postfix/master -w
├─10750 pickup -l -t unix -u
└─10751 qmgr -l -t unix -
Test SMTP auth and time:
time swaks --to [email protected] --from "[email protected]" -s mail.test.com:587 -tls -au [email protected] -ap password --header "Subject: Test" --body "Test" --attach-type image/jpg --attach /home/user/Downloads/img/image.jpg
If container will not start automatically:
ploop check -F /vz/private/CTID/root.hdd/root.hdd
ploop mount /vz/private/CTID/root.hdd/root.hdd/DiskDescriptor.xml
fsck /dev/ploop11111p1
vzctl start CTID
FIx for Openvz Centos 7
yum downgrade http://vault.centos.org/7.2.1511/os/x86_64/Packages/iputils-20121221-7.el7.x86_64.rpm
cat /proc/vz/vzquota | grep CTID
vzquota off CTID
vzquota drop CTID
OpenVZ is running…
Checking for CPT version compatibility
Checking for CPU flags compatibility
Error: CT is locked
Error in ioctl(CPT_TEST_VECAPS): Resource temporarily unavailable
Error: CPU capabilities check failed!
Error: Destination node CPU is not compatible
Error: Can’t continue live migration
Reboot not help:
vzctl restart CTID
Restarting container
Stopping container …
Child 441850 exited with status 7
Killing container …
Child 441851 exited with status 7
Unable to stop container
Fix:
vzctl chkpnt CTID --kill
find /var/cache/yum/base/ -type d -printf ‘%M %p\n’
drwxr-xr-x /var/cache/yum/base/
drwxr-xr-x /var/cache/yum/base/packages
clamd -c /etc/clamd.d/scan.conf
Uncomment TCPSocket
A fully interactive, realtime, and modern text-based browser rendered to TTYs and browsers
vi config.default.php
$cfg[‘AllowUserDropDatabase’] = false;
zcat file.tar.gz | wc –bytes
186997248
byte converter:
echo 186997248 | awk ‘{ i = $1 / 1024 / 1024 ; print i “MB” }’