Category Archives: Hosting

exim check outgoing sender domain

vi /etc/localdomains
domaina.com
domainb.com

vi /etc/exim/exim.conf
domainlist sender_domains = lsearch;/etc/localdomains

acl_check_rcpt:

accept hosts = +relay_from_hosts
sender_domains = +sender_domains
control = submission
control = dkim_disable_verify

accept hosts = +relay_from_hosts
sender_domains = +sender_domains
control = submission
control = dkim_disable_verify

require message = bad sender domain
domains = +sender_domains

tail -f /var/log/exim/main.log
2020-05-20 20:55:55 H=mail.server.com [xx.xx.xx.xx] F=<> rejected RCPT : bad sender domain
2020-05-20 20:55:55 H=mail.server.com [xx.xx.xx.xx] F=<> rejected RCPT : bad sender domaim

ERROR 2013 (HY000): Lost connection to MySQL server during query


InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Error: the size of single-table tablespace file ./my_database/wp_badTable.ibd

mysqlcheck: Got error: 2013: Lost connection to MySQL server during query when executing 'CHECK TABLE ... '

mysql> drop database my_database;
ERROR 2013 (HY000): Lost connection to MySQL server during query

service mysqld stop
Shutting down MySQL... SUCCESS!

# Backup corrupted database files:
mv -v /var/lib/mysql/my_database/wp_wfHoover.* /root/
`/var/lib/mysql/my_database/wp_badTable.frm' -> `/root/wp_badTable.frm'
`/var/lib/mysql/my_database/wp_badTable.ibd' -> `/root/wp_badTable.ibd'

service mysqld start
Starting MySQL.. SUCCESS!

mysql> drop database my_database;
Query OK, 30 rows affected (0.40 sec)

service mysqld restart
Shutting down MySQL.. SUCCESS!
Starting MySQL.. SUCCESS!

200430 14:12:18 [Note] /usr/sbin/mysqld: Normal shutdown
200430 14:12:21 [Note] /usr/sbin/mysqld: ready for connections.

Now you can recreate database and restore from backups.

centos postfix autoresponder


mkdir ~/tmp && cd ~/tmp
To download bash script you can here: autoresponse-1.6.3.tar.gz
tar xvfz autoresponse-1.6.3.tar.gz
useradd -d /var/spool/autoresponse -s `which nologin` autoresponse
mkdir -p /var/spool/autoresponse/log /var/spool/autoresponse/responses
cp -v autoresponse/autoresponse /usr/local/sbin/
chown -R autoresponse.autoresponse /var/spool/autoresponse
chmod -R 0770 /var/spool/autoresponse

vim /etc/postfix/master.cf

smtp      inet  n       -       n       -       -       smtpd
        -o content_filter=autoresponder:dummy


autoresponder unix - n n - - pipe
  flags=Fq user=autoresponse argv=/usr/local/sbin/autoresponse -s ${sender} -r ${original_recipient} -S ${sasl_username} -C ${client_address}

postfix check
service postfix restart

autoresponse -e [email protected]
autoresponse -d [email protected]
autoresponse -E [email protected]
autoresponse -D [email protected]

systemd[1]: Failed to start Amavisd-new is an interface between MTA and content checkers..


amavisd -u amavis -c /etc/amavisd/amavisd.conf debug
Mar 19 14:22:06.415 ftp2.xxx.lt /usr/sbin/amavisd[9728]: logging initialized, log level 0, syslog: amavis.mail
Mar 19 14:22:06.415 ftp2.xxx.lt /usr/sbin/amavisd[9728]: sd_notify (no socket): STATUS=Config files have been read, modules loaded.
Mar 19 14:22:06.415 ftp2.xxx.lt /usr/sbin/amavisd[9728]: starting. /usr/sbin/amavisd at ftp2.xxx.lt amavisd-new-2.11.1 (20181009), Unicode aware, LANG="C"
Mar 19 14:22:06.415 ftp2.xxx.lt /usr/sbin/amavisd[9728]: perl=5.016003, user=amavis, EUID: 994 (994); group=, EGID: 991 (991)
ERROR: MISSING REQUIRED ADDITIONAL MODULES:
DBD::mysql

Fix:
yum install "perl(DBD::mysql)"

OpenSSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

Connecting to license.directadmin.com|185.42.221.168|:443… connected.
OpenSSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Unable to establish SSL connection.
Error downloading the license file from relay server as well.

echo 1 > /root/.insecure_download

letsencrypt update account error

[Sat Mar 7 10:53:36 EET 2020] url=’https://acme-v01.api.letsencrypt.org/acme/reg/24591046′
[Sat Mar 7 10:53:36 EET 2020] payload='{“resource”: “reg”, “agreement”: “https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf”}’
[Sat Mar 7 10:53:36 EET 2020] POST
[Sat Mar 7 10:53:36 EET 2020] url=’https://acme-v01.api.letsencrypt.org/acme/reg/24591046′
[Sat Mar 7 10:53:36 EET 2020] _CURL=’curl -L –silent –dump-header /var/lib/acme/.acme.sh/http.header ‘
[Sat Mar 7 10:53:37 EET 2020] _ret=’0′
[Sat Mar 7 10:53:37 EET 2020] code=’400’
[Sat Mar 7 10:53:37 EET 2020] Update account error.
[Sat Mar 7 10:53:37 EET 2020] _on_issue_err
[Sat Mar 7 10:53:37 EET 2020] Please check log file for more details: /var/lib/acme/.acme.sh/acme.sh.log

./acme.sh/acme.sh --upgrade

[Sat Mar 7 11:01:11 EET 2020] Installing from online archive.
[Sat Mar 7 11:01:11 EET 2020] Downloading https://github.com/Neilpang/acme.sh/archive/master.tar.gz
[Sat Mar 7 11:01:13 EET 2020] Extracting master.tar.gz
[Sat Mar 7 11:01:13 EET 2020] Installing to /var/lib/acme/.acme.sh
[Sat Mar 7 11:01:13 EET 2020] Installed to /var/lib/acme/.acme.sh/acme.sh
[Sat Mar 7 11:01:13 EET 2020] Installing alias to ‘/var/lib/acme/.bashrc’
[Sat Mar 7 11:01:13 EET 2020] OK, Close and reopen your terminal to start using acme.sh
[Sat Mar 7 11:01:13 EET 2020] Good, bash is found, so change the shebang to use bash as preferred.
[Sat Mar 7 11:01:13 EET 2020] OK
[Sat Mar 7 11:01:13 EET 2020] Install success!
[Sat Mar 7 11:01:13 EET 2020] Upgrade success!

DATABASE ERROR: CONNECTION FAILED! Unable to connect to the database! Please contact your server-administrator.

directadmin DATABASE ERROR: CONNECTION FAILED! Unable to connect to the database! Please contact your server-administrator.

vi /root/.my.cnf
[client]
user=root
password="password"

Make sure mysql user username is set otherwise you will get error wrong da_roundcube password:
Executing database schema update.
ERROR: SQLSTATE[HY000] [1045] Access denied for user 'da_roundcube'@'localhost' (using password: YES)
ERROR: Failed to connect to database