1

Topic: considering iRedMail; Few questions on features

We are looking at rolling out a new server for around 4-6k users, we are currently using icewarp's Merak server on a windows machine.

We are looking to move to a Linux solution, and I've built a couple "proof of concept" servers on Ubuntu 10.4.1 (the most recent LTS release).  In wrapping up, I ran across iRedMail and did an install with it, and I like it a lot, mainly because I won't be the only person administrating the email accounts, and this makes the process very simple for me to add admins that can help with account maintenance .

So, my first question:

We have a barracuda spam & virus firewall, this has helped a huge amount with our windows server, as it was nearly on the fritz before, but this has reduced the traffic to the mail servers a tremendous amount.  It is currently setup to do one of three actions, obviously, allow, tag, delete, based on score.  The tags are both header tags and subject line tags.  I was wondering how easy it would be to setup iRedMail to automatically push these tagged emails to a junk/spam folder in webmail for the users?

----

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

2

Re: considering iRedMail; Few questions on features

iRedMail provides managesieve service, It's easy to filter mails with sieve rule.
Reference: http://wiki.dovecot.org/LDA/Sieve

3 (edited by blinden 2011-01-13 23:00:40)

Re: considering iRedMail; Few questions on features

ZhangHuangbin wrote:

iRedMail provides managesieve service, It's easy to filter mails with sieve rule.
Reference: http://wiki.dovecot.org/LDA/Sieve

Interesting, I've only played with courier before, and that involved a LOT more work, this looks great!  Thanks for the info.

One other question I was having about this barracuda, it seems to be having trouble with rate limiting and the messages are trickeling through abotu 1 every 2 hours instead of instantly.  If I can figure out how to sort out that, I'll probably be looking at rolling this out for a couple of our smaller domains today.

I have mynetworks set properly AFAIK in main.cf, not sure if there is somewhere to 'whitelist' the IP addresses (or host names) of my barracuda firewalls or what I need to do.

4

Re: considering iRedMail; Few questions on features

If Barracuda connects iRedMail server via port 25, then append IP address of Barracuda in postfix "mynetworks" setting should be enough.

I don't know Barracuda, so it's better to explain what you expect and how it will work, and paste related log here (HIDE/REPLACE sensitive information before posting), so that we can help finger out why it happened.

5 (edited by blinden 2011-01-14 01:01:48)

Re: considering iRedMail; Few questions on features

That was actually my fault, I had a mistyping in the mynetworks, going little stir crazy after staring at it all day I guess, it works great now, goign to do a little testing with this sieve and look at moving a domain or 2 over this afternoon.  If all goes well, we are definitely going to be purchasing the admin-pro, looks very impressive.

One last question I have is about 3rd party provisioning.  We have a billing system setup, if they want to create/delete accounts and domains through that, what would be the best method for them to connect to the server to provision the accounts. Had previously had it setup with virtual domains on SQL and it just executed the SQL statements to create the accounts as needed.

Ohh yeah, and I guess I need to find how to make it so when a new account is created in iRedMail I can add a folder called "Spam" automatically to the mailbox

6

Re: considering iRedMail; Few questions on features

blinden wrote:

One last question I have is about 3rd party provisioning.  We have a billing system setup, if they want to create/delete accounts and domains through that, what would be the best method for them to connect to the server to provision the accounts. Had previously had it setup with virtual domains on SQL and it just executed the SQL statements to create the accounts as needed.

If you can execute SQL commands to create necessary accounts, then you can do it the same way with iRedMail.

Note: currently, iRedAdmin-Pro works only with OpenLDAP, so if you want to create necessary accounts from 3rd party application, you have to execute LDAP related commands instead. But iRedAdmin-Pro for MySQL backend will be available soon. As i mentioned in other posts, it will be available on Feb 02, ideally.

blinden wrote:

Ohh yeah, and I guess I need to find how to make it so when a new account is created in iRedMail I can add a folder called "Spam" automatically to the mailbox

Sieve will create target IMAP folder automatically (with action "fileinto").

7 (edited by blinden 2011-01-18 08:41:18)

Re: considering iRedMail; Few questions on features

well, got fileinto working very well, but only into existing folders

must have an error in my syntax somewhere

1     require ["fileinto"];
2     if header :contains "X-Barracuda-Spam-Flag" "YES" {
3       fileinto "spam";
4     }

Works great using the validate tool that was linked on the page you linked me: http://libsieve-php.sourceforge.net/


1     require ["fileinto"];
2     if header :contains "X-Barracuda-Spam-Flag" "YES" {
3       fileinto :create "spam";
4     }

However pukes with error:
Result: line 3: tag where string expected near :create

So, I'm obviously not using this :create tag correctly.  Just can't find good details anywhere on the internet about it.

8

Re: considering iRedMail; Few questions on features

If folder doesn't exist, sieve will create it automatically.

