Skip to content

Email: admin@alshowto.com

Al's Down`N Dirty KB

Al's Down`N Dirty KB

Get`Er Done

  • Home
  • Web
  • PostfixAdmin Install Latest

PostfixAdmin Install Latest

Posted on October 24, 2022October 25, 2022 By admin No Comments on PostfixAdmin Install Latest
Email, Linux, Web

Since this one is a little more complex to get; below, is the simplest way to always get the latest released version of PostfixAdmin. On page 2 I will explain these commands better; for now, here is the commands.

LATEST_PFA=$(curl -v https://github.com/roundcube/roundcubemail/releases//latest 2> >(grep 'location:') >/dev/null | awk -F/ '{print ($NF)}')
LATEST_PFA=$(echo -n "${LATEST_PFA%$'\r'}")
PFA_FILE="roundcubemail-${LATEST_PFA}-complete.tar.gz"
PFA_URL="https://github.com/roundcube/roundcubemail/releases/download/${LATEST_PFA}/${PFA_FILE}"

Ok, now we have a url for the latest PostfixAdmin so we can follow LinuxBabe’s Postfix Admin step with the path additions I have created above.

sudo apt install wget

wget $PFA_URL

Now that it is downloaded, now it is time to create the web directory and move the posfixadmin to this path.

sudo mkdir -p /var/www/

sudo tar xvf $PFA_FILE -C /var/www/

sudo mv /var/www/postfixadmin-$LATEST_PFA /var/www/postfixadmin

rm -f $PFA_FILE

Follow the rest of linuxbabes PostfixAdmin until step Nginx

At step, Nginx it is broken. That sets it up for http and not https. However, https is better to serve and admin page so use the below to correctly setup for https note red sections and change accordingly to your configuration needs.

sudo nano /etc/nginx/conf.d/postfixadmin.conf
server {
   listen 443 ssl http2;
   listen [::]:443 ssl http2;
   server_name postfixadmin.alshowto.com;
   ssl_certificate /etc/acme/real-alshowto.com.fullchain;
   ssl_certificate_key /etc/acme/real-alshowto.com.key;
   ssl_protocols       TLSv1.1 TLSv1.2;
   ssl_ciphers         HIGH:!aNULL:!MD5;

   root /var/www/postfixadmin/public/;
   index index.php index.html;

   access_log /var/log/nginx/postfixadmin_access.log;
   error_log /var/log/nginx/postfixadmin_error.log;

   location / {
       try_files $uri $uri/ /index.php;
   }

   location ~ ^/(.+\.php)$ {
        try_files $uri =404;
        fastcgi_pass unix:/run/php/php7.4-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include /etc/nginx/fastcgi_params;
   }
}

Related

Tags: Debian Dovecot nginx Postfix postfixadmin webserver

Post navigation

❮ Previous Post: Kari Lake Is Awesome!
Next Post: Roundcube Latest Install Script ❯

You may also like

Linux
pfSense and Qemu Guest Agent
October 26, 2022
Debian 11 Bullseye Logo
Linux
Debian 11 apt-key Deprecated So Now What?
October 10, 2022
Linux
Configure HAProxy To Serve pfSense GUI
October 14, 2022
Email
Roundcube Latest Install Script
October 25, 2022

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Copyright © 2023 Al's Down`N Dirty KB.

Theme: Oceanly Premium by ScriptsTown