DevCEDTeam / CED

0 stars 0 forks source link

Description #36

Open DevCEDTeam opened 1 year ago

DevCEDTeam commented 1 year ago

+±++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Exim mail server

Certainly! Here are step-by-step instructions to configure outbound SMTP mail relay over the Exim mail server:

  1. Install Exim mail server:

    • Update the package lists:
      sudo apt update
    • Install Exim:
      sudo apt install exim4
  2. Configure Exim for outbound SMTP relay:

    • Open the Exim configuration file:
      sudo nano /etc/exim4/update-exim4.conf.conf
    • Set the following configuration options:
      dc_eximconfig_configtype='smarthost'
      dc_smarthost='smtp.gmail.com::587'
      dc_other_hostnames=''
      dc_local_interfaces='127.0.0.1'
      dc_readhost=''
      dc_relay_domains=''
      dc_minimaldns='false'
      dc_relay_nets=''
      dc_smarthost='smtp.gmail.com::587'
      CFILEMODE='644'
    • Save the file and exit the text editor.
  3. Configure authentication credentials for SMTP relay:

    • Create a file to store the Gmail authentication credentials:
      sudo nano /etc/exim4/passwd.client
    • Add the following line to the file, replacing <USERNAME> and <PASSWORD> with your Gmail account credentials:
      smtp.gmail.com:<USERNAME>@gmail.com:<PASSWORD>
    • Save the file and exit the text editor.
    • Set the correct permissions for the credentials file:
      sudo chmod 400 /etc/exim4/passwd.client
  4. Reconfigure Exim:

    • Run the following command:
      sudo dpkg-reconfigure exim4-config
    • Select "internet site" as the mail server configuration type.
    • Set the System mail name to your domain name or hostname.
    • Leave other options at their default values unless you have specific requirements.
    • Save the configuration and exit.
  5. Restart Exim:

    sudo service exim4 restart
  6. Test the outbound SMTP relay:

    • Open a terminal and run the following command to send a test email:
      echo "This is a test email" | mail -s "Test Email" recipient@example.com
    • Check the recipient's mailbox to verify if the test email was received.

That's it! You have now configured outbound SMTP mail relay over the Exim mail server. You can use this setup to send email messages from your Mautic application or any other application on the server.

+±++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Gmail account credentials

To find your Gmail account credentials (username and password) within your Google Cloud Terminal, you can follow these steps:

  1. Open a web browser and go to the Google Account login page (https://accounts.google.com).
  2. Sign in with your Gmail account credentials or the Google account associated with your Gmail.
  3. Once you are logged in, click on your profile picture or initial icon located at the top right corner of the page.
  4. In the dropdown menu, click on "Manage your Google Account". This will open the Google Account settings page.
  5. On the left side menu, click on "Security".
  6. Scroll down to the "Signing in to Google" section and click on "App Passwords".
  7. You may be prompted to re-enter your Google account password for security purposes.
  8. Under the "App Passwords" section, select the app or device for which you want to generate an app password. In this case, you can select "Mail" or "Other (Custom name)".
  9. Choose the device you are using and click on "Generate".
  10. Google will generate a unique app password for you. This will be a combination of random characters.
  11. Copy the generated app password as this will be your password to use with Exim SMTP configuration.
  12. Use the generated app password as the <PASSWORD> value in the Exim configuration file (/etc/exim4/passwd.client) mentioned in the previous instructions.
  13. The <USERNAME> will be the email address associated with your Gmail account.

Please note that the app password is specific to the application or device you selected during the app password generation process. It allows you to use that specific application or device with your Google account without requiring your actual Google account password.

Make sure to keep your app password secure and avoid sharing it with others.