1 (edited by ppnm 2017-06-01 14:33:39)

Topic: The problem with the Email Forwarding

==== Required information ====
- iRedMail version (check /etc/iredmail-release): iRedMail-0.9.6 MARIADB edition
- Linux/BSD distribution name and version: CentOS Linux release 7.3.1611 (Core)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL - Mariadb-server 5.5.52
- Web server (Apache or Nginx): Nginx 1.10.2
- Manage mail accounts with iRedAdmin-Pro? Yes. iRedAdmin-Pro-SQL-2.6.0
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hi,

I have a problem with email forwarding:
user1@domain1 send mail to user2@MYDOMAIN;
this email must be redirected to user3@domain1
user1 and user3 have accounts in one domain.

The mail was not redirected. The sender receives an answer from MAILER-DAEMON@MYDOMAIN:

«This is the mail system at host MYDOMAIN.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
                   The mail system
<user3@domain1>: host domain1[ip-address] said: 530 5.7.1
    Authentication required for <user1@domain1> (in reply to MAIL FROM command)»

I'm trying to enable e-mail forwarding
1) through the admin panel iRedAdmin-Pro;
2) through the user interface Roundcube Webmail 1.2.4
3) through the SQL-server. I did this as described in  http://www.iredmail.org/forum/topic2102 … ow-to.html
But I haven’t  "username" in table "vmail.alias". I used
mysql> UPDATE alias SET goto='user3@domain1' WHERE address='user2@MYDOMAIN';
mysql> UPDATE alias SET active='1' WHERE address='user2@MYDOMAIN';
Is it correct?

Nevertheless, the result was the same: the mail with error from   MAILER-DAEMON@MYDOMAIN

Tottally, forwarding
user1@domain1 -> user2@mydomain -> user3@domain3 is worked
user1@domain1 -> user2@mydomain -> user3@domain1 doesn't worked

Please, tell me, this is a software error, or I do something wrong?

----

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

2

Re: The problem with the Email Forwarding

With bcc http://www.iredmail.org/docs/monitor.in … h.bcc.html

3

Re: The problem with the Email Forwarding

We take MySQL backend for example, but the SQL commands should work with PostgreSQL too.
I tried to set up "BCC incoming emails to other address"=user3@domain1 for the account user2@MYdomain. I send mail from user3@domain1 to  user2@MYdomain.

user2@MYdomain received a message, and the user3@domain1 did not receive.
iRedAdmin-Pro was used for this.The situation has not changed.

4 (edited by ppnm 2017-06-02 16:54:55)

Re: The problem with the Email Forwarding

Forwarding with copying in local mailbox
sender1@domain1.com -> user@MYDOMAIN.com -> recipient@domain1.com
Log from /var/log/maillog


Jun  2 10:50:51 relay postfix/10025/smtpd[43894]: connect from host.mydomain.com[127.0.0.1]
Jun  2 10:50:51 relay postfix/10025/smtpd[43894]: 80BA87C91B: client=host.mydomain.com[127.0.0.1]
Jun  2 10:50:51 relay postfix/cleanup[43896]: 80BA87C91B: message-id=<fdfb54f6-4629-dca0-d54d-5c8526f698bf@MYDOMAIN.com>
Jun  2 10:50:51 relay postfix/10025/smtpd[44007]: connect from host.mydomain.com[127.0.0.1]
Jun  2 10:50:51 relay postfix/10025/smtpd[44007]: 922F97C91C: client=host.mydomain.com[127.0.0.1]
Jun  2 10:50:51 relay postfix/qmgr[11920]: 80BA87C91B: from=<sender1@domain1.com>, size=1781, nrcpt=1 (queue active)
Jun  2 10:50:51 relay postfix/10025/smtpd[43894]: disconnect from host.mydomain.com[127.0.0.1]
Jun  2 10:50:51 relay postfix/cleanup[43884]: 922F97C91C: message-id=<fdfb54f6-4629-dca0-d54d-5c8526f698bf@MYDOMAIN.com>
Jun  2 10:50:51 relay amavis[42726]: (42726-16) Passed CLEAN {RelayedInternal}, MYNETS LOCAL [192.168.100.99]:53389 <sender1@domain1.com> -> <recipient@domain1.com>, Queue-ID: 3C2797C91A, Message-ID: <fdfb54f6-4629-dca0-d54d-5c8526f698bf@MYDOMAIN.com>, mail_id: J4eJG3toE1_j, Hits: -, size: 1275, queued_as: 80BA87C91B, 266 ms
Jun  2 10:50:51 relay postfix/smtp-amavis/smtp[43936]: 3C2797C91A: to=<recipient@domain1.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.45, delays=0.13/0/0.01/0.31, 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 80BA87C91B)
Jun  2 10:50:51 relay postfix/10025/smtpd[44007]: disconnect from host.mydomain.com[127.0.0.1]
Jun  2 10:50:51 relay postfix/qmgr[11920]: 922F97C91C: from=<sender1@domain1.com>, size=1793, nrcpt=1 (queue active)
Jun  2 10:50:51 relay amavis[42703]: (42703-15) Passed CLEAN {RelayedInternal}, MYNETS LOCAL [192.168.100.99]:53389 <sender1@domain1.com> -> <user@MYDOMAIN.com>, Queue-ID: 3C2797C91A, Message-ID: <fdfb54f6-4629-dca0-d54d-5c8526f698bf@MYDOMAIN.com>, mail_id: 0YLgWnii95xu, Hits: -, size: 1275, queued_as: 922F97C91C, 354 ms
Jun  2 10:50:51 relay postfix/smtp-amavis/smtp[44003]: 3C2797C91A: to=<user@MYDOMAIN.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.57, delays=0.13/0.04/0.01/0.4, 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 922F97C91C)
Jun  2 10:50:51 relay postfix/qmgr[11920]: 3C2797C91A: removed
Jun  2 10:50:51 relay postfix/smtp[44008]: Untrusted TLS connection established to MYDOMAIN.com[192.168.100.99]:25: TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)
Jun  2 10:50:51 relay postfix/smtp[44008]: 80BA87C91B: to=<recipient@domain1.com>, relay=MYDOMAIN.com[192.168.100.99]:25, delay=0.32, delays=0.08/0.04/0.19/0.01, dsn=5.7.1, status=bounced (host MYDOMAIN.com[192.168.100.99] said: 530 5.7.1 Authentication required for <sender1@domain1.com> (in reply to MAIL FROM command))
Jun  2 10:50:51 relay postfix/cleanup[43896]: ED26E7C91A: message-id=<20170602075051.ED26E7C91A@host.mydomain.com>
Jun  2 10:50:52 relay postfix/qmgr[11920]: ED26E7C91A: from=<>, size=3923, nrcpt=1 (queue active)
Jun  2 10:50:52 relay postfix/bounce[44010]: 80BA87C91B: sender non-delivery notification: ED26E7C91A
Jun  2 10:50:52 relay postfix/qmgr[11920]: 80BA87C91B: removed
Jun  2 10:50:52 relay postfix/pipe[43898]: 922F97C91C: to=<user@MYDOMAIN.com>, relay=dovecot, delay=0.47, delays=0.13/0.01/0/0.33, dsn=2.0.0, status=sent (delivered via dovecot service)
Jun  2 10:50:52 relay postfix/qmgr[11920]: 922F97C91C: removed
Jun  2 10:50:52 relay postfix/smtp[44008]: Untrusted TLS connection established to MYDOMAIN.com[192.168.100.99]:25: TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)
Jun  2 10:50:52 relay postfix/smtp[44008]: ED26E7C91A: to=<sender1@domain1.com>, relay=MYDOMAIN.com[192.168.100.99]:25, delay=0.31, delays=0.07/0.01/0.19/0.04, dsn=2.0.0, status=sent (250 2.0.0 Message accepted for delivery (4086 octets). id: FC167DCC80F3477C962C12629E9CFBF1)