NixUser | Unix User | Linux User | NixUser


How to add header subject in postfix

  If you want to add subject in the postfix log files, add the following in file at the bottom.   vi /etc/postfix/   header_checks = regexp:/etc/postfix/header_checkssmtp_header_checks = regexp:/etc/postfix/header_checks   And add the lines below in /etc/postfix/header_checks files, create the file if it’s not already there.   /^subject:/ WARN/^X-PHP-Originating-Script:/ WARN   Now restart postfix More

How to see time stamps in bash history?

Enter the following command in terminal. HISTTIMEFORMAT=”%d/%m/%y %T ” Or, to make the change permanent for the current user: echo ‘export HISTTIMEFORMAT=”%d/%m/%y %T “‘ >> ~/.bashrcsource ~/.bashrc Now try the history command, you will see the timestamp along with the command history.

force https 301 redirect using htaccess

  To force your website with SSL using htaccess and mod_rewrite, use the following rule in the website’s .htaccess. RewriteEngine On RewriteCond %{HTTP_HOST} ^yourwebsite\.com [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$$1 [R=301,L] If it’s a subdomain, use this. RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} sub RewriteRule ^(.*)$$1 [R=301,L] Note: Replace with the More

Postfix flush Mail Queue (and) by Sender

In Postfix, enter the following command to flush the email queue: $ postfix flush Or you can use: $ postfix -f To see the mail queue, enter: $ mailq Or $ postqueue -p To remove all mail from the queue: $ postsuper -d ALL To remove all deferred emails in queue: $ postsuper -d ALL More

Previous Posts

%d bloggers like this: