1 (edited by padiyodi 2014-06-16 02:13:26)

Topic: SMTP Error: SMTP error: Failed to add recipient

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

I installed IredAdmin on my Red Hat server instance, I am trying to send an email with the roudcube UI and and am not able to do so,

The below is an extract from maillog
[root@ip-172-32-51-178 ~]# tail /var/log/maillog
Jun 15 13:30:03 ip-172-32-51-178 postfix/postfix-script[2360]: starting the Postfix mail system
Jun 15 13:30:03 ip-172-32-51-178 postfix/master[2362]: daemon started -- version 2.11.0, configuration /etc/postfix
Jun 15 13:30:44 ip-172-32-51-178 postfix/smtpd[2377]: connect from ip-172-32-51-178.ec2.internal[127.0.0.1]
Jun 15 13:30:44 ip-172-32-51-178 postfix/smtpd[2377]: warning: connect to 127.0.0.1:10031: Connection refused
Jun 15 13:30:44 ip-172-32-51-178 postfix/smtpd[2377]: warning: problem talking to server 127.0.0.1:10031: Connection refused
Jun 15 13:30:45 ip-172-32-51-178 postfix/smtpd[2377]: warning: connect to 127.0.0.1:10031: Connection refused
Jun 15 13:30:45 ip-172-32-51-178 postfix/smtpd[2377]: warning: problem talking to server 127.0.0.1:10031: Connection refused
Jun 15 13:30:45 ip-172-32-51-178 postfix/smtpd[2377]: NOQUEUE: reject: RCPT from ip-172-32-51-178.ec2.internal[127.0.0.1]: 451 4.3.5 Server configuration problem; from=<vivek.a@testgroup.in> to=<vivek.a@testgroup.in> proto=ESMTP helo=<testgroup.in>
Jun 15 13:30:45 ip-172-32-51-178 roundcube: SMTP Error: SMTP error: Failed to add recipient 'vivek.a@testgroup.in' in /var/www/roundcubemail-1.0.1/program/lib/Roundcube/rcube.php on line 1504 (POST /mail/?_task=mail&_unlock=loading1402853510945&_lang=en_US?_task=mail&_action=send)
Jun 15 13:30:45 ip-172-32-51-178 postfix/smtpd[2377]: disconnect from ip-172-32-51-178.ec2.internal[127.0.0.1]

[root@ip-172-32-51-178 ~]# /etc/init.d/iredapd status
iredapd is running.

Below is an extract from ireadpd logs

2014-06-15 13:30:44 DEBUG Connect from 127.0.0.1, port 44932.
2014-06-15 13:30:44 DEBUG smtp session: request=smtpd_access_policy
2014-06-15 13:30:44 DEBUG smtp session: protocol_state=RCPT
2014-06-15 13:30:44 DEBUG smtp session: protocol_name=ESMTP
2014-06-15 13:30:44 DEBUG smtp session: client_address=127.0.0.1
2014-06-15 13:30:44 DEBUG smtp session: client_name=ip-172-32-51-178.ec2.internal
2014-06-15 13:30:44 DEBUG smtp session: reverse_client_name=ip-172-32-51-178.ec2.internal
2014-06-15 13:30:44 DEBUG smtp session: helo_name=testgroup.in
2014-06-15 13:30:44 DEBUG smtp session: sender=vivek.a@testgroup.in
2014-06-15 13:30:44 DEBUG smtp session: recipient=vivek.a@testgroup.in
2014-06-15 13:30:44 DEBUG smtp session: recipient_count=0
2014-06-15 13:30:44 DEBUG smtp session: queue_id=
2014-06-15 13:30:44 DEBUG smtp session: instance=949.539dd844.318f5.0
2014-06-15 13:30:44 DEBUG smtp session: size=0
2014-06-15 13:30:44 DEBUG smtp session: etrn_domain=
2014-06-15 13:30:44 DEBUG smtp session: stress=
2014-06-15 13:30:44 DEBUG smtp session: sasl_method=LOGIN
2014-06-15 13:30:44 DEBUG smtp session: sasl_username=vivek.a@testgroup.in
2014-06-15 13:30:44 DEBUG smtp session: sasl_sender=
2014-06-15 13:30:44 DEBUG smtp session: ccert_subject=
2014-06-15 13:30:44 DEBUG smtp session: ccert_issuer=
2014-06-15 13:30:44 DEBUG smtp session: ccert_fingerprint=
2014-06-15 13:30:44 DEBUG smtp session: ccert_pubkey_fingerprint=
2014-06-15 13:30:44 DEBUG smtp session: encryption_protocol=TLSv1
2014-06-15 13:30:44 DEBUG smtp session: encryption_cipher=ECDHE-RSA-AES256-SHA
2014-06-15 13:30:44 DEBUG smtp session: encryption_keysize=256
2014-06-15 13:30:44 DEBUG --> Apply plugin: sql_alias_access_policy
2014-06-15 13:30:44 DEBUG SQL: SELECT accesspolicy, goto, moderators
            FROM alias
            WHERE
                address='vivek.a@testgroup.in'
                AND address <> goto
                AND domain='testgroup.in'
                AND active=1
            LIMIT 1
   
