• John Walker posted an update in the group Group logo of UpdatesUpdates 2 years, 5 months ago

    2017 December 25

    Added to ~/web/.gitignore:
    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
    Went to //
    on Firefox.
    Selected organization:  It shows me no projects,
    with the failed project from yesterday's attempt pending
    Guides used in the following adventure in Colossal Cave:
    Signed in the GoogleApps Admin Console:
    Clicked Security.
    Went to Basic Settings/Go to settings for less secure apps.   This took
    me to:
    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:
    In that console clicked "+ Add" to add a new project.  This took me
    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 "".
    Clicked Create.
    Now, back to the Cloud Platform Console, set the Organization to and the new project was displayed.  Clicked the
    "Ratburger Mail" project, which displayed:
    This took me to useless page with IAM at the top.  Clicked "Google
    Cloud Platform" in the title bar, and now I'm at:
    which has an APIs and Services item in the menu at the left.
    It has submenus of:
    Clicked Dashboard, which takes me to:
    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:
    Clicked "Enable".  This took me to:
    which had a "Create credentials" button.  Pushed it.  A long wait ensued
    with a spinner.  Finally, the "Credentials" page appeared:
        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:
    "Add credentials to your project".
        Name: SMTP with Google
        Authorized JavaScript origins:
        Authorized redirect URIs: (From Gmail-SMTP plug-in)
    Clicked "Create client ID".
    This displays the:
        "Set up the OAuth 2.0 consent screen" page.
        Email address:   (Only choice_
        Product name shown to users: Gmail SMTP
    Clicked Continue.
    This displayed "Download credentials":
    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:
    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"
    ( as an Owner.  I had to confirm the E-mail
    sent to that address and forwarded to to
    complete the registration.
    Installed WP Mail SMTP plug-in:
    This is an alternative Gmail plug-in which requires the less
    secure setting but still accepts OAuth2 credentials.  Its
    Authorized redirect URI is:
    Logged out of the Cloud Platform Console and logged back in as
    Re-generated credentials from a log-in at
        Client ID:   REDACTED
        Client secret:   REDACTED
    Configure the WP Mail SMTP plug-in as follows:
        From Email:
        From Name:
        Mailer:     Gmail
        Client ID:  REDACTED
        Client Secret: REDACTED
        Authorized redirect URI: //
    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:
        Password: REDACTED
    Sent a test E-mail to  It came through OK.
    Sent a test E-mail to  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:
    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:
        Label: Stop Spammers
        Type: reCAPTCHA V2
        Site key: REDACTED
        Secret key:  REDACTED
    These may be viewed at:
    Configured Stop Spammers to use reCAPTCHA.  The test form looked OK.
    The reCAPCHA statistics may be viewed at:
        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".