1

Topic: rsync mailbox is not getting new emails

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): V0.9.9
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version: Ubuntu 18.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Rsync is not getting new emails from production server /var/vmail/vmail1 user mailbox to secondary server /var/vmail/vmail1. But, when i manually copy the user mailboxes from production server to secondary server and tried to login to my email in secondary server, i can see all the new emails.

below is the rsync command from crontab.
#*/15 * * * * rsync -av /root/nas/iredmail-vmail/mydomain.com/ /var/vmail/vmail1/mydomain.com/

Any help is highly appreciated.

Thanks.
JunG

2

Re: rsync mailbox is not getting new emails

- You comment out this cron task, is it on purpose?
- Try to run the command manualy, does it sync new messages?

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

3

Re: rsync mailbox is not getting new emails

ZhangHuangbin wrote:

- You comment out this cron task, is it on purpose?  I just commented it out because it's not getting new mails from production.
- Try to run the command manualy, does it sync new messages?

Still not getting new mails, but when i manually copied the mailboxes and paste it in secondary server then, that's the time that i can all new mails.

4

Re: rsync mailbox is not getting new emails

You didn’t answer those 2 questions in my previous reply. sad

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

5

Re: rsync mailbox is not getting new emails

ZhangHuangbin wrote:

You didn’t answer those 2 questions in my previous reply. sad

Hi ZhangHuangbin,

Thanks for your swift reply:

Answer to your question:
1. - You comment out this cron task, is it on purpose?
Ans: Yes, i just commented this out because it's not getting new mail.

2. Try to run the command manualy, does it sync new messages?
Ans: I did run the "rsync -av /root/nas/iredmail-vmail/mydomin.com/ /var/vmail/vmail1/mydomain.com/" but still, not getting new email

Note:
a. when i manually copied the user mailbox from production and paste it in secondary server, the new email was there.
b. I'm using rsync to syncronized file from my 4 remote ubuntu 18.04 server to my ubuntu 18.04 server here in our DataCenter and it's working fine.

Any help?

Thanks.
JunG

6

Re: rsync mailbox is not getting new emails

jung wrote:

2. Try to run the command manualy, does it sync new messages?
Ans: I did run the "rsync -av /root/nas/iredmail-vmail/mydomin.com/ /var/vmail/vmail1/mydomain.com/" but still, not getting new email

Is this command correct? no permission issue or whatever? If there's no email, rsync should find it. So our problem is now why rsync didn't find new emails?

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

7

Re: rsync mailbox is not getting new emails

ZhangHuangbin wrote:
jung wrote:

2. Try to run the command manualy, does it sync new messages?
Ans: I did run the "rsync -av /root/nas/iredmail-vmail/mydomin.com/ /var/vmail/vmail1/mydomain.com/" but still, not getting new email

Is this command correct? no permission issue or whatever? If there's no email, rsync should find it. So our problem is now why rsync didn't find new emails?

Hi Zhang,

Yes, that rsync command is correct and running it as root. in fact, what i did, just to make sure it work is that, i created a jung@mydomain.com new email in the production server and tried sending test email so as to make sure that there is 1 mail in sent box. then, i ran  that script in secondary server and able to copy the "jung" profile. But, when i login to jung@mydomain.com in secondary server, found no mail in sent box....
But, when i manually copy the vmail1 from prod server to secondary server there is 1 mail in sent box.

Thanks.
JunG

8

Re: rsync mailbox is not getting new emails

- Please make sure the synced files has correct file owner/group and permission. File mail message, it must be owned by user/group "vmail:vmail" with permission 0700.
- You should add rsync arguments to preserve file owner/group/permission/timestamp like below:

rsync --owner --group --perms --times ...

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

9

Re: rsync mailbox is not getting new emails

ZhangHuangbin wrote:

- Please make sure the synced files has correct file owner/group and permission. File mail message, it must be owned by user/group "vmail:vmail" with permission 0700.
- You should add rsync arguments to preserve file owner/group/permission/timestamp like below:

rsync --owner --group --perms --times ...

Hi Zhang,

I added some arguments but still not working.. anyway, kindly close this post. i will try another way to make it work...

Thank you so much for your time...
JunG