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.

Leave a Reply

Your email address will not be published. Required fields are marked *