May i know which version of Dovecot do you use? It should work with Dovecot-1.1.x and 1.2.x.
(I didn't test 1.0.x and 2.0.x)

9

Re: considering iRedMail; Few questions on features

dovecot 1.2.9

it doesn't seem to create it at all.  WHen setup with the configuration I have in the first example, if I replace the "spam" with the existing "junk" folder it works, but it doesn't create teh spam folder.

I tried logging out and logging back into web mail as well as closing and opening an IMAP client (thunderbird) and the mail was just gone.

10

Re: considering iRedMail; Few questions on features

- Do you use iRedMail for testing?
- If not, do you have LDA plugin 'autocreate' enabled? like this:

protocol lda {
    mail_plugins = ... autocreate ...
    ...
}

11

Re: considering iRedMail; Few questions on features

I am using the most current iRedMail installed on a fully updated Ubuntu 10.4 LTS install.

And I double checked and mail plugs does have 'autocreate' in the dovecot.conf file

the log for sieve even shows the following line when I send a test message:

Info: sieve: msgid=<AANLkTimsX2qrn6mtJOVuum1p5CpCr_MVxC=EkrEQ5+WO@mail.gmail.com>: stored mail into mailbox 'Spam'

12

Re: considering iRedMail; Few questions on features

That means mail was delivered. Did you subscribe this new folder in webmail or your mail client? It's not subscribed by default.

13 (edited by blinden 2011-01-18 12:46:39)

Re: considering iRedMail; Few questions on features

you are correct, of course.

Is there a way to have new folders subscribed by default in roundcube?

14

Re: considering iRedMail; Few questions on features

blinden wrote:

Is there a way to have new folders subscribed by default in roundcube?

It should be implemented in dovecot side.

Check this wiki tutorial:
http://wiki.dovecot.org/Plugins/Autocre … osubscribe

15

Re: considering iRedMail; Few questions on features

I'll read that tomorrow, last thing I did tonight seemed to work for the webmail side, which was change a line in main.inc.php to include

$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash', 'Spam');

Now the folder shows up in roundcube, I'll read up on that link though.

This is important for a couple of reasons, but I'm glad to see it seems to work now, that's a huge hurdle for me.

16

Re: considering iRedMail; Few questions on features

blinden wrote:

$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash', 'Spam');

This does work, but, partly.

Roundcube creates default folders for NEW users, that means user email doesn't exist in roundcube database (mysql).
If you delete user mailbox from file system, but this user still exists in roundcube database (mysql), roundcube won't create these folders when this user log into webmail again.

So if you want to make sure they're always there, 'autocreate' is better for you.

P.S. iRedMail will enable this plugin by default in v0.7.0. Reference:
http://code.google.com/p/iredmail/sourc … 4e4e8b33f9

17

Re: considering iRedMail; Few questions on features

yup, that autocreate works brilliantly.

18

Re: considering iRedMail; Few questions on features

okay, well, got that working, working great, except, I have "twin" domains I use for testing domain1.net/domain2.net and I basically mirror them and run some tests and one of them works perfectly and the other delivers only to inbox... weird.

Info: sieve: msgid=<D0.DF.17087.524063D4@msprod1>: stored mail into mailbox 'INBOX'
Info: sieve: msgid=<D0.DF.17087.524063D4@msprod1>: stored mail into mailbox 'Spam'

19

Re: considering iRedMail; Few questions on features

Set 'mail_debug = yes' in dovecot.conf, and monitor its mail log: /var/log/dovecot.log.

20

Re: considering iRedMail; Few questions on features

Well, that led me to seeing the difference between "Global" and "Sieve_before" and "Sieve_after", so, thanks for that.

works well now.  Do still have some small weird hangups with the Sieve settings though.  Everything on the server seems to be working fine, but on one account when I go to "filters" it says "unable to connect to managesieve server" and it also seems like user rules I put in "filters" seem to disappear, couple weird things, but I think I can manage to locate these on my own, everything else seems to be working great!

21

Re: considering iRedMail; Few questions on features

Just an update.  Just went live with the server a couple hours ago after some extensive testing.  If this goes well for the next couple weeks, we'll be looking to deploy iredmail for our customer server once the mysql iredadmin-pro is available.

22

Re: considering iRedMail; Few questions on features

Good news. smile

23 (edited by blinden 2011-01-22 04:00:46)

Re: considering iRedMail; Few questions on features

All the email is coming in okay, server is working, just having a problem setting up thunderbird as an IMAP client on some machines.  Really weird stuff.  It autodetects the server settings and ports, etc, but wont' accept username/passwords for some reason.  It worked on my machine and one other machine, then had trouble on about 4 or 5 machines.

Weird thing is, eventually it seems to go through, but, in some cases it won't fully load, like, it will only create certain IMAP folders and weird stuff, but once we get them to fully sync, it seems to work okay.

I think this is something to do with the local network, or DNS, or something, i'm getting a couple weird errors

one from mail.info:

Jan 21 13:39:53 mail postfix/smtpd[1779]: improper command pipelining after EHLO from unknown[XX.XX.XX.XX]
Jan 21 13:39:53 mail postfix/smtpd[1779]: disconnect from unknown[XX.XX.XX.XX] (same address)

and also from mail.err:

Jan 21 13:39:53 mail postfix/smtpd[1779]: warning: XX.XX.XX.XX: hostname host.domain.tld verification failed: Name or service not known (same IP address as error from mail.info log)

Same errors show up in mail.log at the same time.

These 4 lines show up in dovecot.log:
Jan 21 13:39:52 imap-login: Info: Login: user=<use@domain.tld>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jan 21 13:39:52 IMAP(user@domain.tld): Info: Disconnected: Logged out bytes=539/4610
Jan 21 13:39:53 imap-login: Info: Aborted login (no auth attempts): rip=XX.XX.XX.XX, lip=10.0.0.20
Jan 21 13:39:53 imap-login: Info: Aborted login (no auth attempts): rip=XX.XX.XX.XX, lip=10.0.0.20

--EDIT--
Updated some DNS records, there was a reverse DNS entry for XX.XX.XX.XX for host.domain.tld, I added a forward entry for it too, not sure if that was the proper thing to do or not, but we'll see if that has any postive changes.