If you have such error using cpapi2, simply: cd ~/user && cpapi2 …
curl check status code
curl -I http://www.example.org
nopass sudo
superuser ALL=(ALL) NOPASSWD:ALL
%supergroup ALL=(ALL) NOPASSWD:ALL
directadmin R=lookuphost defer (-1): remote host address is the local hos
hostname
grep `hostname` /etc/virtual/domains
if missing add:
echo `hostname` >> /etc/virtual/domains
service exim restart
postfix dovecot virtual mailbox
Centos 7 + Postfix + Dovecot (without database)
vi /etc/postfix/main.cf
home_mailbox = Maildir/
myhostname = localhost
groupadd -g 5000 vmail
useradd -m -u 5000 -g 5000 -s /bin/bash vmail
vi /etc/postfix/main.cf
virtual_mailbox_domains = /etc/postfix/vhosts
virtual_mailbox_base = /home/vmail
virtual_mailbox_maps = hash:/etc/postfix/vmaps
virtual_minimum_uid = 1000
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
vi /etc/postfix/vhosts
domain1.com
domain2.com
vi /etc/postfix/vmaps
[email protected] domain1.com/info/
[email protected] domain1.com/info/
[email protected] domain1.com/sales/
[email protected] domain2.com/info/
[email protected] domain2.com/sales/
postmap /etc/postfix/vmaps
service postfix restart
vi /etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu/GNU)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
myhostname = localhost
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = $myhostname
mynetworks = 127.0.0.0/8, 10.0.0.0/24
mailbox_size_limit = 0
home_mailbox = Maildir/
virtual_mailbox_domains = /etc/postfix/vhosts
virtual_mailbox_base = /home/vmail
virtual_mailbox_maps = hash:/etc/postfix/vmaps
virtual_minimum_uid = 1000
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
recipient_delimiter = +
inet_interfaces = all
mv /etc/dovecot/dovecot.conf /etc/dovecot/dovecot.conf.orig
vi /etc/dovecot/dovecot.conf
# 2.2.10: /etc/dovecot/dovecot.conf
# OS: Linux 3.10.0-327.36.3.el7.x86_64 x86_64 CentOS Linux release 7.2.1511 (Core) ext4
auth_mechanisms = plain cram-md5
auth_verbose = yes
base_dir = /var/run/dovecot/
info_log_path = /var/log/dovecot.info
log_path = /var/log/dovecot
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/home/vmail/%d/%n
passdb {
args = /etc/dovecot/passwd
driver = passwd-file
}
passdb {
args = /etc/dovecot/passwd
driver = passwd-file
}
protocols = imap pop3
service auth {
executable = /usr/libexec/dovecot/auth
unix_listener /var/spool/postfix/private/auth-client {
group = postfix
mode = 0660
user = postfix
}
user = root
}
service imap-login {
chroot = login
executable = /usr/libexec/dovecot/imap-login
user = dovecot
}
service imap {
executable = /usr/libexec/dovecot/imap
}
service pop3-login {
chroot = login
executable = /usr/libexec/dovecot/pop3-login
user = dovecot
}
service pop3 {
executable = /usr/libexec/dovecot/pop3
}
ssl = no
userdb {
args = /etc/dovecot/users
driver = passwd-file
}
userdb {
args = /etc/dovecot/users
driver = passwd-file
}
valid_chroot_dirs = /var/spool/vmail
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
}
service dovecot restart
postconf -e 'smtpd_sasl_type = dovecot'
postconf -e 'smtpd_sasl_auth_enable = yes'
postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination'
postconf -e 'smtpd_sasl_path = private/auth'
service postfix restart
doveadm pw -s digest-md5 -u [email protected]
Enter new password:
Retype new password:
{DIGEST-MD5}9b9dcb4466233a9307bbc33708dffda0
doveadm pw
Enter new password:
Retype new password:
{CRAM-MD5}913331d8782236a8ecba7764a63aa27b26437fd40ca878d887f11d81245c2c6
postfix/smtpd SASL CRAM-MD5 authentication failed
vi /etc/postfix/master.cf
#submission inet n - n - - smtpd
so that it looks like this:
submission inet n - n - - smtpd
and restart postfix
ImportError: cannot import name ReadTimeoutError
pip install –upgrade requests
from flaskext.assets import Environment, Bundle
Instead of something like:
from flaskext.assets import Environment, Bundle
use:
from flask_assets import Environment, Bundle
centos install web panel
cd /usr/local/src
wget http://centos-webpanel.com/cwp-latest
sh cwp-latest
Couldn’t init INBOX: Can’t sync mailbox: Messages keep getting expunged
You should check server disk space.
tcpdump show get post data
Catch outgoing HTTP requests from your server, where xx.xx.xx.xx your server IP address:
tcpdump -n -s 0 -A 'src xx.xx.xx.xx and tcp dst port 80 and (tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x504f5354)'
lveinfo
To monitor the number of LVE fault
"lveinfo --display-username --show-all --limit=25 --order-by=any_faults --by-fault=any -r 1 -d 1 --period=5m | tee /dev/stderr
To monitor the number of LVE with max CPU usage >90%
"lveinfo --display-username --show-all --limit=25 --order-by=cpu_max --by-usage=cpu_max -p 90 -d 1 - iod=5m | tee /dev/stderr
To show I/O:
"lveinfo --display-username --show-all --limit=25 --order-by=io_max --by-usage=io_max -p 90 -d 1 -period=5m | tee /dev/stderr
Free Let‘s Encrypt cPanel
/scripts/install_lets_encrypt_autossl_provider
find top by cpu usage linux
ps aux | sort -nrk 3,3 | head -n 5
enable kvm nested
cat /sys/module/kvm_intel/parameters/nested
N
Temporarily remove the KVM intel Kernel module, enable nested virtualization to be persistent across reboots and add the Kernel module back:
sudo rmmod kvm-intel
sudo sh -c “echo ‘options kvm-intel nested=y’ >> /etc/modprobe.d/dist.conf”
sudo modprobe kvm-intel
Ensure the Nested KVM Kernel module parameter for Intel is enabled on the host:
cat /sys/module/kvm_intel/parameters/nested
Y
modinfo kvm_intel | grep nested
parm: nested:bool