1 (edited by aniyan.rajan6 2013-04-21 18:54:11)

Topic: Receive email takes time

After installing iRedmail 0.8.4, I have checked receiving emails from other domain. I sent an email from my gmail account to the postmaster account. It is getting received in postmaster after 15-20 minutes. Why there is a delay ? I use POP in Thunderbird to receive emails send to postmaster. I am sure there is no problem in the Thunderbird side, as the receiving works fine for my other email accounts (gmail).

Thanks.

----

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

2

Re: Receive email takes time

Could you please tell me the reason atleast ?

3 (edited by camel1cz 2013-04-22 23:02:03)

Re: Receive email takes time

Check logs on your server to find out when the email really arrived... I would bet on graylisting

4 (edited by aniyan.rajan6 2013-04-23 08:38:24)

Re: Receive email takes time

camel1cz wrote:

Check logs on your server to find out when the email really arrived... I would bet on graylisting

Yes, I think it is the graylisting causes the delay. To test that , I created a new yahoo email ID and then tried sending an email to my email ID configured in iRedmail. The /var/log/iRedapd.log shows 9 attempts to deliver the email. It has been 8 hours now. The email didn't arrive in the destination Inbox. Please help me to understand how it works. Thanks.

5 (edited by aniyan.rajan6 2013-04-23 09:50:04)

Re: Receive email takes time

There is an update:

I checked /var/log/mail.log and found the following about the mail delivery. Is it because of the DNS settings ? Please help. Thanks.

Apr 23 01:14:31 mydomain postfix/smtpd[30871]: connect from nm14-vm0.bullet.mail.bf1.yahoo.com[98.139.21\
3.164]
Apr 23 01:14:31 mydomain postfix/trivial-rewrite[30875]: warning: do not list domain mydomain.org in BO\
TH mydestination and virtual_mailbox_domains
Apr 23 01:16:11 mydomain postfix/smtpd[30871]: warning: problem talking to server 127.0.0.1:10031: Conne\
ction timed out
Apr 23 01:17:52 mydomain postfix/smtpd[30871]: warning: problem talking to server 127.0.0.1:10031: Conne\
ction timed out
Apr 23 01:17:52 mydomain postfix/smtpd[30871]: NOQUEUE: reject: RCPT from nm14-vm0.bullet.mail.bf1.yahoo\
.com[98.139.213.164]: 451 4.3.5 Server configuration problem; from=<aoeuaoeu123@yahoo.com> to=<abc@mydomain.org> proto=SMTP helo=<nm14-vm0.bullet.mail.bf1.yahoo.com>
Apr 23 01:17:52 mydomain postfix/smtpd[30871]: disconnect from nm14-vm0.bullet.mail.bf1.yahoo.com[98.139\
.213.164]

6

Re: Receive email takes time

aniyan.rajan6 wrote:

Apr 23 01:17:52 mydomain postfix/smtpd[30871]: warning: problem talking to server 127.0.0.1:10031: Connection timed out

Your Policyd service is not running. Please try to start it.

7 (edited by aniyan.rajan6 2013-04-23 12:21:41)

Re: Receive email takes time

Hello Zhang,

Thanks for the reply.

I started it. Now I get the following even if  the destination email ID exist. Please help. Thanks.

Apr 23 04:10:30 mydomain postfix-policyd: starting policyd v1.82
Apr 23 04:10:30 mydomain postfix-policyd: connecting to mysql database: 127.0.0.1
Apr 23 04:10:30 mydomain postfix-policyd: connected..
Apr 23 04:10:36 mydomain postfix/master[1781]: daemon started -- version 2.7.1, configuration /etc/postfix
Apr 23 04:13:04 mydomain postfix/smtpd[1852]: connect from nm23.bullet.mail.bf1.yahoo.com[98.139.212.182]
Apr 23 04:13:04 mydomain postfix/trivial-rewrite[1857]: warning: do not list domain mydomain.org in BOTH mydestination and virtual_mailbox_domains
Apr 23 04:13:04 mydomain postfix-policyd: connection from: 127.0.0.1 port: 38555 slots: 0 of 4096 used
Apr 23 04:13:04 mydomain postfix-policyd: rcpt=1, greylist=new, host=98.139.212.182 (nm23.bullet.mail.bf1.yahoo.com), from=aoeuaoeu123@yahoo.com, to=abc@mydomain.org, size=0
Apr 23 04:13:04 mydomain postfix/smtpd[1852]: NOQUEUE: reject: RCPT from nm23.bullet.mail.bf1.yahoo.com[98.139.212.182]: 450 4.7.1 <abc@mydomain.org>: Recipient address rejected: Policy Rejection- Please try later.; from=<aoeuaoeu123@yahoo.com> to=<abc@mydomain.org> proto=ESMTP helo=<nm23.bullet.mail.bf1.yahoo.com>
Apr 23 04:13:05 mydomain postfix/smtpd[1852]: disconnect from nm23.bullet.mail.bf1.yahoo.com[98.139.212.182]

8

Re: Receive email takes time

aniyan.rajan6 wrote:

Apr 23 04:13:04 mydomain postfix/smtpd[1852]: NOQUEUE: reject: RCPT from nm23.bullet.mail.bf1.yahoo.com[98.139.212.182]: 450 4.7.1 <abc@mydomain.org>: Recipient address rejected: Policy Rejection- Please try later.; from=<aoeuaoeu123@yahoo.com> to=<abc@mydomain.org> proto=ESMTP helo=<nm23.bullet.mail.bf1.yahoo.com>

You issue was solved, this is caused by greylisting (service provided by Policyd). Just wait for several minutes to receive the email.
Refer to http://greylisting.org/ for more details about greylisting.

9

Re: Receive email takes time

Zhang,

Yes, I have received the email after sometime. I personally like the greylisting feature, as it is a good method to reject the spams. But I have 2 questions:

1. Why the emails are getting too much delayed ? It took more than an hour for me to receive an email that is sent from gmail.com. What is the condition for a pass ? Is it possible to reduce the delay ? Or is it depend on the "try again" delay made by the sender's email server (gmail.com here).

2. I am still getting the following warning in the /var/log/mail.log. How can I fix this ? By changing mydestination or virtual_mailbox_domains ?

Apr 23 01:14:31 mydomain postfix/trivial-rewrite[30875]: warning: do not list domain mydomain.org in BOTH mydestination and virtual_mailbox_domains

Thanks.

10

Re: Receive email takes time

aniyan.rajan6 wrote:

1. Why the emails are getting too much delayed ? It took more than an hour for me to receive an email that is sent from gmail.com. What is the condition for a pass ? Is it possible to reduce the delay ? Or is it depend on the "try again" delay made by the sender's email server (gmail.com here).

You have to read http://greylisting.org/ to answer these questions, all are clearly explained.
The delay depends on sender (e.g. Gmail, Hotmail), not your server or Policyd setting. This is how greylisting works.

Question 2 was answered in your another post: http://www.iredmail.org/forum/post21659.html#p21659

11 (edited by aniyan.rajan6 2013-04-24 19:55:00)

Re: Receive email takes time

ZhangHuangbin wrote:

Question 2 was answered in your another post: http://www.iredmail.org/forum/post21659.html#p21659

You should fix this issue first. For example, use a different server hostname, then update Postfix "mydestination" setting in /etc/postfix/main.cf also.

I have set the hostname to the existing one because the iRedMail installation tutorials are asking to do so, before the installation starts. Please see:

https://www.digitalocean.com/community/ … -12-10-x64
http://www.iredmail.org/install_iredmail_on_ubuntu.html

"If you have a domain name you want to use, name your droplet as that domain name, which will become its hostname and reverse DNS record."

So I have set  the server hostname  (For example, mydomain.org) before the iRedmail installation. If I change the hostname now and update the "mydestination" line with the new hostname, will it make any conflict in the configurations (iRedmail configuration and DNS configuration) ?

Please clarify. Thanks.

12

Re: Receive email takes time

The WARNING message shown during iRedMail installation wizard is: "It (the first virtual mail domain) cannot be the same as server hostname". http://www.iredmail.org/install_iredmail_on_ubuntu.html

aniyan.rajan6 wrote:

If I change the hostname now and update the "mydestination" line with the new hostname, will it make any conflict in the configurations (iRedmail configuration and DNS configuration) ?

Not updating "mydestination", but "myhostname" in Postfix main.cf. No conflict.

13

Re: Receive email takes time

Yes I remember that option and I entered the same value for both, because the DigitalOcean's tutorial confused me.

So as I have already entered a value for "Virtual Domain", you want me to change the Server's Hostname and then update it in "myhostname" in Postfix main.cf. Am I correct ?

( I hope I will be able to receive the emails using the format "abc@mydomain.org" and use the same DNS settings, after this update )

Thanks.

14

Re: Receive email takes time

aniyan.rajan6 wrote:

So as I have already entered a value for "Virtual Domain", you want me to change the Server's Hostname and then update it in "myhostname" in Postfix main.cf. Am I correct ?

You can try another way: remove "$myhostname" from "mydestination" setting. For example:

*) Original setting in iRedMail should looks like this:

mydestination="$myhostname, localhost, localhost.localdomain, localhost.$myhostname"

*) You can simply remove "$myhostname" in it. The final value looks like this:

mydestination="localhost, localhost.localdomain, localhost.$myhostname"

Then reload or restart Postfix service.

15 (edited by aniyan.rajan6 2013-04-25 09:55:59)

Re: Receive email takes time

ZhangHuangbin wrote:

You can simply remove "$myhostname" in it. The final value looks like this:

mydestination="localhost, localhost.localdomain, localhost.$myhostname"

Then reload or restart Postfix service.

Yes I have tried this yesterday and those warnings are gone now. I am confused at the moment, thinking which one is the perfect fix. There are three methods now:

1. Changing the hostname and update the myhostname value. (you suggested first)
2. Deleting the myhostname token from mydestination line. (you suggested second).
3. I saw in the internet that I can update the Virtual Domain value in the  mysql db.

I'm sorry if I am bothering you, but I am a little research oriented.

:-)