1 (edited by it-vts 2015-06-17 15:54:17)

Topic: Policy rejection 550 Sender after upgrade IredMail from 0.90 to 0.91

==== Required information ====
- iRedMail version: 0.91
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx):Apache
- Linux/BSD distribution name and version: debian 7.8
- Related log if you're reporting an issue:
================================

Hello everyone! Something wrong with my server, after upgrade from 0.90 to 0.91.

When I send mail to some servers, I get a letter of response:

Jun 16 11:17:19 mail postfix/smtp[9755]: CD98A60218: to=<remoteuser@domain.com>, relay=relay.domain.com[211.222.50.34]:25, delay=2.9, delays=0.05/0.02/2.5/0.24, dsn=5.0.0, status=bounced (host relay.domain.com[211.222.50.34] said: 550-Verification failed for <myuser@mydomain.ru> 550-Called: 90.200.110.204 550-Sent: RCPT TO:<myuser@mydomain.ru> 550-Response: 554 5.7.1 <myuser@mydomain.ru>: Recipient address rejected: Policy rejection 550 Sender verify failed (in reply to MAIL FROM command))

Log on Remote Side:

Trying 90.200.110.204...
Connected to mail.mydomain.ru
Escape character is '^]'.
220 mail.mydomain.ru
ESMTP Postfix (Debian/GNU)
helo domain.com
250 mail.mydomain.ru
mail from:<>
250 2.1.0 Ok
rcpt to:<dropuser@mydomain.ru>
554 5.7.1 <dropuser@mydomain.ru>: Recipient address rejected: Policy rejection

On the old version of IredMail (0.90) everything works: What I did to upgrade:

File: /etc/iredmail-release
0.9.1

1) Upgrade Roundcube
apt-get update
apt-get upgrade

apt-get install php-pear php5-intl
php5enmod intl
service apache2 restart

cd /tmp
tar xf roundcubemail-*.tar.gz

mysql -u root -p
use roundcubemail;
GRANT ALTER ON `identities` TO 'roundcube'@'localhost';
\q

cd roundcubemail*
./bin/installto.sh /usr/share/apache2/roundcubemail

cd /usr/share/apache2
mv /usr/share/apache2/roundcubemail-1.0.4 roundcubemail-1.1.1
rm -i /usr/share/apache2/roundcubemail
cd /usr/share/apache2/
ln -s roundcubemail-1.1.1 roundcubemail

2) Fixed: return receipt response rejected by iRedAPD plugin reject_null_sender

nano /usr/share/apache2/roundcubemail/config/config.inc.php

$config['mdn_use_from'] = true;

service apache2 restart

3) iredapd

cd /root
tar xjf iRedAPD-*.bz2
cd iRedAPD*/tools/
bash upgrade_iredapd.sh

4) iredadmin

cd /root/
tar xjf iRedAdmin*.bz2
cd iRedAdmin*/tools/
bash upgrade_iredadmin.sh

5) Bypass greylisting for some big ISPs

cd /tmp
wget https://bitbucket.org/zhb/iredmail/raw/ … telist.sql

mysql -u root -p
mysql> USE cluebringer;
mysql> SOURCE /tmp/greylisting-whitelist.sql;

6)  drop retired column in Amavisd database!!!

mysql> USE amavisd;
mysql> ALTER TABLE policy DROP COLUMN spam_modifies_subj;
\q

7) phpmyadmin

cp -a /usr/share/phpmyadmin /tmp
cp /usr/share/phpmyadmin/config.inc.php /tmp
rm -rf /usr/share/phpmyadmin
cd /tmp
tar xjf phpMyAdmin-4.4.8-all-languages.tar.bz2 -C /usr/share
cd /usr/share
mv phpMyAdmin-4.4.8-all-languages phpmyadmin
cp /tmp/config.inc.php /usr/share/phpmyadmin
service apache2 restart

Please HELP!!!!

----

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

2

Re: Policy rejection 550 Sender after upgrade IredMail from 0.90 to 0.91

It's caused by iRedAPD plugin 'reject_null_sender'. Normal email should have valid sender and recipient addresses.

3

Re: Policy rejection 550 Sender after upgrade IredMail from 0.90 to 0.91

ZhangHuangbin wrote:

It's caused by iRedAPD plugin 'reject_null_sender'. Normal email should have valid sender and recipient addresses.

I disabled this plugin in /opt/iRedAPD-1.6.0/settings.py
/etc/init.d/iredapd restart

and remove settings in /usr/share/apache2/roundcubemail/config/config.inc.php
// $config['mdn_use_from'] = true;

service apache2 restart

But, what's weird is that some of the addresses goes fine, without errors, and with one address, there still comes a letter with error:

"Recipient address rejected: Policy rejection 550 Sender verify failed (in reply to MAIL FROM command))"


ZhangHuangbin what would you recommend in my situation - activate 'reject_null_sender' and add my domain in white list of other side? or what?

4

Re: Policy rejection 550 Sender after upgrade IredMail from 0.90 to 0.91

it-vts wrote:

and remove settings in /usr/share/apache2/roundcubemail/config/config.inc.php
// $config['mdn_use_from'] = true;

Enabling this is recommended, because it will have a valid sender address in email.

The only change required to avoid this issue is disabling 'reject_null_sender' plugin in /opt/iredapd/settings.py, but this is not the good/ideal solution. what I want to know is, how you sent email, and sent to which mail server? How to reproduce this issue? I think there's something wrong with email sending.

5 (edited by it-vts 2015-06-17 23:13:43)

Re: Policy rejection 550 Sender after upgrade IredMail from 0.90 to 0.91

ZhangHuangbin wrote:
it-vts wrote:

and remove settings in /usr/share/apache2/roundcubemail/config/config.inc.php
// $config['mdn_use_from'] = true;

Enabling this is recommended, because it will have a valid sender address in email.

The only change required to avoid this issue is disabling 'reject_null_sender' plugin in /opt/iredapd/settings.py, but this is not the good/ideal solution. what I want to know is, how you sent email, and sent to which mail server? How to reproduce this issue? I think there's something wrong with email sending.

OK, I understand, but why in old iredmail version (0.09) everything worked, although the plug-in settings in /opt/iRedAPD-1.4.0/settings.py was activated.

I'm send from Roundcube and Thunderbird. Remote server is EXIM. I can send the server name in a PM or e-mail?

6

Re: Policy rejection 550 Sender after upgrade IredMail from 0.90 to 0.91

iRedAPD plugin `reject_null_sender` has stricter restriction in iRedAPD-1.6.0, if a smtp session doesn't contain sender or sasl username, it will reject this smtp session. That's why it doesn't work in this case.