1

Topic: How to set up smtp.gmail.com

==== Required information ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- Related log if you're reporting an issue:
====

I need to use gmail as my smtp server.
Where do I set this up at and what are the lines of code I need.
I think there is some kind of line in postfix like:
smtp_tls_something smtp.gmail.com:587

Then putting something in some file with the username and password
but I don't remember and didn't see anything about it in this forum.
Thanks
Dan

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: How to set up smtp.gmail.com

Search "postfix relay gmail" with Google will give you many useful tutorials, and here's one of them:
https://rtcamp.com/tutorials/linux/ubun … mail-smtp/

3

Re: How to set up smtp.gmail.com

ZhangHuangbin wrote:

Search "postfix relay gmail" with Google will give you many useful tutorials, and here's one of them:
https://rtcamp.com/tutorials/linux/ubun … mail-smtp/


I found these set of lines to add to main.cf

relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_use_tls = yes

This all looks good.

Do I need the line for the CAfile?