1

Topic: Demo/Evaluation version of iRedmail for Mobile App

Im planning to setup a iRedmail server as an email server for my mobile application.  My mobile application talks to the email server on the backend.

1) Do you have a evaluation/demo version of iredmail to install and test the features I'm looking for before i can buy the license?

2) I tried logging into the the demo version of iredmail demo online but did not see options for sieve rule filters.  Is there a demo version to test the sieve rules  "searching a particular text on subject field and moving the emails to a folder based on string match globally for all users".

3) What is the difference between LDAP and SQL versions?  What would be the best option in my case as the mobile application will talk to the email server?

4) Do you have API's for the user to signup automatically instead of admin creating the email ids?

----

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

2

Re: Demo/Evaluation version of iRedmail for Mobile App

bhupeshduggi wrote:

1) Do you have a evaluation/demo version of iredmail to install and test the features I'm looking for before i can buy the license?

What features are you looking for? If you have a list of requirements, it will be easier for you to get an answer directly. (of course you still need to test it yourself.)

The paid product - iRedAdmin-Pro - is a full-featured web admin panel, you can try on our demo site:
https://www.iredmail.org/admin_demo.html

No webmail demo yet, but it's included in the iRedMail. If you deploy iRedMail on a virtual machine, you will get it.

bhupeshduggi wrote:

2) I tried logging into the the demo version of iredmail demo online but did not see options for sieve rule filters.  Is there a demo version to test the sieve rules  "searching a particular text on subject field and moving the emails to a folder based on string match globally for all users".

It's a feature on webmail application, not the admin panel.

bhupeshduggi wrote:

3) What is the difference between LDAP and SQL versions?  What would be the best option in my case as the mobile application will talk to the email server?

If you're not familiar with LDAP, then SQL version will be better for you.
OpenLDAP is not same / familiar with SQL server.

bhupeshduggi wrote:

4) Do you have API's for the user to signup automatically instead of admin creating the email ids?

Not yet. sorry.

3

Re: Demo/Evaluation version of iRedmail for Mobile App

Hi Zhang...Thanks for your reply. In continuation to your Here are the features im looking for my application.

1) I want to search for a specific string on the subject field and if the match is found, move the email to a particular predefined folder say "Test".  I want this feature to be enabled for all users within the domain so that the feature is similar for all the users.  My Mobile application will be pointed to the "Test" folder to read the emails which matches the string criteria.  So i should be able to write sieve rules such a way that the rule applies to all users in domain at admin level rather than individual users at user level.
You mentioned i should be able to do this using webmail.  Does it mean can i login to webmail as admin and enable sieve rules for all users within domain?
Also when you refer webmail, is it different from Roundcube used by users?

4

Re: Demo/Evaluation version of iRedmail for Mobile App

bhupeshduggi wrote:

You mentioned i should be able to do this using webmail.  Does it mean can i login to webmail as admin and enable sieve rules for all users within domain?

You can setup a global sieve rule for this purpose, then no need to setup same rule for each user.

bhupeshduggi wrote:

Also when you refer webmail, is it different from Roundcube used by users?

Sorry, what do you mean "different"?

5

Re: Demo/Evaluation version of iRedmail for Mobile App

Hi Zhang...Thanks again.  I installed iredmail on VM.  I had setup some filters on round cube and they apply only for individual user.  How can i setup global sieve rules which applies to all users?  Do i need to enable "sieve rules" plugin or "manage sieve" plugin should be enough to write global rules?  Do you have any document which helps to write global sieve rules?

6

Re: Demo/Evaluation version of iRedmail for Mobile App

bhupeshduggi wrote:

How can i setup global sieve rules which applies to all users?

Check the file specified in Dovecot parameter "sieve_before =" in /etc/dovecot/dovecot.conf, then add your sieve filter in that file. That's it.

bhupeshduggi wrote:

Do i need to enable "sieve rules" plugin or "manage sieve" plugin should be enough to write global rules?

It's enabled by default.

bhupeshduggi wrote:

Do you have any document which helps to write global sieve rules?

- https://wiki2.dovecot.org/Pigeonhole/Sieve/Examples
- RFC: https://tools.ietf.org/html/rfc5228

7 (edited by bhupeshduggi 2017-12-12 22:13:44)

Re: Demo/Evaluation version of iRedmail for Mobile App

Thanks for the document.  I created some global Sieve rules.  How should i apply those global sieve rules?  On which file should i write these global sieve rules?

I tried on below file but they do not work.

/var/lib/dovecot/sieve/default.sieve

Also some articles mentioned about the below file but i cannot write any rules to this file as it says i cannot write to this file.

/etc/dovecot/sieve/default.sieve

