Coding

I have to clean this up.

  • coding
  • php
  • sql
  • webhosts
  • joomla tips. 

This section is a reflection of my coding skills -- cut and paste, and hastily thrown together. Most of this is copied from other sites -- just so I have fast reference here.
If it belongs to you - sorry. Let me know. Though most has attribution. ;-)

I wrote this for myself. Since I have no memory, I write everything down. If it helps you -- great. if you run into problems GTS.  I have no answers. 

I have postfix mapped to a mysql database with three tables: domain, user, alias.

the complete postfix tutorial is here blogging dragon

What he doesn't address, the complexities of forwarding to Gmail,  I will below. Gmail is merciless. If your server isn't getting a 8 or greater at mail-tester.com your email will never see an inbox. 

we are assuming you have crossed that hurdle. 

  1. step 1:

    create the local mail box. 

    mail.mailserver.com

    INSERT INTO user (email, domain, password) VALUES ('me@myDomain.com', 'myDomain.com', ENCRYPT('mybigpw', CONCAT('\$6\$', SUBSTRING(SHA(RAND()), -16))));

    login via roundcube me@... -p mybigpw

  2. step 2

    go to gmail -> settings -> see all site settings -> accounts and import -> Send mail as: ->

    Add another email address.

    click it

    In the popup window:
    -> name -- your name or the name to id the account
    -> email address: the complete email yourEmail@yourDomain.com
    -> leave checked treat as an alias ->

    click Next

    -> smtp server : mail.mailserver.com ->

    user name: your complete email address ->

    password: your complete password

    port 587

    checked TLS

    click add account.

    another pop up will open

    Confirm verification to add your email address.

  3. Step 3:

    check your local mailbox for the confirmation email from google.

    I have roundcube installed. works. 

    copy the code in your local email to the field in the new gmail window.

    click confirm

  4. step 4 .

    go back to your postfix database and create an alias. in my case once an alias is in the table nothing arrives to the local mail box. everything goes to the forward.

  5. Step 5.

    from any email send a email to your me@mydomain mailbox.

    it should now arrive in your gmail. I'm damn sure it will be in the spam directory. 

    check your spam box at gmail. 

 

 

 

 

 

 

 

 Describing briefly the purpose of each directory.

  1. /bin : All the executable binary programs (file) required during booting, repairing, files required to run into single-user-mode, and other important, basic commands viz., cat, du, df, tar, rpm, wc, history, etc.
  2. /boot : Holds important files during boot-up process, including Linux Kernel.
  3. /dev : Contains device files for all the hardware devices on the machine e.g., cdromcpu, etc
  4. /etc : Contains Application’s configuration files, startupshutdownstartstop script for every individual program.
  5. /home : Home directory of the users. Every time a new user is created, a directory in the name of user is created within home directory which contains other directories like DesktopDownloadsDocuments, etc.
  6. /lib : The Lib directory contains kernel modules and shared library images required to boot the system and run commands in root file system.

Pipes can be thought of as a tube where data enters one end and sorted or customized at the other end.  Using pipes you can connect two programs. You can make the output of a particular command to act as the input for another command.  You can carry on this chain  between commands for customized outputs.

Pipes can be used with most of the Unix commands. You should take care to check that the output of the first command is acceptable input to the second command.
It should not be that the first command has its output in some format other than text format and the second command works with only text input. If at all this sort of thing happens, you would mostly get an error message or you would have to type <Ctrl>-C to quit the execution of the command and come back to the prompt.

this is in place here for idahogis.com

edit the template index.php file and add the following AS THE VERY FIRST LINES of the install's primary index.php.

<?php
$domain = $_SERVER["HTTP_HOST"];
$uri = $_SERVER["REQUEST_URI"];
$url = $domain . $uri;

if (($url == "idahogis.com/") ||
   ($url == "www.idahogis.com/")) { 
   header("Status: 301 Moved Permanently");
   header("Location: https://www.idahogis.com/index.php?option=com_content&view=category&layout=blog&id=3&Itemid=12"); 
}
?>

Here's the benefit: The visitor will now be redirected to the appropriate Red Site page, that has the Red Template assigned to it only in the case where they have arrived at the 'red site' domain name. Otherwise, the conditional PHP rule is ignored, and the Yellow Site loads.

The grep command searches the given input FILEs for lines containing a match or a text string.

grep command syntax

The syntax is:

grep "text string to search” directory-path

OR

Subcategories

Other sites hosted by L Rio.