1 (edited by sam-the-man 2014-02-06 08:47:23)

Topic: iRedMail unable to send mail to Google Apps

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

Hi Zhang,

iRedMail cannot send email to my google apps account. I must send notifications to google apps from my server. It says the message is sent, but I've confirmed with google apps support that the message isn't being received. (Thus it is not being blocked by their spam system. I've also added my server ip to the google apps white list and as a gateway just in case).

Here are two logs from my mail server: one sends mail successfully to a test account and the other is a mail sent to my own gApps account which is failing. Take a look:

The message you sent to my test account and it was delivered to my Inbox has the following information in the mail log:

Feb 3 01:17:01 node postfix/smtp[25008]: 53FFC13EBA: to=<ana@sbtagent94.info>, relay=aspmx.l.google.com[173.194.64.27]:25,delay=1.5, delays=0/0.01/0.27/1.2, dsn=2.0.0, status=sent (250 2.0.0 OK1391408221 b6si3485695oem.31 - gsmtp)

Messages are delivered to the server aspmx.l.google.com, IP address 173.194.64.27."

- The message you sent to email 'samlevin@googleappsaddr.net' and it's delivered, shows the following information in the mail log:

Jan 27 20:56:46 node postfix/smtp[28904]: 4698113AFB: to=<
samlevin@googleappsaddr.net>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.6,
delays=1.3/0.01/0/0.32, dsn=2.0.0, status=sent (250 2.0.0 from
MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as C931C13E93)
Jan 27 20:56:46 node postfix/qmgr[23354]: 4698113AFB: removed
Jan 27 20:56:46 node postfix/pipe[28909]: C931C13E93: to=<
samlevin@googleappsaddr.net>, relay=dovecot, delay=0.05,
delays=0.01/0.01/0/0.03, dsn=2.0.0, status=sent (delivered via dovecot
service)

Message has a status of sent but in the first line doesn't specify to which server or IP address  and then informs that was delivered to Dovecot.
 
In the first log, which is working; relay=aspmx.l.google.com[173.194.64.27]

In the second log, where I send mail to my googleappsaddr,net, relay=dovecot

Why? My google apps email server does not run dovecot. Why is iRedMail doing this?

Thank you so much, I'm going crazy.

2 (edited by camel1cz 2014-02-06 04:56:58)

Re: iRedMail unable to send mail to Google Apps

Hi,

seems like iRedMail delivers your emails for googleappsaddr.net locally.

Check MX records for googleappsaddr.net - it looks like you have your server as MX server,
and/or
check settings of the domain googleappsaddr.net in iRedMail - it it's not configured to deliver locally.

3

Re: iRedMail unable to send mail to Google Apps

I'm afraid it can't be MX:

http://i59.tinypic.com/2zfssc7.png

I will check other now, but there aren't many settings in iRedMail admin center that can help solve this.

PS I can send mail to all other server fine from my iRedMail server, and I can receive mail fine from googleappsaddr.net - which is very strange to me.

4

Re: iRedMail unable to send mail to Google Apps

OK, MX records are correct, what about the domain setup?
If the email should be delivered to gmail, you shouldn't have your domain configured in iRedMail - make sure, it's not in the iRedMail admin panel.

5

Re: iRedMail unable to send mail to Google Apps

camel1cz wrote:

OK, MX records are correct, what about the domain setup?
If the email should be delivered to gmail, you shouldn't have your domain configured in iRedMail - make sure, it's not in the iRedMail admin panel.

Oh, that's the problem. I'm also using that domain for LDAP, so I need to keep it in iRedMail admin panel.

Firstly, thank you very much! I was starting to go crazy. I'm learning more about this stuff every day.

Second, how can I manually remove the mail alias for that account so I can otherwise keep using it the way I have been?

Thanks very much,
Sam

6

Re: iRedMail unable to send mail to Google Apps

It's not ideal solution, but if you really need to keep the domain setup in your LDAP, you can set the server to act as backup MX for your domain.

You need to set domainBackupMX to yes. After this, your server stops to deliver emails to this domain locally and passes them to gmail.

7 (edited by sam-the-man 2014-02-16 07:04:41)

Re: iRedMail unable to send mail to Google Apps

Friend, where is this service? LDAP option? Why is not ideal? For me is very ideal.

EDIT: Also, I must restart which services after change to see effect?

EDIT 2: Friend, this issue can be fixed by simply removing "mail" entry from "enabledService" in ldap. LDAP account still works but mail isn't routed to dovecot.

Thx!