8

Re: Demo/Evaluation version of iRedmail for Mobile App

You just ignored my previous reply.

ZhangHuangbin wrote:

Check the file specified in Dovecot parameter "sieve_before =" in /etc/dovecot/dovecot.conf, then add your sieve filter in that file. That's it.

9

Re: Demo/Evaluation version of iRedmail for Mobile App

Hi Zhang....

That works....thanks for that....

Is there a way to create a folder like "Important" globally for all users at server level?  As and when i create a user that user should have this folder "Important" along with all other folders like Inbox etc.., 

Can we do this globally for all users so each user gets his own personal "Important" folder?

10

Re: Demo/Evaluation version of iRedmail for Mobile App

*) Open file /etc/dovecot/dovecot.conf, search "mailbox Sent {". Copy it and replace the name by "Important", that's all.
*) Add a global sieve rule to match the message you want to move, then move.

11

Re: Demo/Evaluation version of iRedmail for Mobile App

Hi Zhang,

Thanks again for you reply.  I tried based on your instructions.  I copied the Sent folder script for folder "Important" in between Junk and Archive section as mentioned below.  However when i create a new user, i did not see important folder created in his mailbox when i logged in through roundcube.  I rebooted the server to see if that would help and after the reboot i lost access to web access both admin and round cube users and it was throwing error "connection to storage server failed".

I removed the "Important" folder script which i added and rebooted the server again and I'm able to login now using round cube.

Could you please see if I'm using the right syntax and placing it on the right file?

vim /etc/dovecot/dovecot.conf

    mailbox "Junk E-mail" {
        auto = no
        special_use = \Junk
    }
  mailbox Important {
        auto = subscribe
        special_use = \Important
    }
    # Archive
    mailbox Archive {
        auto = no
        special_use = \Archive
    }

12

Re: Demo/Evaluation version of iRedmail for Mobile App

It works for me without "special_use = \Important".

13

Re: Demo/Evaluation version of iRedmail for Mobile App

Hi Zhang...Thanks for the reply and all your support.  I tried without "special_use" and then it works. 

Is it possible to write "And" filter in Sieve rules?  Like checking a particular string (abc) on subject field "AND" checking a string (xyz) on body of the email?   I was reviewing the sieve rules document but could not find any thing related to AND conditions.  I can only see the sieve rules where it checks only one condition.  If it is not possible with sieve rules, do you have any recommendations?

14

Re: Demo/Evaluation version of iRedmail for Mobile App

bhupeshduggi wrote:

Is it possible to write "And" filter in Sieve rules?

Sure.

It's better generate sieve rules with Roundcube webmail. If you really prefer generating without any web/GUI applications, at least generate one with Roundcube webmail and learn from it.

15

Re: Demo/Evaluation version of iRedmail for Mobile App

ZhangHuangbin wrote:
bhupeshduggi wrote:

Is it possible to write "And" filter in Sieve rules?

Sure.

It's better generate sieve rules with Roundcube webmail. If you really prefer generating without any web/GUI applications, at least generate one with Roundcube webmail and learn from it.

Hi Zhang,
I tried looking at the syntax on the Roundcube webmail but i did not see right syntax for my requirements.  Appreciate if you can help me or direct me to the documentation where i can look for the right resources to setup AND filter on Sieve rules.
What I'm seeing currently on Roundcube webmail is provided below.  I also looked on some documents on internet but no luck.  It can search "any of" or "all of" in both the subject and body messages for all the conditions.  But in my case I'm looking for match with any of the condition.

