Exim: Rejected by local scanning code

When trying to send emails, if you get “rejected by local scanning code” error:

A message that you sent was rejected by the local scanning code that
checks incoming messages on this system. The following error was given:

Website of user admin is sending too many emails - rate overlimit = 200.2 /
1h

Solution:

Edit /etc/exim4/exim4.conf.template

# Limit per user for PHP scripts
acl_not_smtp:
  deny    message       = Website of user $authenticated_id is sending too many emails - rate overlimit = $sender_rate / $sender_rate_period
  ratelimit             = 200 / 1h / $authenticated_id

  warn    ratelimit     = 100 / 1h / strict / $authenticated_id
  log_message           = Sender rate [limitlog]: log / account / $authenticated_id / $sender_rate / $sender_rate_period

Exim: Message has lines too long for transport

After upgrading to exim 4.95 or exim 4.96, you may receive “Message has lines too long for transport” error after sending email.

Possible Cause: Message content has very long line. Probably HTML.

Possible Solution:

sed -i "s/message_linelength_limit = .*/message_linelength_limit = 2048000/" /etc/exim.conf
systemctl restart exim

or change message_linelength_limit value in /etc/exim.conf

Best Soluton:

Shrink emails’ HTML lines. You can use \n to split long lines. Exim 4.94 had no problem by the way.

This looks like the best and easiest solution.

(The default value of message_linelength_limit is 998)

70mai A500S: Disable Startup Sound

Power-up sound is not dependent on the speaker volume settings.

There is a way to turn off the power-on sound:

  1. Connect to the dash cam’s Wi-Fi network.
  2. Launch any telnet client. For example “Mobile Telnet
  3. ⋮ -> “Telnet Settings” -> Remote Host Name: “192.168.0.1”, port: “23” (by default)
  4. ⋮ -> “Connect”….
  5. The inscription “NVTEAM login” will appear: Write “root”, press “enter”
  6. Enter the command (rename the turn-on sound) and press “enter”:
    • mv /mnt/app/res/voice/public/bootsound.raw /mnt/app/res/voice/public/bootsound_1.raw

To return the sound when turned on, you can use the command:
mv /mnt/app/res/voice/public/bootsound_1.raw /mnt/app/res/voice/public/bootsound.raw

How to Configure NGINX Easily

DigitalOcean NGINX Tool: https://www.digitalocean.com/community/tools/nginx

Use yum for Red Hat based OS

sudo yum install epel-release
yum install nginx

Use apt-get for Debian based OS

apt-get install nginx

default location for settings file: /etc/nginx/nginx.conf

How to learn the location of settings file:

nginx -t

In order add a new website, just copy and edit the default file: /etc/nginx/sites-available/default

sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/website.com

server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/test.com/html;
index index.html index.htm index.php;
server_name hello.com http://www.hello.com;
location / {
try_files $uri $uri/ =404;
}
}

security settings:

sudo firewall-cmd –permanent –zone=public –add-service=http
sudo firewall-cmd –permanent –zone=public –add-service=https
sudo firewall-cmd –reload

sudo ufw allow ‘nginx http’

sudo systemctl restart nginx

Display and control Android device from computer

https://github.com/Genymobile/scrcpy

Enable USB debugging

How to connect using WiFi

adb tcpip 5555
adb connect 192.168.1.192:5555

How to disconnect

adb kill-server

Useful adb.exe commands

adb devices
adb reboot
adb reboot bootloader
adb reboot recovery
adb install
adb install game.apk
adb uninstall com.whatsapp
adb pull /sdcard/video.mp4
adb push video.mp4 /sdcard

Keyboard Shortcuts

  • right-click or Ctrl+b (or Ctrl+Backspace) for BACK
  • middle-click or Ctrl+h for HOME
  • Ctrl+m for the third button, APP_SWITCH
  • EDIT: now shortcuts use Alt by default
  • Alt + S is app switch

Vultr Snapshot Restore: Connection Fix

Solution to the Vultr server cannot connect to the Internet

Describe the problem:

  • SSH cannot connect to the server
  • The server cannot ping Google, or other websites
  • Only the Console provided on the Vultr page can log in to the server

Solution for Debian/Ubuntu

  1. Click View Console on the Vultr
  2. Delete the /etc/udev/rules.d/70-persistent-net.rules file
  3. Modify the IP information in the /etc/network/interfaces file to the IP information assigned to you by Vultr, or set it to be automatically obtained through DHCP
  4. Restart the host

How to delete rules file (STEP 2)

chattr -i 70-persistent-net.rules
sudo rm 70-persistent-net.rules

How to modify /etc/network/interfaces (STEP 3)

sudo nano /etc/network/interfaces
auto lo
iface lo inet loopback

auto enp1s0
iface enp1s0 inet dhcp

allow-hotplug ens3
iface ens3 inet dhcp
iface ens3 inet6 auto

Original Source: https://www.programmersought.com/article/47025498547/

Tested on Debian 10