Posted on

PostFix with Gmail Delay App Password

Source: Bard

If you don’t see the app password section in 2-step verification, there could be a few reasons why:

1. Less Secure Apps option is enabled:

If you have the “Less secure apps” option enabled in your Google account settings, you won’t need to create app passwords. Instead, you can use your regular Gmail password with Postfix.

To check if this option is enabled:

If it is turned ON, you can proceed using your regular Gmail password with Postfix.

2. Google recently updated 2-step verification:

On June 15, 2023, Google disabled the “Less secure apps” option for all accounts. This means that you will need to create an app password for any third-party application that requires access to your Google account, including Postfix.

To create an app password:

3. You are using a G Suite account:

If you are using a G Suite account, the app password section might be located in a different place. You can contact your G Suite administrator for assistance with creating app passwords.

4. Browser issues:

In some rare cases, browser issues might prevent you from seeing all sections in the 2-step verification settings. Try clearing your browser cache and cookies, or using a different browser to access the settings.

Additional Tips:

  • If you are still having trouble finding the app password section, you can search for “create app password google” on a search engine. This will lead you to the official Google support page with instructions.
  • You can also contact Google support for further assistance.

I hope this information helps!

Configuring Postfix with App Password

To configure Postfix with an app password, you need to enable SASL authentication and configure the necessary parameters in your main.cf file. Here’s a sample configuration:

1. Enable SASL Authentication:

In your main.cf file, add or uncomment the following lines:

smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous

2. Create the SASL Password File:

Create a file named sasl_passwd in the /etc/postfix directory. This file will store your app passwords in a hash format.

[smtp.gmail.com]
your_username@gmail.com:YOUR_APP_PASSWORD

3. Set Access Permissions:

Make sure only authorized users can access the password file:

sudo postmap /etc/postfix/sasl_passwd
sudo chown root:root /etc/postfix/sasl_passwd
sudo chmod 0600 /etc/postfix/sasl_passwd

4. Configure Relayhost and Other Options:

Replace the following values in your main.cf file according to your needs:

relayhost = [smtp.gmail.com]:submission
mynetworks = 127.0.0.0/8
sender_dependent_relayhost_maps = hash:/etc/postfix/relay_maps

5. Create Relay Map (Optional):

This is optional if you want to specify different relay hosts for different senders. Create a file named relay_maps in the /etc/postfix directory and add entries for your users:

your_username@gmail.com   smtp:[smtp.gmail.com]:submission

6. Reload Postfix:

After making any configuration changes, reload Postfix to apply them:

sudo postfix reload

7. Verify Configuration:

Use postconf -n to verify the configuration settings and ensure everything is correct.

Note: This is a basic configuration example. You might need to adjust it depending on your specific setup and security requirements. Make sure to refer to the official Postfix documentation for more detailed information and advanced configurations.

Posted on

To disable Service auto start from Raspberry PI

Source: Bing Chat with GPT-4

To prevent services from starting during boot on your Raspberry Pi, you can disable them. One way to do this is by using the update-rc.d command. Here’s how:

  1. Open a terminal window on your Raspberry Pi.
  2. Type sudo update-rc.d -f <service-name> remove and press Enter. Replace <service-name> with the name of the service you want to disable.
  3. Repeat step 2 for each service you want to disable.

Most services do not consume processing power when they are not active. They will only take CPU time if they are active. Normally, they will be dormant waiting for an event. However, some services could do some background tasks and consume CPU cycles, in addition to the memory footprint of the software 1. Therefore, it is always safer and more robust to only start services and software you actually need 12.

I hope this helps!

Posted on

Setter and getter generator for PHP, JavaScript, C++ and C# | Kjetil Hårtveit’s Blog

Here is an online-based setter and getter generator tool capable of generating setters and getters for multiple programming languages, including PHP, JavaScript, C++ and C#. Simply choose the language of your preference, write the property names and click the generator button. Voilà!

Source: Setter and getter generator for PHP, JavaScript, C++ and C# | Kjetil Hårtveit’s Blog

Posted on

Raspberry Pi RDP

So first we need to install some software on the Raspberry Pi, but don’t worry it is very easy!
  1. Start up your Pi to the terminal prompt.
  2. Type the following command “sudo apt-get install xrdp”
  3. If promoted enter your password (the default is “raspberry”)
  4. Type “Y” and press enter.
  5. This is now installing xrdp onto your Pi which is the software we are going to use for the remote desktop connection.  Wait for it to complete.
  6. Restart your Pi.  We are going to check that xrdp is going to start up automatically.
  7. When your Pi has booted to the command prompt look for [ ok ] Starting Remote Desktop Protocol server : xrdp sesman.  This shows you that xrdp is installed and automatically starting up on start up of your Pi
  8. The last step is to make a note of the IP address of your Pi which should also be displayed on the start up screen.  In my case below it is 192.168.1.9.  This is the address of your Pi on your network and what we will use to connect to your Pi from the second machine.