TurnKey Linux Virtual Appliance Library

how long to publish

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


Basil Kurian's picture

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.


Ubuntu 10.04 perfect support

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


Basil Kurian's picture

.

.


Basil Kurian's picture

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'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! :)

Basil Kurian's picture

let me try once more .

let me try once more .


Basil Kurian's picture

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

./iRedMail.sh 

it is ok


bash iRedMail.sh or bash

bash iRedMail.sh

or

bash iRedMail-0.6.1/iRedMail.sh

would also ok.

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


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:

http://code.google.com/p/iredmail/wiki/Installation_on_Ubuntu

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.

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
Basil Kurian's picture

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


What do you mean

What do you mean "patch"?

What do you want to do and what you expect?

Basil Kurian's picture

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'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.

Basil Kurian's picture

But there are some check

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


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.

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
Y
EOF

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 USE_IREDAPD='YES'
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_PLAIN='iredmail'
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 ENABLE_DOVECOT="YES"
export DOVECOT_PROTOCOLS=' pop3 pop3s imap imaps'
export ENABLE_DOVECOT_SSL="YES"
export ENABLE_SPF='YES'
export ENABLE_DKIM='YES'
export USE_IREDADMIN='YES'
export USE_WEBMAIL='YES'
export USE_RCM='YES'
export REQUIRE_PHP='YES'
export USE_PHPLDAPADMIN='YES'
export REQUIRE_PHP='YES'
export USE_PHPMYADMIN='YES'
export REQUIRE_PHP='YES'
export USE_AWSTATS='YES'
export DEFAULT_LANG='en_US'
#EOF


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.

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.

interactive with user during iRedMail install

Now I have find the

http://www.turnkeylinux.org/blog/end-to-default-passwords

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.

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..

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)