TurnKey Linux Virtual Appliance Library
shake.chen's picture

how long to publish

I just wonder how long do need to finish the iRedMail project?

Already created the patch

I have already created the patch , Have some problem with TKLpatch tool on Debian. So waiting for Liraz and Alon to look into it.

shake.chen's picture

Ubuntu 10.04 perfect support

Now iRedMail 0.6.1 is perfect in Unbutn 10.04, can you first publish Ubuntu 10.04?



Actually I already tried

Actually I already tried iReadmail 0.6.1 on Ubuntu 10.04 , but got message that it is unsupported . So went with Debian . Patching was successfull. Just before creation of squashfs some strange errors occured. I think , it is the problem wuth TKLPatch on debain . Waiting for Liraz 's and Alon 's reply ....

Jeremy Davis's picture

Hey Basil have you checked out their forum?

Because I just had a quick look and the first thing I saw was: "iRedMail-0.6.1 released, with Ubuntu 10.04 LTS support. 2010-08-16" In the thread it states: "Supports Ubuntu 10.04 LTS. 10.04 is recommended version if you want to deploy iRedMail on Ubuntu."

If you are using that version and problems persist be good to let them know of the potential bug and let them help you figure it out. Then everyone's a winner! :)

let me try once more .

let me try once more .

I was wrong

I was wrong .new version of iRedmail is supported on lucid. Earlier it was my mistake

