Wording "Gmail"

Update googlemail setup
Ozzie Isaacs 2021-04-16 18:49:57 +02:00
parent 303b163d58
commit d85851131d
15 changed files with 200 additions and 132 deletions

@ -48,119 +48,6 @@ Tick to enable remote login, i.e. a link that allows user to log in via a differ
You can choose to use calibre's ebook converter to convert ebooks from one format to another. Please choose the corresponding option. In path to convertertool the path and name of the file ebook-converter (part of calibre) has to be entered. (On Linux usualy /opt/calibre/ebook-convert, for windows it's usually c:\program files\calibre\ebook-convert.exe). Calibre offers a lot of options to modify the behavior of the ebook-converter, the options can be entered in the E-Book converter settings.\
### Using Google Drive integration
Calibre Calibre library (metadata.db) can be located on a Google Drive. Additional optional dependencys are necessary to get this work. Please install all optional requirements by executing `pip install --target vendor -r optional-requirements.txt`
To use google drive integration, you have to use the google developer console to create a new app. https://console.developers.google.com.
1. After login create a project:
![Dashboard](images/gdrive/dashboard.png)
2. Choose a name and save the project:
![Create project](images/gdrive/create_project.png)
3. Activate the API for the created project by clicking on enable APIs and services or API library
![Activate API](images/gdrive/activate_api.png)
4. Choose Google Drive API from the listed Apps
![API Library](images/gdrive/library.png)
5. Enable the Google Drive API by clicking on enable
![Enable Gdrive](images/gdrive/gdrive_enable.png)
6. Click on Configure consent screen:
![Configure Consent screen](images/gdrive/consent_screen.png)
8. Enter\
your e-mail adress,\
the applications name,\
the domain name of your application \
and add scope for '../auth/drive':
![Setup Credentials](images/gdrive/setup_credentials_oauth.png)
Save your changes.
8. Click on create credentials in the following screen:
Choose OAuth Client ID from the selection.
![API enabled Dashboard](images/gdrive/create_credentials.png)
9. Choose the app type: Web-application, enter in the field 'Authorized redirect URIs' the complete domain adress with the callback path: CALIBRE_WEB_URL/gdrive/callback\
E.g.: For a https connection to example.com where Calibre-Web is located in the folder 'test' you have to enter:
https://example.com/test/gdrive/callback
The address has to be public, localhost, http://internalServername or similar wont work. The field can't be empty.
![Web application](images/gdrive/web_app.png)
10. Google is now presenting your client ID and your client secret. We just close the popup, we download the informations.
![Setup Finished](images/gdrive/setup_finished.png)
11. Now we download the informations in json format by clicking on the download button on the overview page
![Download credentials](images/gdrive/finished_overview.png)
12. Download json file and place it in `calibre-web` directory, with the name `client_secrets.json`
13. Final step is the verification of your domain.
![Download credentials](images/gdrive/domain_verification_start.png)
14. First you need to add your domain (this is the adress, if you want to access your server from the internet) to the **google search console**:
![Domain verification](images/gdrive/verify_domain.png)
15. Please follow the steps there for verifiying the domain address
The one one the right is the easiest for self hosted domains.
After entering your domain name, download the html file and make it accessible under the address http[s]://[your-domain-name]/[filename]
16. Afterwards you can enter your domain to the screen from step 14 and activate your domain
![Domain verification](images/gdrive/domain_verified.png)
The Drive API should now be setup and ready to use, so we need to integrate it into Calibre-Web. This is done as described below:\
1. Open config page (here shown during initial setup, can also be done later)
2. Enter the location that will be used to store the metadata.db file locally, and to temporary store uploaded books and other temporary files for upload ("Location of Calibre database"). The metadata.db file has to exist and should be consitent with the books stored on Google Drive.
3. Tick Use Google Drive\
![Inital config](images/gdrive/inital_config.png)
4. Click the "Submit" button. If done during inital config, please login to Calibre-Web and go to admin section, Basic config. Login should be done to the outside adress of your instance, because you are redirected from Google to this address during authentication process.
5. Now select Authenticate Google Drive
![Authenticate Google](images/gdrive/authenticate_gdrive.png)
6. This should redirect you to Google. You are warned the app isn't verified and you have to show advanced options and click on the "Go to ... unsafe" button. After allowing it to use your Drive, it redirects you back to the previous config page of your Calibre-Web instance.
![Google login](images/gdrive/google_login.png)
![Allow authenticate](images/gdrive/google_allow.png)
7. Select the folder that is the root of your calibre library on Gdrive ("Google drive Calibre folder")
![Select Google Drive folder](images/gdrive/google_return.png)
8. Click the "Submit" button
9. Google Drive should now be connected and be used to get images and download Epubs. The metadata.db is stored in the calibre library location. Upon Upload of new books the calibre library folder acts as temporary folder before the final upload to Google Drive.
#### Google Drive Optional configuration
If your Calibre-Web is using https, it is possible to add a "watch" to the drive. This will inform us if the metadata.db file is updated from outside and allows us to update our calibre library accordingly.
Additionally the public adress your server uses (e.g.https://example.com) has to be verified in the Google developer console. After this is done, please wait a few minutes, then
10. Open config page
11. Click enable watch of metadata.db
12. Note that this expires after a week, so you need manually refresh it
## UI Configuration:
Title:\

112
G-Drive-Setup.md Normal file

@ -0,0 +1,112 @@
# Using Google Drive integration
Calibre Calibre library (metadata.db) can be located on a Google Drive. Additional optional dependencys are necessary to get this work. Please install all optional requirements by executing `pip install --target vendor -r optional-requirements.txt`
To use Google Drive integration, you have to use the Google Developer Console to create a new app. https://console.developers.google.com.
1. After login create a project:
![Dashboard](images/gdrive/dashboard.png)
2. Choose a name and save the project:
![Create project](images/gdrive/create_project.png)
3. Activate the API for the created project by clicking on enable APIs and services or API library
![Activate API](images/gdrive/activate_api.png)
4. Choose Google Drive API from the listed Apps
![API Library](images/gdrive/library.png)
5. Enable the Google Drive API by clicking on enable
![Enable Gdrive](images/gdrive/gdrive_enable.png)
6. Click on Configure consent screen:
![Configure Consent screen](images/gdrive/consent_screen.png)
8. Enter\
your e-mail adress,\
the applications name,\
the domain name of your application \
and add scope for '../auth/drive':
![Setup Credentials](images/gdrive/setup_credentials_oauth.png)
Save your changes.
8. Click on create credentials in the following screen:
Choose OAuth Client ID from the selection.
![API enabled Dashboard](images/gdrive/create_credentials.png)
9. Choose the app type: Web-application, enter in the field 'Authorized redirect URIs' the complete domain adress with the callback path: CALIBRE_WEB_URL/gdrive/callback\
E.g.: For a https connection to example.com where Calibre-Web is located in the folder 'test' you have to enter:
https://example.com/test/gdrive/callback
The address has to be public, localhost, http://internalServername or similar wont work. The field can't be empty.
![Web application](images/gdrive/web_app.png)
10. Google is now presenting your client ID and your client secret. We just close the popup, we download the informations.
![Setup Finished](images/gdrive/setup_finished.png)
11. Now we download the informations in json format by clicking on the download button on the overview page
![Download credentials](images/gdrive/finished_overview.png)
12. Download json file and place it in `calibre-web` directory, with the name `client_secrets.json`
13. Final step is the verification of your domain.
![Download credentials](images/gdrive/domain_verification_start.png)
14. First you need to add your domain (this is the adress, if you want to access your server from the internet) to the **google search console**:
![Domain verification](images/gdrive/verify_domain.png)
15. Please follow the steps there for verifiying the domain address
The one one the right is the easiest for self hosted domains.
After entering your domain name, download the html file and make it accessible under the address http[s]://[your-domain-name]/[filename]
16. Afterwards you can enter your domain to the screen from step 14 and activate your domain
![Domain verification](images/gdrive/domain_verified.png)
The Drive API should now be setup and ready to use, so we need to integrate it into Calibre-Web. This is done as described below:\
1. Open config page (here shown during initial setup, can also be done later)
2. Enter the location that will be used to store the metadata.db file locally, and to temporary store uploaded books and other temporary files for upload ("Location of Calibre database"). The metadata.db file has to exist and should be consitent with the books stored on Google Drive.
3. Tick Use Google Drive\
![Inital config](images/gdrive/inital_config.png)
4. Click the "Submit" button. If done during inital config, please login to Calibre-Web and go to admin section, Basic config. Login should be done to the outside adress of your instance, because you are redirected from Google to this address during authentication process.
5. Now select Authenticate Google Drive
![Authenticate Google](images/gdrive/authenticate_gdrive.png)
6. This should redirect you to Google. You are warned the app isn't verified and you have to show advanced options and click on the "Go to ... unsafe" button. After allowing it to use your Drive, it redirects you back to the previous config page of your Calibre-Web instance.
![Google login](images/gdrive/google_login.png)
![Allow authenticate](images/gdrive/google_allow.png)
7. Select the folder that is the root of your calibre library on Gdrive ("Google drive Calibre folder")
![Select Google Drive folder](images/gdrive/google_return.png)
8. Click the "Submit" button
9. Google Drive should now be connected and be used to get images and download Epubs. The metadata.db is stored in the calibre library location. Upon Upload of new books the calibre library folder acts as temporary folder before the final upload to Google Drive.
# Google Drive Optional configuration
If your Calibre-Web is using https, it is possible to add a "watch" to the drive. This will inform us if the metadata.db file is updated from outside and allows us to update our calibre library accordingly.
Additionally the public adress your server uses (e.g.https://example.com) has to be verified in the Google developer console. After this is done, please wait a few minutes, then
10. Open config page
11. Click enable watch of metadata.db
12. Note that this expires after a week, so you need manually refresh it

@ -1,12 +1,81 @@
# Mailserver Setup
For sending E-Mails to your Kindle, Pocketbook, Smartphone or Tablet you need to setup a e-mailserver in Calibre-Web. The corresponding settings are found in the admin section "Change SMTP settings".\
For sending E-Mails to your Kindle, Pocketbook, Smartphone or Tablet you need to setup a e-mailserver in Calibre-Web. The corresponding settings are found in the admin section "Edit E-mail Server Settings".\
If you have installed google-auth-oauthlib and google-api-python-client you can choose to use a FG address for sending emails without having enabled "less secure apps"
1. [Standard SMTP Servers](https://github.com/janeczku/calibre-web/wiki/Setup-Mailserver#Standard-SMTP-Servers)
2. [Gmail](https://github.com/janeczku/calibre-web/wiki/Setup-Mailserver#Gmail)
### Standard SMTP Servers
SMTP hostname is the mail-sending server, normally something like smtp.xxx.com. For correct setting of Port and Encryption, please look at the manual of your mail provider. SMTP login and SMTP password are the credentials you are using for sending e-mails. In the from e-mail please enter whatever you want to be shown in the "from field" on the receiver side (Some servers seem to be a bt pitty about what is entered here, you plain email-address should always work).
After finishing the settings you can check if the configuration is correct by hitting "Save setings and send Test E-Mail". Please check afterwards in the task section if the e-mail could be send successfully. If not you can change the loglevel to DEBUG and take a deeper look in the communication-packets and error messages exchanged (logfile calibre-web.log in the root folder of your installation).
The admin user has per default no Kindle-Email address entered, please enter a valid receiving E-Mail address into the corresponding field (admin section user admin, user's own profile settings page).
### Gmail
Make sure to have installed google-auth-oauthlib and google-api-python-client from the optional-requirements.txt file.
Go to the Google Developer Console and create a new app. https://console.developers.google.com. If you are using the Google Drive integration, some steps can be skipped and you can use the same oauth key for Gmail and G-Drive
1. After login create a project:
![Dashboard](images/gdrive/dashboard.png)
2. Choose a name and save the project:
![Create project](images/gdrive/create_project.png)
3. Activate the API for the created project by clicking on enable APIs and services or API library
![Activate API](images/gdrive/activate_api.png)
4. Choose Gmail API from the listed Apps
![API Library](images/gmail/library.png)
5. Enable the Gmail API by clicking on enable
![Enable GMail](images/gmail/gmail_enable.png)
6. Click on create credentials in the following screen:
![API enabled Dashboard](images/gmail/create_credentials.png)
7. Choose Gmail as API, select user data and go to the next screen
![Credential Type](images/gmail/config_credentials.png)
8. Select a name for your App enter user support and developer email address (can all be the same and identical to the account email you are using)
![Consent screen](images/gmail/consent_screen.png)
9. On the following page select the scopes of the API you want to use (it's optional). Tick "gmail.send" and "userinfo.email"
![Scopes](images/gmail/scopes.png)
![Scopes Detail 1](images/gmail/scopes_detail_1.png)
![Scopes Detail 2](images/gmail/scopes_detail_2.png)
10. On the next screen select "Desktop app" the name can be left on the default value
![OAuth Client ID](images/gmail/oauth_client_id.png)
11. On the next screen you can download the credentials in a json formated file. Download the file rename it to gmail.json and put it into the calibre-web root folder
![Done](images/gmail/done.png)
12. Last step (not necessary if you have enabled G-Drive and are providing a valid callback path). Enter the name of the email accout you want to use as test user. Click on Oauth consent screen and then on Add users, enter the email address. It should show up in the test users list afterwards
![Create test user](images/gmail/create_test_user.png)
13. Finally restart Calibre-Web and go to admin section "Edit E-mail Server Settings" and change Server Type to Gmail Account with OAuth2 Verification. Click on Setup Gmail Account
## Allowed domains for registering
If public registration is enabled you can limit the domains of e-mail adresses which are allowed for registering. Per default all domains (\*.\*) are allowed. You can use "\*" for limiting to any number of characters and "?" for limiting to exact one character. If you want to limit the domains, please make sure to delete/edit the "\*.\*" entry. Entries can be deleted by clicking on the trashcan symbol and edited by clicking on the entry.

@ -4,21 +4,21 @@ The following user languages are available:
| Language | Translations |
| ---------- |:---------:|
| Czech | 597 of strings 687 translated |
| German | 676 of strings 687 translated |
| Greek | 633 of strings 687 translated |
| Spanish | 597 of strings 687 translated |
| Finnish | 449 of strings 687 translated |
| French | 597 of strings 687 translated |
| Hungarian | 393 of strings 687 translated |
| Italian | 676 of strings 687 translated |
| Japanese | 311 of strings 687 translated |
| Khmer | 275 of strings 687 translated |
| Dutch | 605 of strings 687 translated |
| Polish | 598 of strings 687 translated |
| Portuguese (Brazil) | 676 of strings 687 translated |
| Russian | 559 of strings 687 translated |
| Swedish | 518 of strings 687 translated |
| Turkish | 372 of strings 687 translated |
| Ukrainian | 239 of strings 687 translated |
| Chinese (Simplified, China) | 633 of strings 687 translated |
| Czech | 597 of strings 697 translated |
| German | 676 of strings 697 translated |
| Greek | 633 of strings 697 translated |
| Spanish | 597 of strings 697 translated |
| Finnish | 449 of strings 697 translated |
| French | 597 of strings 697 translated |
| Hungarian | 393 of strings 697 translated |
| Italian | 676 of strings 697 translated |
| Japanese | 311 of strings 697 translated |
| Khmer | 275 of strings 697 translated |
| Dutch | 605 of strings 697 translated |
| Polish | 598 of strings 697 translated |
| Portuguese (Brazil) | 676 of strings 697 translated |
| Russian | 559 of strings 697 translated |
| Swedish | 518 of strings 697 translated |
| Turkish | 372 of strings 697 translated |
| Ukrainian | 239 of strings 697 translated |
| Chinese (Simplified, China) | 633 of strings 697 translated |

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

BIN
images/gmail/done.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
images/gmail/library.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
images/gmail/scopes.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB