1

Topic: forwarding not working

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

For some reason alias's /forwarding has stopped working. I have looked in the alias table and all looks like it should be. I see the mail come in to postfix in the maillog.log but don't see it leave to the forwarded server..

Any possible suggestions where to look next ?

----

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

2

Re: forwarding not working

Check Postfix log file please (/var/log/maillog).

3

Re: forwarding not working

ZhangHuangbin wrote:

Check Postfix log file please (/var/log/maillog).

Yep, looked there, that's where I can see the mail coming in to the original address, but I don't see it leave for the forwarded destination. Don't see it come in on the destination server either.

4

Re: forwarding not working

Also as a side note, I have a few aliases for my main address and it seems that some of them have just stopped working too. This shows in maillog

(host mail.<domain name removed>[private/dovecot-lmtp] said: 550 5.1.1 <sysadmin@<domain removed> User doesn't exist: sysadmin@<domain removed> (in reply to RCPT TO command))

Yet i know this alias exists in the alias table..

5

Re: forwarding not working

*) How did you add these mail forwarding and aliases?
*) please show me full Postfix log related to the testing email you sent to the email address which has issue.

6

Re: forwarding not working

ZhangHuangbin wrote:

*) How did you add these mail forwarding and aliases?
*) please show me full Postfix log related to the testing email you sent to the email address which has issue.

Set them up using web UI.

Jun 22 12:22:32 mail postfix/qmgr[8021]: E8CA21FF9FC: from=<address@gmail.com>, size=3736, nrcpt=1 (queue active)
Jun 22 12:22:32 mail postfix/lmtp[8645]: E8CA21FF9FC: to=<address@domain>, relay=mail.domain[private/dovecot-lmtp], delay=1.4, delays=1.2/0.02/0/0.19, dsn=2.0.0, status=sent (250 2.0.0 <address@domain.com.au> QvIlKGhxh1U1IQAAX8bCdg Saved)

That's it coming in, but I don't see it leave for the destination server. I have removed sensitive bits..

I can send mail direct to the address it is supposed to be forwarding to..

7

Re: forwarding not working

Blocker wrote:

Set them up using web UI.

is it iRedAdmin-Pro or iRedAdmin open source edition?

I see you use dovecot-lmtp as lda, any log in /var/log/dovecot-lmtp.log?

8

Re: forwarding not working

ZhangHuangbin wrote:
Blocker wrote:

Set them up using web UI.

is it iRedAdmin-Pro or iRedAdmin open source edition?

I see you use dovecot-lmtp as lda, any log in /var/log/dovecot-lmtp.log?

iRedAdmin-Pro

here is log for dovecot-lmtp:
Jun 22 13:57:46 lmtp(9491): Info: Connect from local
Jun 22 13:57:46 lmtp(9491, <address@domain.com.au): Info: Jw30IbqHh1UTJQAAX8bCdg: sieve: msgid=<CAEgK13pZqzDaUiw1awAvchsthh9T4eB0mZHcn6eo-qfhzv3PKw@mail.gmail.com>: stored mail into mailbox 'INBOX'
Jun 22 13:57:46 lmtp(9491): Info: Disconnect from local: Client quit (in reset)

Seems to store it in the mailbox, but for some reason it won't forward onto the intended destination.. Seems something has gone amiss in main.cf perhaps ?

9

Re: forwarding not working

Which page of iRedAdmin-Pro did you access to set the mail forwarding? Show me the URL (it's ok to remove strings before /iredadmin in url)

10

Re: forwarding not working

ZhangHuangbin wrote:

Which page of iRedAdmin-Pro did you access to set the mail forwarding? Show me the URL (it's ok to remove strings before /iredadmin in url)

https://mail.domain.com.au/iredadmin/pr … ain.com.au

This is the url for editing the forwarding section.
I get to it by selecting the domain in question, then users, then the user in question.. Then there is a "forwarding" section where you set where it should send forwarded mail and whether you keep a copy etc

11

Re: forwarding not working

ok, did a complete rebuild with a new machine, setup a specific test account with a forward to a gmail address  and sent an email to it from gmail. Mail was delivered into test accounts mailbox even tho the "keep a copy" box was unticked and the mail was not forwarded out to gmail.

Not sure what's going on.. All the logs show correct operation except for the forwarding out bit..

12

Re: forwarding not working

Could you please try below steps:

*) Add a new testing user with iRedAdmin-Pro. let's say it's 'testing@domain.com'. Show me output of below SQL commands:

sql> USE vmail;
sql> SELECT * FROM mailbox WHERE username='testing@domain.com' LIMIT 1 \G
sql> SELECT * FROM alias WHERE address='testing@domain.com' LIMIT 1 \G

*) Update user profile and set mail forwarding like before. Then show me output of above SQL commands again.

let's see whether or not iRedAdmin-Pro correctly sets the mail forwarding.

13

Re: forwarding not working

ZhangHuangbin wrote:

Could you please try below steps:

*) Add a new testing user with iRedAdmin-Pro. let's say it's 'testing@domain.com'. Show me output of below SQL commands:

sql> USE vmail;
sql> SELECT * FROM mailbox WHERE username='testing@domain.com' LIMIT 1 \G
sql> SELECT * FROM alias WHERE address='testing@domain.com' LIMIT 1 \G

*) Update user profile and set mail forwarding like before. Then show me output of above SQL commands again.

let's see whether or not iRedAdmin-Pro correctly sets the mail forwarding.

First query result:
*************************** 1. row ***************************
                username: testthis@domain.com.au
                password: {SSHA512}yQIevaWTgxIjhCkhn5yoq9T2xBDnPvPxW3o8WOnbgzljQVR9c7rmdheroH2zxZ4ta3W8g3NKXsTUufTZQ+OiWdr6t2z+zcHg
                    name: Testing Account
                language: en_US
    storagebasedirectory: /mail/vmail
             storagenode: vmail1
                 maildir: domain.com.au/t/e/s/testthis-2015.06.22.22.12.03/
                   quota: 70
                  domain: domain.com.au
               transport:
              department:
                    rank: normal
              employeeid:
                 isadmin: 0
           isglobaladmin: 0
              enablesmtp: 1
       enablesmtpsecured: 1
              enablepop3: 1
       enablepop3secured: 1
              enableimap: 1
       enableimapsecured: 1
           enabledeliver: 1
               enablelda: 1
       enablemanagesieve: 1
enablemanagesievesecured: 1
             enablesieve: 1
      enablesievesecured: 1
          enableinternal: 1
           enabledoveadm: 1
       enablelib-storage: 1
           lastlogindate: 0000-00-00 00:00:00
           lastloginipv4: 0
       lastloginprotocol:
              disclaimer:
      passwordlastchange: 0000-00-00 00:00:00
                 created: 2015-06-22 12:12:03
                modified: 0000-00-00 00:00:00
                 expired: 9999-12-31 00:00:00
                  active: 1
              local_part: testthis
                   bytes: 0
                messages: 0
          allowedsenders:
         rejectedsenders:
       allowedrecipients:
      rejectedrecipients:
              enablelmtp: 1
                settings: NULL
    enableindexer-worker: 1
              allow_nets: NULL
1 row in set (0.00 sec)
-------------------------------------------------------
Second query result:
*************************** 1. row ***************************
     address: testthis@domain.com.au
        goto: testthis@domain.com.au
        name:
  moderators:
accesspolicy:
      domain: domain.com.au
     created: 2015-06-22 12:12:03
    modified: 0000-00-00 00:00:00
     expired: 9999-12-31 00:00:00
      active: 1
      islist: 0
1 row in set (0.00 sec)
----------------------------------------------------------
After adding forward, 1st query result:
*************************** 1. row ***************************
                username: testthis@domain.com.au
                password: {SSHA512}yQIevaWTgxIjhCkhn5yoq9T2xBDnPvPxW3o8WOnbgzljQVR9c7rmdheroH2zxZ4ta3W8g3NKXsTUufTZQ+OiWdr6t2z+zcHg
                    name: Testing Account
                language: en_US
    storagebasedirectory: /mail/vmail
             storagenode: vmail1
                 maildir: domain.com.au/t/e/s/testthis-2015.06.22.22.12.03/
                   quota: 70
                  domain: domain.com.au
               transport:
              department:
                    rank: normal
              employeeid:
                 isadmin: 0
           isglobaladmin: 0
              enablesmtp: 1
       enablesmtpsecured: 1
              enablepop3: 1
       enablepop3secured: 1
              enableimap: 1
       enableimapsecured: 1
           enabledeliver: 1
               enablelda: 1
       enablemanagesieve: 1
enablemanagesievesecured: 1
             enablesieve: 1
      enablesievesecured: 1
          enableinternal: 1
           enabledoveadm: 1
       enablelib-storage: 1
           lastlogindate: 0000-00-00 00:00:00
           lastloginipv4: 0
       lastloginprotocol:
              disclaimer:
      passwordlastchange: 0000-00-00 00:00:00
                 created: 2015-06-22 12:12:03
                modified: 2015-06-22 12:17:51
                 expired: 9999-12-31 00:00:00
                  active: 1
              local_part: testthis
                   bytes: 0
                messages: 0
          allowedsenders:
         rejectedsenders:
       allowedrecipients:
      rejectedrecipients:
              enablelmtp: 1
                settings: NULL
    enableindexer-worker: 1
              allow_nets: NULL
1 row in set (0.00 sec)
-----------------------------------------------------------------
After adding forward, 2nd query result:
*************************** 1. row ***************************
     address: testthis@domain.com.au
        goto: address@gmail.com
        name:
  moderators:
accesspolicy:
      domain: domain.com.au
     created: 2015-06-22 12:17:51
    modified: 0000-00-00 00:00:00
     expired: 9999-12-31 00:00:00
      active: 1
      islist: 0
1 row in set (0.00 sec)
----------------------------------------------------------------

It is adding the forward address to the 'goto' field, however it leaves the 'accesspolicy' blank. That maybe should be public ? In any case, postfix is not forwarding the mail on, even after I update the 'accesspolicy' field to public. Which should only affect it's ability to receive mail as far as I know.

Help you any ?

14

Re: forwarding not working

Mail forwarding setting (SQL record) looks just fine.
Could you please paste me FULL log related to testing email sent to this user (testthis@domain.com.au)?

15

Re: forwarding not working

I tried iRedMail-0.9.2 + iRedAdmin-Pro-SQL-2.1.2, mail forwarding works fine for me.

16

Re: forwarding not working

Hi Zhang,

Seems to be all working now, not sure what happened but seems to have come good overnight. I'll keep an eye on it and if it happens again I'll let you know.

Thanks for your time..

17

Re: forwarding not working

thread closed. Please create a new topic if issue happens again.