root@core /mnt/iRedMail-0.6.1# sh iRedMail.sh
[: 32: X1: unexpected operator
[: 124: Xxterm: unexpected operator
[: 124: Xxterm: unexpected operator
[: 197: XLinux: unexpected operator
[: 197: XLinux: unexpected operator
Error: Your OS is not supported yet.

when i did


it is ok

shake.chen's picture

bash iRedMail.sh or bash

bash iRedMail.sh


bash iRedMail-0.6.1/iRedMail.sh

would also ok.

another question, whether intergrate webmin and virtualadmin to iRedmail project ?

Guest's picture

Can you guys share the update

Can you guys share the update status of this project? :)

Liraz Siri's picture

iRedMail looks very interesting

Seems like these guys put some effort into solving a common problem (mail) with a lightweight combination of excellent open source components. A TurnKey equivalent would likely be a great idea. I can understand Basil's reluctance to step in though. I suspect he doesn't want to take credit for just running an iRedMail script.

If that's the case, I'd like to clarify one thing - it still very useful to say I've tested this combination and it works.

Liraz Siri's picture

Thoughts on porting iRedMail to TurnKey

OK, this is a bit tricker than I thought but definitely doable. Here's the Ubuntu documentation for iRedMail:


As you can see from the docs the installation process is interactive so we can't just run iRedMail.sh script in a TKLPatch's conf. Unfortunately, for a TKLPatch to be easily converted into a TurnKey appliance it shouldn't require user interaction. That rules out just running the iRedmail.sh script without modification. But that doesn't mean we can't leverage iRedMail. We just have to be more clever.

I've taken a closer look at how iRedMail is implemented and it is a behemoth shell script program that codifies a great deal of mail server integration knowledge. It's impressive work!

The good news is that this is a very well written shell script that doesn't repeat itself. All the dialog code is in one place, and it's called from a single function (check_env() in conf/core) which is itself called from the main iRedMail.sh script. The output from the interactive configuration process is a configuration file. We can take this file, and with minor modifications short-circuit check_env to use it directly without any user interaction.

The result: a TKLPatch containing an iRedMail.sh script that can be run non-interactively, which can in turn be used to create a TurnKey iRedMail appliance.

Guest's picture

You don't need to modify iRedMail scripts.

iRedMail uses 'dialog' for interactive, and it will store all user input in CONFIG file, it's /path/to/iRedMail-x.y.z/config.

When you execute iRedMail.sh, it will read CONFIG first. if it's ended with "#EOF", that means user already input all settings. What you need to do is just typing "Y" to confirm to use this existing config file.

So, you can create a CONFIG file and move it to root directory or iRedMail, and it should work as expected.

Liraz Siri's picture

Wow that was fast Zhang!

Thanks for the good advice and the lightening fast response. I'd rather not modify the iRedMail script at all. If all iRedMail needs is for us to type Y to confirm using the CONFIG file then after we set that up we should be able to run the script non-interactively like this:
echo Y | ./iRedMail.sh

I tried some short circuiting

I tried some short circuiting in the patch to make it non-interactive. But at the final step , I'm having some problems. I tried running the patch some 10 or 20 times. It is a too long patch , and i'm tired of it ..... :(


I just attatched my partial work. The modified(short-circuited) iRedmail script is Gzipped and placed in overlay

Guest's picture

What do you mean

What do you mean "patch"?

What do you want to do and what you expect?

What I mean is , I edited the

What I mean is , I edited the dialog scripts in iRedmail to avoid interaction with user ,and assigned the required value to variables.

Jeremy Davis's picture

Have you tried what Liraz & Zhang discussed above?

From what has been said above, it sounds like you can prefill the config file and pipe a 'Y' to the script. Then no user interaction should be required, and no modification to the script.

But there are some check

But there are some check boxes also in the dialogs , what about them ??

Guest's picture

Run iRedMail.sh, choose

Run iRedMail.sh, choose components you need, and after dialog completed, it will save all your settings in /path/to/iRedMail-x.y.z/config. Just refer to this file.

Guest's picture

That's exactly what i

That's exactly what i mean.

After prefill config files with your prefer settings, you can execute iRedMail.sh like below:


# bash iRedMail.sh <<EOF

shake.chen's picture

maybe you need consider

maybe you need consider provide two iso, one is for ldap, the other is for ldap

the below is ldap config files


iRedMail-0.6.1# cat config

export VMAIL_USER_HOME_DIR='/var/vmail'
export STORAGE_BASE_DIR='/var/vmail'
export SIEVE_DIR='/var/vmail/sieve'
export BACKEND='OpenLDAP'
export dn2dnsname="example.com"
export LDAP_SUFFIX="dc=example,dc=com"
export LDAP_SUFFIX_MAJOR="example"
export LDAP_BINDDN="cn=vmail,dc=example,dc=com"
export LDAP_ADMIN_DN="cn=vmailadmin,dc=example,dc=com"
export LDAP_ROOTDN="cn=Manager,dc=example,dc=com"
export LDAP_BASEDN_NAME="domains"
export LDAP_BASEDN="o=domains,dc=example,dc=com"
export LDAP_ADMIN_BASEDN="o=domainAdmins,dc=example,dc=com"
export LDAP_ROOTPW='iredmail'
export MYSQL_ROOT_PASSWD='iredmail'
export FIRST_DOMAIN='example.com'
export DOMAIN_ADMIN_NAME='postmaster'
export SITE_ADMIN_NAME='postmaster@example.com'
export DOMAIN_ADMIN_PASSWD='iredmail'
export SITE_ADMIN_PASSWD='iredmail'
export FIRST_USER='www'
export FIRST_USER_PASSWD='iredmail'
export MAIL_ALIAS_ROOT='www@example.com'
export DOVECOT_PROTOCOLS=' pop3 pop3s imap imaps'
export USE_RCM='YES'
export DEFAULT_LANG='en_US'

Adrian Moya's picture

I'll step in to finish this appliance

I was looking at this appliance and want to finish it so that it makes its in the final TKL lucid release. I'm right now checking the options in the installation, and testing it with ldap backend. I did it first to check the iRedAdmin software. It looks pretty nice, but I don't like the fact that the opensource edition lacks of a lot of features from the payed version. It makes me feel I'm running an uncomplete program. Said that, do you guys think this appliance should go with the mysql backend and using postfix-admin? I'm going to check that one right away. 

Also, if ldap backend is the way to go, would example.com be a good root for the tree? I did use that and got a config file like the one previously posted, but this subject regarding ldap always make me think on how to setup an appliance generic enough. I think we can end up with something more generic, so ideas are welcome, if you want to, post them in the ldap tklpatch post

Liraz Siri's picture

Add-ons to iRedMail + configuration tweaks on firstboot

Stripped down community version: Only the iRedAdmin interface is stripped down and it's just a configuration UI. The actual functionality is provided by the other open source components and it's all there. As you suggest we don't have to settle for iRedAdmin and can provide a full configuration UI to postfix via the Webmin module. I haven't evaluated iRedAdmin in detail yet but if we come to the conclusion that the community version doesn't add anything useful on top of what we can accomplish with Webmin (e.g., postfix configuration) we could just remove it. In that case we probably shouldn't call it iRedMail though.

Inithook configuration screens: Regarding configuration tweaks, Alon is working on supporting configuration dialogs in inithooks so the default ldap root could be example.com. This will apply in live CD/demo mode. When the user boots for the first time after deployment we can ask him for the real root domain name and make the proper reconfiguration. I'll ask Alon to document how inithooks configuration dialogs work as soon as they're stable.

Alon Swartz's picture

New inithooks documentation

I'll be brief: It's here.

Adrian Moya's picture

FQDN for this kind of appliances

Is another topic that makes me think. I'm setting mail.localdomain for this one, and I'll check the implications of changing that later to a real fqdm (check that nothing brokes). This part I think would be important to add to the "firstboot configuration wizard". That would help things like this to get properly setup when first installing the appliance.

Comments welcome!

Liraz Siri's picture

Adrian iRedMail patch

For the benefit of anyone reading this thread, Adrian took a stab at resolving some of the issues (e.g., running iRedMail non-interactively) and posted a more complete patch here.

Guest's picture

interactive with user during iRedMail install

Now I have find the


let the user setting password during install.

I think the good way for iRedMail, we just need put all the relate package in iso, let the install can quick installed, run the script, let the user interactive, set up all relate email setting.

Guest's picture

Public Ip Address

Dear Basil

 I want to know how we can add public ip address in iredmail. And whats the location where we can set public ip..

Guest's picture

Did the iredmail appliance get up and going?

Having set this up on a couple of servers now I'd be very intrested in a Turnkey build - it is a fantastic system but does require a few tweaks post-install. It is a very simple system but, as a rank amateur, having a more experienced eye put together a solid Turnkey image would be very reassuring.

It would fill a hole in the Turnkey lineup very nicely, where you don't necesarily need a full blown groupware server but do want a good email/webmail/spam system.

iRedmail is still being actively developed with new features and updated software - well worth another look!

Jeremy Davis's picture

It'd be great to have in the library!

And I agree that it would fill a niche in the lineup nicely. Unfortunately we're currently running flat out to pretty much stay in the same place, so if no one from the community picks it up as a project (i.e. develops TKLDev build code) then it is unlikely it will make it into the v13.1 release (although you never know)... OTOH if someone develops the build code then the chances of including it are pretty good!

If that's something that you think you might be able to help with, let me know (maybe start a new thread) and I'm happy to help as much as I can.

John Carver's picture

Status of iRedMail??

Did this project get stuck in the transistition to TKLDev?  Are you still looking for a sponser?

I started looking for a TurnKey GNU/Linux solution for handling mail when my homebrew server started receiving a lot of Phishing messages.  At first I worried I had been hacked, but that seems not to be the case.  I just need better spam filtering.  iRedMail seems to have many of the features I'm looking for.  If no one else is working on this currently, I could take a stab at rolling a TKLDev version.  

Information is free, knowledge is acquired, but wisdom is earned.

Jeremy Davis's picture

I say go for it John! :)

I am not aware of anyone actively working on this (or any other email/webmail server appliance).

So I say go for it if you are keen! :)

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)