Thanks for the reply.
Well, I've configured sending mail server to make sure that the problem is not with it. Now I have correct headers and can be sure of that. And now I understand more.
Problem exists in one case only. For example, on my sites server I have domains mydomain1.com, mydomain2.com, mydomain3.com. All these domains have A-record to the sites server and MX-record to the mail server (for example, mail.mymaildomain.com). Hostname of the sites server is mydomain1.com and PTR-record is the same. I'm sure that postfix on sites server doesn't send emails locally because I have another site (for example myotherdomain.com) with google MX, and it works. But if I send email from the sites server to any address at @mydomain1.com or @mydomain2.com or @mydomain3.com it is blocked by iRedMail. Why do I think so? Because:
Feb 12 07:30:32 mail postfix/postscreen[5989]: CONNECT from [SITES_SERVER_IP]:52287 to [MAIL_SERVER_IP]:25
Feb 12 07:30:32 mail postfix/postscreen[5989]: PASS OLD [SITES_SERVER_IP]:52287
Feb 12 07:30:32 mail postfix/smtpd[5992]: connect from mydomain1.com[SITES_SERVER_IP]
Feb 12 07:30:32 mail postfix/smtpd[5992]: NOQUEUE: reject: RCPT from mydomain1.com[SITES_SERVER_IP]: 554 5.7.1 <info@mydomain2.com>: Recipient address rejected: Policy rejection not logged in; from=<www-data@mydomain1.com> to=<info@mydomain2.com> proto=ESMTP helo=<mydomain1.com>
Feb 12 07:30:32 mail postfix/smtpd[5992]: disconnect from mydomain1.com[SITES_SERVER_IP] ehlo=1 mail=1 rcpt=0/1 data=0/1 rset=1 quit=1 commands=4/6
And this log is even more intresting (because mymaildomain.com is not placed at the sites server):
Feb 12 08:32:12 mail postfix/postscreen[6691]: CONNECT from [SITES_SERVER_IP]:52544 to [MAIL_SERVER_IP]:25
Feb 12 08:32:12 mail postfix/postscreen[6691]: PASS OLD [SITES_SERVER_IP]:52544
Feb 12 08:32:12 mail postfix/smtpd[6694]: connect from mydomain1.com[SITES_SERVER_IP]
Feb 12 08:32:12 mail postfix/smtpd[6694]: NOQUEUE: reject: RCPT from mydomain1.com[SITES_SERVER_IP]: 554 5.7.1 <me@mymaildomain.com>: Recipient address rejected: Policy rejection not logged in; from=<www-data@mydomain1.com> to=<me@mymaildomain.com> proto=ESMTP helo=<mydomain1.com>
Feb 12 08:32:12 mail postfix/smtpd[6694]: disconnect from mydomain1.com[SITES_SERVER_IP] ehlo=1 mail=1 rcpt=0/1 data=0/1 rset=1 quit=1 commands=4/6
It seems that iRedMail blocks emails because they are sent from mydomain1.com and does it because the domain mydomain1.com is used in iRedMail. Can you help me to fix it?