Activity

  • John Walker posted an update in the group Group logo of UpdatesUpdates 1 year, 9 months ago

    2017 December 25

    Added to ~/web/.gitignore:
        wp-content/updraft/
        wp-content/plugins/updraftplus/
    We don't want to maintain the UpdraftPlus working directory in
    the repository.  I have presently excluded the plugin from the
    repository because I haven't decided whether to stay with the
    open source version which backs up to Amazon S3 or go with the
    premium version that will allow backup over SCP to the
    Fourmilab server.  If I install the premium version, it will
    have to be excluded from the repository as proprietary
    software.  With this issue unsettled, even though we're
    currently running the free version, I don't want to
    archive it at present.
    
    Wiped out the ~/plug/gmail-smtp plug-in and re-installed from
    the original downloaded .zip from
       //wordpress.org/plugins/gmail-smtp/
    Went to //console.developers.google.com/cloud-resource-manager?previousPage=%2F%3Fpli%3D1&pli=1
    on Firefox.
    Selected organization: fourmilab.ch.  It shows me no projects,
    with the failed project from yesterday's attempt pending
    deletion.
    
    Guides used in the following adventure in Colossal Cave:
        //www.youtube.com/watch?time_continue=1&v=kmqMmKfoblM
        //wphowto.net/gmail-smtp-plugin-for-wordpress-1341
        //www.wpbeginner.com/plugins/how-to-send-email-in-wordpress-using-the-gmail-smtp-server/
    
    Signed in the GoogleApps Admin Console:
        //admin.google.com/fourmilab.ch/AdminHome
    
    Clicked Security.
    
    Went to Basic Settings/Go to settings for less secure apps.   This took
    me to:
        //admin.google.com/fourmilab.ch/AdminHome#ServiceSettings/notab=1&service=securitysetting&subtab=lesssecureappsaccess
    where I confirmed the setting for "Less secure apps" was:
        "Enforce access to less secure apps for all users"
    as I set it yesterday.  By default it was "Disable access to less
    secure apps for all users".
    
    Under API reference, "Enable API access" is checked.
    
    The Cloud Platform Console is:
        //console.cloud.google.com/cloud-resource-manager?previousPage=%2F%3Fpli%3D1&pli=1
    In that console clicked "+ Add" to add a new project.  This took me
    to:
        //console.cloud.google.com/projectcreate?previousPage=%2Fcloud-resource-manager%3FpreviousPage%3D%252F%253Fpli%253D1%26pli%3D1&defaultProjectName&organizationId=1029803844244
    where I entered a "Project name" of
        Ratburger Mail
    which maps to a project ID of "ratburger-mail".  The Organization was
    pre filled-in as "fourmilab.ch".
    Clicked Create.
    
    Now, back to the Cloud Platform Console, set the Organization to
    fourmilab.ch and the new project was displayed.  Clicked the
    "Ratburger Mail" project, which displayed:
        //console.cloud.google.com/iam-admin/iam/project?project=ratburger-mail&organizationId=REDACTED
    This took me to useless page with IAM at the top.  Clicked "Google
    Cloud Platform" in the title bar, and now I'm at:
        //console.cloud.google.com/home/dashboard?project=ratburger-mail&organizationId=REDACTED
    which has an APIs and Services item in the menu at the left.
    It has submenus of:
        Dashboard
        Library
        Credentials
    Clicked Dashboard, which takes me to:
        //console.cloud.google.com/apis/dashboard?project=ratburger-mail&organizationId=REDACTED&duration=PT1H
    which has an "Enable APIs and Services" item in the top bar.
    Clicked "G Suite" in the bar at the left, which displayed 18 results,
    including Gmail API.  Clicked it.  This displayed:
        //console.cloud.google.com/apis/library/gmail.googleapis.com/?filter=category:gsuite&id=REDACTED&project=ratburger-mail&organizationId=REDACTED
    Clicked "Enable".  This took me to:
        //console.cloud.google.com/apis/api/gmail.googleapis.com/overview?project=ratburger-mail&organizationId=REDACTED&duration=PT1H
    which had a "Create credentials" button.  Pushed it.  A long wait ensued
    with a spinner.  Finally, the "Credentials" page appeared:
        //console.cloud.google.com/apis/credentials/wizard?api=gmail.googleapis.com&project=ratburger-mail&organizationId=REDACTED
    Selected:
        Which API are you using?  Gmail API
        Where will you be calling the API from?  Web browser (Javascript)
        What data will you be accessing: User data
    and clicked "What credentials do I need?".  This displays:
        //console.cloud.google.com/apis/credentials/wizard?api=gmail.googleapis.com&project=ratburger-mail&organizationId=REDACTED
    "Add credentials to your project".
    
    Set:
        Name: SMTP with Google
        Authorized JavaScript origins:
            //www.ratburger.org
        Authorized redirect URIs: (From Gmail-SMTP plug-in)
            //www.ratburger.org/wp-admin/options-general.php?page=gmail-smtp-settings&action=oauth_grant
    Clicked "Create client ID".
    
    This displays the:
        "Set up the OAuth 2.0 consent screen" page.
    Entered:
        Email address: kelvin@fourmilab.ch   (Only choice_
        Product name shown to users: Gmail SMTP
    Clicked Continue.
    
    This displayed "Download credentials":
        //console.cloud.google.com/apis/credentials/wizard?api=gmail.googleapis.com&project=ratburger-mail&organizationId=1029803844244
    Downloaded the client_id.json file and archived in the Ratburger_AWS
    directory.  Naturally, after you do this, the Done button which allows
    you to show the credentials disappears.  To show them, go back to
    "Cloud Platform Console" at the top left, click API/Credentials at
    the left, click the Client ID name, "SMTP with Google", and finally
    we can see:
        Client ID: REDACTED
        Client secret: REDACTED
    
    Entered these in the corresponding fields of the Gmail-SMTP
    plug-in Settings/General panel.  I did a full forget credentials
    and then a re-authorise, which worked as expected.  The test
    E-mail fails precisely as before.  At this point I am formally
    giving up on this as a lost cause.  I think it fundamentally
    doesn't work.
    
    Ran a full backup/sync to Pallas.
    
    Did a flashback of /server/var/mysql.
    
    Installed Plugins Garbage Collector:
        //wordpress.org/plugins/plugins-garbage-collector/
        //www.shinephp.com/plugins-garbage-collector-wordpress-plugin/
    This is a plugin which searches the MySQL database for tables
    orphaned by plug-ins you've deleted but which didn't clean up
    their data when uninstalled.  Note that you have to be very
    careful when using this not to delete something which is still
    in use but which it fails to associate with an installed
    plug-in.  I am leaving it normally deactivated.  To run it,
    first make a full database backup, activate, then run a scan,
    delete as appropriate, and then when done de-activate to prevent
    the well-meaning but incautious from accidentally running it and
    wrecking things.
    
    In the Ratburger Mail project, IAM, I added "No Reply"
    (noreply@ratburger.org) as an Owner.  I had to confirm the E-mail
    sent to that address and forwarded to kelvin@fourmilab.ch to
    complete the registration.
    
    Installed WP Mail SMTP plug-in:
        //srd.wordpress.org/plugins/wp-mail-smtp/
    This is an alternative Gmail plug-in which requires the less
    secure setting but still accepts OAuth2 credentials.  Its
    Authorized redirect URI is:
        //www.ratburger.org/wp-admin/options-general.php?page=wp-mail-smtp&tab=auth
    
    Logged out of the Cloud Platform Console and logged back in as
    noreply@ratburger.org.
    
    Re-generated credentials from a log-in at noreply@ratburger.org:
        Client ID:   REDACTED
        Client secret:   REDACTED
    
    Configure the WP Mail SMTP plug-in as follows:
        From Email: noreply@ratburger.org
        From Name:  Ratburger.org
        Mailer:     Gmail
        Client ID:  REDACTED
        Client Secret: REDACTED
        Authorized redirect URI: //www.ratburger.org/wp-admin/options-general.php?page=wp-mail-smtp&tab=auth
    
    I then pressed "Save Settings", after which a "Confirm" button appeared
    to connect to Google Mail.  I pressed it, and went through an authorisation
    process at Google during which I acceped on behalf of:
        User ID: noreply@ratburger.org
        Password: REDACTED
    
    Sent a test E-mail to cruft.com.  It came through OK.
    Sent a test E-mail to fourmilab.ch.  It came through OK.
    
    Deleted the gmail-smtp plug-in.  May it never darken my, or
    anybody else's doorstep again.
    
    Installed the Stop Spammers plugin:
        //wordpress.org/plugins/stop-spammer-registrations-plugin/
    This is defence against spammers creating accounts and then using
    them to spam posts and comments.  Even though a new and tiny site,
    we've already attracted some of these bottom feeders.
    
    Configured Stop Spammers as follows:
        Only Use the Plugin for Standard WordPress Forms  On
            Only activates spam protection for log in and comment forms.
    
    Obtained a Google reCAPTCHA V2 API Key:
        //www.google.com/recaptcha/admin#list
        Label: Ratburger.org: Stop Spammers
        Type: reCAPTCHA V2
        Domains: ratburger.org
    Received:
        Site key: REDACTED
        Secret key:  REDACTED
    These may be viewed at:
        //www.google.com/recaptcha/admin#site/REDACTED?setup
    
    Configured Stop Spammers to use reCAPTCHA.  The test form looked OK.
    The reCAPCHA statistics may be viewed at:
        //www.google.com/recaptcha/admin#site/REDACTED
    
    Defined:
        git config --global alias.last "log -3 HEAD"
    so "git last" will list the last three commits.
    
    Added a Knowledge Base article, "Embedding Media in Posts and Comments".
        //www.ratburger.org/index.php/2017/12/25/knowledge-base-embedding-media-in-posts-and-comments/