Showing posts with label Postal. Show all posts
Showing posts with label Postal. Show all posts

Saturday, August 6, 2022

How to hide IP in header from Postal MTA

Remove  text where need using the following file in postalMTA.

For SMTP Server:

lib/postal/smtp_server/client.rb

@receiving_headers = true
received_header_content = "from #{@helo_name} (#{@hostname} [#{@ip_address}]) by #{Postal.config.dns.smtp_server_hostname} with SMTP;

For HTTP:

app/models/outgoing_message_prototype.rb

mail.header['Received'] = "from #{@source_type} (#{self.resolved_hostname} [#{@ip}]) by Postal with HTTP; #{Time.now.utc.rfc2822.to_s}"
mail.message_id = "<#{@message_id}>"

Tuesday, August 10, 2021

How to install Postal MTA using Docker & Caddy server in Ubuntu 18.04

Step-1: Hostname Setup

sudo hostname postal.example.com

Step-2: Docker

sudo apt-get update

sudo apt-get install \

    apt-transport-https \

    ca-certificates \

    curl \

    gnupg \

    lsb-release

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

echo \

  "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \

  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update

sudo apt-get install docker-ce docker-ce-cli containerd.io

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose

docker-compose --version

Step-3: System utilties

apt install git curl jq

Step-4: Git & installation helper repository

git clone https://postalserver.io/start/install /opt/postal/install

sudo ln -s /opt/postal/install/bin/postal /usr/bin/postal

Step-5: MariaDB

docker run -d \

   --name postal-mariadb \

   -p 127.0.0.1:3306:3306 \

   --restart always \

   -e MARIADB_DATABASE=postal \

   -e MARIADB_ROOT_PASSWORD=postal \

   mariadb

Step-6: RabbitMQ

docker run -d \

   --name postal-rabbitmq \

   -p 127.0.0.1:5672:5672 \

   --restart always \

   -e RABBITMQ_DEFAULT_USER=postal \

   -e RABBITMQ_DEFAULT_PASS=postal \

   -e RABBITMQ_DEFAULT_VHOST=postal \

   rabbitmq:3.8

Step-7: Installation postal

postal bootstrap mailer.justnutritive2.com

Step-8: DB Config and Permission (This is optional if you use step-5)

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

GRANT ALL ON postal.* TO 'postal'@'localhost' WITH GRANT OPTION;

FLUSH PRIVILEGES;

Exit;

sudo nano /opt/postal/config/postal.yml

Step-9: DB initialise

postal initialize

postal make-user

Step-10: Postal Running

postal start

Step-11: Installing WEB Client

docker run -d \

   --name postal-caddy \

   --restart always \

   --network host \

   -v /opt/postal/config/Caddyfile:/etc/caddy/Caddyfile \

   -v /opt/postal/caddy-data:/data \

   caddy

Step-12: STPM Configure

https://postal.justnutritive2.com

-----------------------------------------

Postal Login Credentials

-----------------------------------------

Mr X.

https://postal.example.com/settings

Username: alexise@example.com

Password: **********

====================================================

docker run -d \

   --name postal-caddy \

   --restart always \

   --network host \

   -v /opt/postal/config/Caddyfile:/etc/caddy/Caddyfile \

   -v /home/postal/public_html/caddy-data:/data \

   caddy

sudo /etc/init.d/apache2 start

sudo /etc/init.d/apache2 stop

----------------------------

Postal stop

Postal start



How to get Ranking of the Students in Excel using RANK Function

=RANK(number,ref,[order]) To rank in descending order, we will use the formula =RANK(B2,($C$5:$C$10),0) If we want unique ranks, we can use...