Wednesday, April 28, 2021

DAMRC record example for subdomain

deen.revealdigitalmarketing.com. IN TXT

"v=DMARC1;p=reject;sp=none;adkim=r;aspf=r;pct=100;fo=0;rf=afrf;ri=86400;rua=mailto:postmaster@deen.revealdigitalmarketing.com;ruf=mailto:postmaster@deen.revealdigitalmarketing.com"


How to add Mutiple IP and Multiple Domain in Single SPF TXT record

 SFP record example:

v=spf1 +a +mx +ip4:35.209.113.119 ip4:209.145.61.178 include:_spf.mailspamprotection.com include:deen.revealdigitalmarketing.com ~all



Sunday, April 25, 2021

Cocoapods install in Mac



First, check the version of Ruby you are using.
$ruby -v ruby 
2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin18] 
$ which ruby 
usr/bin/ruby


Now use Homebrew to install the latest Ruby.
$ brew install ruby 
==> ruby By default, binaries installed by gem will be placed into: /usr/local/lib/ruby/gems/2.7.0/bin You may want to add this to your PATH. ruby is keg-only, which means it was not symlinked into /usr/local, because macOS already provides this software and installing another version in parallel can cause all kinds of trouble.


If you need to have ruby first in your PATH run:
$ echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> /Users/xxx/.bash_profile
(For newer mac the file name will be : .zprofile )


For compilers to find ruby you may need to set:
$ export LDFLAGS="-L/usr/local/opt/ruby/lib" 
$ export CPPFLAGS="-I/usr/local/opt/ruby/include"


Follow the instructions to set PATH. Now you will go to see the installed Ruby. Make sure to replace the 'xxx' with your username.
$ echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> /Users/xxx/.bash_profile 
$ echo 'export LDFLAGS="-L/usr/local/opt/ruby/lib"' >> ~/.bash_profile 
$ echo 'export CPPFLAGS="-I/usr/local/opt/ruby/include"' >> ~/.bash_profile 
$ source ~/.bash_profile
(For newer mac the file name will be : .zprofile )

Finally, Make sure your PATH is in place.
$ ruby -v ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin18] 
$ which ruby 
/usr/local/opt/ruby/bin/ruby


You're good to go! Make sure you install by specifying the save destination as follows.

$ sudo gem install -n /usr/local/bin cocoapods

Saturday, April 17, 2021

Install Webmin on Ubuntu 20.04


sudo apt update
sudo apt install wget apt-transport-https software-properties-common
wget -q http://www.webmin.com/jcameron-key.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] http://download.webmin.com/download/repository sarge contrib"
sudo apt install webmin
sudo systemctl status webmin
sudo ufw allow 10000/tcp
sudo ufw reload
https://server-ip:10000/

Friday, April 16, 2021

Installation fails with request timeout in Litespeed server

 LiteSpeed totally ignores the usual Apache setting. You can do it yourself by setting some environment variables for LiteSpeed in the .htaccess file of your document root . See below -

<IfModule Litespeed>
SetEnv noabort 1 
SetEnv noconntimeout 1 
</IfModule>

Thursday, April 15, 2021

Install geoip-database in Ubuntu 20


  1. Update the package index:
    # sudo apt-get update
  2. Install geoip-database deb package:
    # sudo apt-get install geoip-database

Install Composer in MacOS Catalina

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
Local or specific Directory: 
php composer-setup.php --install-dir=bin --filename=composer

Global: 
mv composer.phar /usr/local/bin/composer




Note: If the above fails due to permissions, you may need to run it again with sudo.
Note: On some versions of macOS the /usr directory does not exist by default. If you receive the error "/usr/local/bin/composer: No such file or directory" then you must create the directory manually before proceeding: mkdir -p /usr/local/bin.


You can also follow instruction from: https://getcomposer.org/download/






Install extensions for PHP 7.4 on Ubuntu 20

sudo apt-get install php7.4-cli php7.4-fpm php7.4-bcmath php7.4-curl php7.4-gd php7.4-intl php7.4-json php7.4-mbstring php7.4-mysql php7.4-opcache php7.4-sqlite3 php7.4-xml php7.4-zip


or 

sudo apt update
sudo apt install php7.4
sudo apt install php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap php7.4-zip php7.4-intl -y

Tuesday, April 13, 2021

Mautic Cronjob Setup

 Mautic Cron Jobs are as follows:


#Segments Every 2 Minutes

*/2 * * * * root /usr/bin/php /var/www/html/mautic/bin/console mautic:segments:update

*/3 * * * * root /usr/bin/php /var/www/html/mautic/bin/console mautic:import


#Campaigns (Every 1 Minute)

* * * * * root /usr/bin/php /var/www/html/mautic/bin/console mautic:campaigns:update 

* * * * * root /usr/bin/php /var/www/html/mautic/bin/console mautic:campaigns:trigger

* * * * * root /usr/bin/php /var/www/html/mautic/bin/console mautic:messages:send


#Process Email Queue Every 5 Minutes

*/5 * * * * root /usr/bin/php /var/www/html/mautic/bin/console mautic:emails:send #Fetch and Process Monitored Email Every 10 Minutes

*/10 * * * * root /usr/bin/php /var/www/html/mautic/bin/console mautic:email:fetch


#Process Email Queue Every 5 Minutes

*/5 * * * * root /usr/bin/php /var/www/html/mautic/bin/console mautic:emails:send


#Fetch and Process Monitored Email Every 10 Minutes

*/10 * * * * root /usr/bin/php /var/www/html/mautic/bin/console mautic:email:fetch


Leave a line between cron jobs



Extract Domain from email in Excel or Google sheet

  =TEXTAFTER( A2 , "@") or, =MID(A1, FIND("@", A1) + 1, LEN(A1) - FIND("@", A1))