2014-06-15 13:30:44 DEBUG SQL Record: None
2014-06-15 13:30:44 DEBUG <-- Result: DUNNO (Not mail alias)
2014-06-15 13:30:44 DEBUG --> Apply plugin: sql_user_restrictions
2014-06-15 13:30:44 DEBUG SQL to get restriction rules of sender (vivek.a@testgroup.in):
        SELECT
            allowedrecipients, rejectedrecipients,
            allowedsenders, rejectedsenders
        FROM mailbox
        WHERE username='vivek.a@testgroup.in'
        LIMIT 1
   
2014-06-15 13:30:44 DEBUG Returned SQL Record: (None, None, None, None)
2014-06-15 13:30:44 DEBUG No restrictions of sender.
2014-06-15 13:30:44 DEBUG No restrictions of recipient.
2014-06-15 13:30:44 DEBUG <-- Result: DUNNO
2014-06-15 13:30:44 INFO [127.0.0.1] vivek.a@testgroup.in -> vivek.a@testgroup.in, DUNNO
2014-06-15 13:30:44 DEBUG Connection closed
2014-06-15 13:30:44 DEBUG Closed SQL connection.

While I am running

echo "Test mail from postfix" | mail -s "Test Postfix" shreepad1@gmail.com

I get this email in my gmail box,

This is also the issue when I am returning the email from my gmail id (shreepad1@gmail.com) to say vivek.a@testgroup.in.

I have also added

smtpd_sasl_local_domain = www.testgroup.in in my postfix config and restarted postfix ,

I am assuming there is an access rights issue , need help to debug

==============================================================================================
I was also looking at this particular error in maillog "warning: problem talking to server 127.0.0.1:10031: Connection refused"

I see that this relates to poilicyd and this is not installed on my server

rpm -qi policyd
package policyd is not installed

Should I be installing it, Ideally if there is a need it should have been installed with iredadmin installation, correct ? , If I install it using yum install, should I be backing up any files, lest the new yum install does not override any changes made by iredadmin, thanks

----

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

2

Re: SMTP Error: SMTP error: Failed to add recipient

padiyodi wrote:

Jun 15 13:30:44 ip-172-32-51-178 postfix/smtpd[2377]: warning: connect to 127.0.0.1:10031: Connection refused

Policyd/Cluebringer service is not running. Please start it first.

3

Re: SMTP Error: SMTP error: Failed to add recipient

Thanks Zhang, As I have already communicated, policyd is not installed 

#rpm -qi policyd
package policyd is not installed

Should I be installing it, Ideally if there is a need it should have been installed with iredadmin installation, correct ? , If I install it using yum install, should I be backing up any files, lest the new yum install does not override any changes made by iredadmin, thanks

4

Re: SMTP Error: SMTP error: Failed to add recipient

Do you have "cluebringer" installed?