1

Topic: Seperating mail users to different mail server

==== Required information ====
- iRedMail version: 0.8.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: Centos 6
- Related log if you're reporting an issue:
====

Hi Zhang,

We received a requirement from a client. He wants 30 users to be migrated to google apps. & Rest of the users in iredmail users.

They have configured in google apps saying if user's doesn't exists in google apps forward the mail to iredmail server. Vice versa is not working.

In iredmail server It says unknow user or user doesn't exists..

Waiting for your earlier reply

Thanks

----

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

2 (edited by soundarajan 2014-09-05 13:53:17)

Re: Seperating mail users to different mail server

Hi zhang,

Thanks for your help, I am able to achive. Followed below step

1. Added smtp:[smtp-relay.gmail.com]:25 in user relay transport

Open main.cf & add below 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

Now we create the username/password authentication file, using Vi or Nano, create a new file here: /etc/postfix/sasl_passwd, the contents should be as follows:-

[smtp-relay.gmail.com]25 some.user@gmail.com:PASSWORD

You obviously need to replace the above example with your own email address and ‘PASSWORD’ should be replaced with your current Gmail password.

For best practice it is advisable that you change the ownership of the credentials files that you’ve just created and set restrictive permissions so that others with access to the server can not view the Gmail account credentials, lets do this now like so:

chmod 640 /etc/postfix/sasl_passwd*
chown postfix:postfix /etc/postfix/sasl_passwd*

Now we need to rebuild the hash, execute the following command:-

postmap /etc/postfix/sasl_passwd

Now finally, for the changes to take effect lets now restart Postfix so that emails can start being relayed:-

service postfix restart

That is it! – Emails should now route through your Gmail account when the server attempts to send external emails!

Thanks


soundarajan wrote:

==== Required information ====
- iRedMail version: 0.8.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: Centos 6
- Related log if you're reporting an issue:
====

Hi Zhang,

We received a requirement from a client. He wants 30 users to be migrated to google apps. & Rest of the users in iredmail users.

They have configured in google apps saying if user's doesn't exists in google apps forward the mail to iredmail server. Vice versa is not working.

In iredmail server It says unknow user or user doesn't exists..

Waiting for your earlier reply

Thanks

3

Re: Seperating mail users to different mail server

Hi

Additional information. You need to enable smtp relay for your server as described below in google apps

https://support.google.com/a/answer/2956491?hl=en

Thanks

4

Re: Seperating mail users to different mail server

Thanks for sharing.