1

Topic: Configure Postfix to send from my gmail account ?

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- 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?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi ,  its possible to send  from example  "sendmail"  or "mail" comand line whit gmail smtp server.
If the "From" is xxx@gmail.com   the server connect to gmail whit  user and password and send mail  from google smtp.
it possible? Thx

Example.

I like to send  from my account xxx@gmail.com to  xxx@example.com.
Sendmail sends from my smtp gmail  server!

----

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

2

Re: Configure Postfix to send from my gmail account ?

I follow  this link  Relayl
en make this change but no  working sad

-Create the file /etc/postfix/sasl_passwd
 [smtp.gmail.com] xxx@gmail.com:PASSWORD

-Create a file /etc/postfix/relayhost_maps
xxxt@gmail.com   [smtp.gmail.com]

-Execute sudo postmap /etc/postfix/relayhost_maps

-And edit /etc/postfix/main.cf
sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost_maps
-restart postfix! 

3

Re: Configure Postfix to send from my gmail account ?

FYI: https://docs.iredmail.org/relayhost.html

4 (edited by trio1234 2018-12-06 22:18:56)

Re: Configure Postfix to send from my gmail account ?

I  follow the guide 
1- Sender dependent relay host
and
2 -Manage with command line tools

 sql> USE vmail; sql> INSERT INTO sender_relayhost (account, relayhost) VALUES ('user@domain.com', '[mail.gmail.com]:25'); 

when i send  mail from  user@gmail.com  from sendmail  to    myuser@myserver.com  i recibe this

Received: from mail.mydomain.com (localhost [127.0.0.1])
    by mail.mydomain.com (Postfix) with ESMTP id A44746548B
    for <myuser@myserver.com>; Thu,  6 Dec 2018 11:14:23 -0300 (-03)
X-Virus-Scanned: Debian amavisd-new at mail.mydomain.com

Plz help i m stack here!

5

Re: Configure Postfix to send from my gmail account ?

You still need Gmail username and password. Please double check the tutorial.