Current Roundcube Syntax:
1)
require ["body","fileinto"];
if allof (header :contains "subject" "abc", header :contains "subject" "def", body :text :contains "123", body :text :contains "456")
{
    fileinto "Important";
}
2)
require ["body","fileinto"];
if anyof (header :contains "subject" "abc", header :contains "subject" "def", body :text :contains "123", body :text :contains "456)
{
    fileinto "Important";
}

However

My requirement:

if anyof (header :contains "subject" "abc", header :contains "subject" "def")
AND
if anyof (body :text :contains "123", body :text :contains "456)
fileinto "Important";

This AND condition match is something key for my requirement as i need to search both subject and body.

Appreciate all your support.

16

Re: Demo/Evaluation version of iRedmail for Mobile App

Seems the Roundcube UI doesn't support this. You have to modify the sieve rule file manually.

17

Re: Demo/Evaluation version of iRedmail for Mobile App

Hi Zhang,
Appreciate all your help so far.
We have a web application which wants to make a call to the user mailbox folders and display the emails within that folder on the web application.  It is similar to roundcube but we want to use our own web application instead of round cube.  Can our web application make a call to the mail server and pull the contents of the folder and display emails?  If so where should we point our web server to the email server (path)?

If respective folders is not possible, can web server make a call and pull the entire user mailbox?  If so where should we point our webserver to make a call to email server to pull the contents of the mailbox for that respective user?

Also can the web server authenticate with the email server LDAP database before pulling the mailbox contents after successful authentication?

18

Re: Demo/Evaluation version of iRedmail for Mobile App

bhupeshduggi wrote:

Can our web application make a call to the mail server and pull the contents of the folder and display emails?

Just use standard IMAP protocol.

19 (edited by bhupeshduggi 2018-08-29 01:20:05)

Re: Demo/Evaluation version of iRedmail for Mobile App

ZhangHuangbin wrote:
bhupeshduggi wrote:

Can our web application make a call to the mail server and pull the contents of the folder and display emails?

Just use standard IMAP protocol.

So where should we point the IMAP query?  Do you have information about the destination path or folders on the Mail server we need to point the IMAP query from the web server?

20

Re: Demo/Evaluation version of iRedmail for Mobile App

bhupeshduggi wrote:
ZhangHuangbin wrote:
bhupeshduggi wrote:

Can our web application make a call to the mail server and pull the contents of the folder and display emails?

Just use standard IMAP protocol.

So where should we point the IMAP query?  Do you have information about the destination path or folders on the Mail server we need to point the IMAP query from the web server?

Hi Zang,

What TCP/UDP ports do we need to permit to the email server from application server to do a IMAP query.  Do you have any document which details about services need to permit?

21

Re: Demo/Evaluation version of iRedmail for Mobile App

FYI: https://docs.iredmail.org/network.ports.html

22

Re: Demo/Evaluation version of iRedmail for Mobile App

ZhangHuangbin wrote:
bhupeshduggi wrote:

Can our web application make a call to the mail server and pull the contents of the folder and display emails?

Just use standard IMAP protocol.

Hi Zang,

I understand we can use standard IMAP protocol to pull the folders but what im trying to understand is if our web application can make a call directly to the content?  Like for example, exchange servers have .pst file for the respective user.  Do we have similar files here on email server were the web application can read the file to view the data for that respective user?  IF so where is the email box file for respective user is stored and under what file format and can application read that file?

23

Re: Demo/Evaluation version of iRedmail for Mobile App

Yes you can modify files under mailbox directly, default directory is /var/vmail/vmail1/<domain>/...

WARNING: MODIFYING MAIL MESSAGE DIRECTLY IS NOT RECOMMENDED, USE IMAP PROTOCOL INSTEAD PLEASE.

24 (edited by bhupeshduggi 2018-10-30 06:41:22)

Re: Demo/Evaluation version of iRedmail for Mobile App

ZhangHuangbin wrote:

Yes you can modify files under mailbox directly, default directory is /var/vmail/vmail1/<domain>/...

WARNING: MODIFYING MAIL MESSAGE DIRECTLY IS NOT RECOMMENDED, USE IMAP PROTOCOL INSTEAD PLEASE.

Hi Zhang,

Thanks for the information.  When i look at the structure, i see the account is created under 3 directories with first 3 letters of user name.
the user test is created under directory "t" then directory "e" and then directory "s".  Is that the standard?  If we need to look for a particular user, then we need to go into 3 directories with first 3 letters of username?  Also what if the username is less than 3 charecters?

Is there a standard naming convention used for the files as i see the the file name starts with username and end with probably time of account creation.  Can the naming be standard convention rather than variable with time of account created.

root@mail:~# cd /var/vmail/vmail1/domain.com/t/e/s
root@mail:/var/vmail/vmail1/domain.com/t/e/s# ls
test1-2017.12.19.04.23.50  test-2018.01.24.14.23.49   test3-2017.12.26.23.12.17
test1-2017.12.26.23.04.37  test2-2017.12.26.22.57.37  test4-2017.12.26.23.15.11
test-2017.12.19.04.09.54   test2-2017.12.26.23.09.10  test5-2017.12.27.22.13.27

Also if i go into the Maidir.  Which file i should be looking to view the contents of mail.

root@mail:/var/vmail/vmail1/domain.com/t/e/s/test-2018.01.24.14.23.49/Maildir# ls
cur                  dovecot.index.log     dovecot-uidvalidity           tmp
dovecot-acl-list     dovecot.index.thread  dovecot-uidvalidity.5a689712
dovecot.index        dovecot.mailbox.log   new
dovecot.index.cache  dovecot-uidlist       subscriptions

25

Re: Demo/Evaluation version of iRedmail for Mobile App

Just use the IMAP protocol.