Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Running a full mailserver on unRAID

Featured Replies

Well, I posted in this thread a few days ago, but I'm not sure that any one visits the obsolete forums any more.

So, an update...

 

I started running the version of Dovecot which WeeboTech had posted up.  This worked okay - I could move mail from Thunderbird, running on my Ubuntu desktop, and store it on my unRAID server.

 

So, from there I built and installed mpop to fetch mail from my mail host, and drop it straight into my Maildir folders.  There was an immediate issue with this - I had created my Maildir on a user share, and the mechanism for receiving, then delivering the message involved creating/deleting file links (which don't work on user shares due to problems when a logical share spans physical drives).  It was relatively trivial to alter the code to use a move instead of a link.

 

However, there still one slight problem with this mechanism - the mail file ended up with incorrect ownership, so Dovecot couldn't access it.  I'm sure that, with a little thought I could have got around this.  However, another very slight issue was that it didn't incorporate the Dovecot message length and flags into the file name, either.

 

At this point, I realised that the 'correct' way of delivering the mail to Dovecote was to use the Dovecot-specific mda/lda.  However, before moving to this new mode of operation, I decided that I should try using the latest release of Dovecot - I downloaded the latest sources and built the new version with no problems at all.  Converting my existing configuration file took rather longer!  Anyway, I then reached a position where I was able to use Dovecot 2.0.12 in exactly the same way as I had Dovecot 1.1.20 working before.

 

Now was the time to work out the precise details of using the lda interface.  With a little bit of advice, it all came together and I was able to fetch mail directly from my mail host, and store it in a Maildir accessed by Dovecot, all on unRAID.  From there, accessing the mail in Thunderbird, via imap, is very simple.  This means that I now have full access to all my email from any computer in the house, and it is all stored in an expandable, parity protected, filestore.

 

I created a cron job to run the mpop fetcher every five minutes and it is now all up and running without any apparent issues.

 

All the required custom files are held on my cache drive but could, equally easily, be held on the flash drive.  From there, they are copied to the relevant places in the root filing system at boot time.

 

I have two issues to resolve:

1) I need to work out how to add the cron job at boot time.

 

2) It would be good to wrap all the required mpop and dovecot files up in a slackware install package.

 

At the moment, I don't know how to do either of these things.

 

Ultimately, I would like to find a more flexible way of invoking the pop fetcher.  If there are a lot of, or large, emails to fetch it is possible that the fetcher may not have finished before it is invoked again.  Ideally, I would like to run it from a script, the last line of which runs itself again using at an incremental time.  However, this would come to a halt if the script fails to complete for any reason - is there a way to trap an error and invoke the 'at' command even if the process doesn't complete (in DEC VMS terms, an 'onerror' trap)?

 

If anyone else is interested, I could upload all of the necessary mpop and dovecot files, and provide a little tutorial on configuration.

 

As an aside, I must have been very lucky for all these years that I've been storing all my mail on a single, unprotected, drive, with no real backup regime.  I still have all my emails going back to 1995 (this was the date when I moved to a new Internet Suite of programs - the oldest mail is the one registering that new Internet Suite), all accessible from Thunderbird now.  If I hunt around some older machines, I may still find my earlier emails!

this is not really helpful regarding the help you seek, I am afraid.

But did you think of employing a webmail solution?...this would make

the setup real flexible.

 

...I am a fan of roundcubemail, which is PHP based.

It goes smoothly with dovecot.

 

...in order to streamline your setup with regards to your challenges...how about using a mail-appliance inside a VM (like with vbox on unRAID)?

There is one - just as one example amongst so many that are available - called iredmail, which is very easy to setup and maintain.

  • Author

Valuable suggestions, I'm sure and, without wishing to appear aggressive or dismissive, I would just like to present my point of view.

 

There are a lot of competing solutions but, because the primary purpose of my unRAID box is to serve video and audio media, I wished to minimise the impact on that functionality.  I was, therefore, looking particularly for solutions which are light in terms of resource consumption.  Dovecot was the first mailserver I found which seemed to be designed with this in mind.  In addition, WeeboTech had been there before me, so I knew that it ought to work.

 

I didn't consider a webmail solution for, I guess, two reasons.  I've always hated using webmail because. traditionally (as offered by service providers), it's been cumbersome and inflexible and unresponsive.  I'm sure that current offerings, using latest technology and operating solely within the local network, are much better in these respects but, I'm afraid, my prejudices show!  Secondly, I felt that webmail pushes all of the load on to the server, probably with a large memory footprint, and this is an unnecessary additional load on the unRAID box.

 

I'm sure that running the mailserver in a virtual environment is a neat trick, but what are the real benefits over a traditional solution such as the one I've adopted?

 

As far as I'm concerned, an imap server is an imap server and, provided that it does its job efficiently, reliably and effectively I'm happy.  To my way of thinking, the real load of the mua processing belongs on the client, where it isn't impacting on valuable services being provided to other users.

 

 

Oh, I did mean to point out in my original post, that I've not implemented an smtp server/client on the unRAID box.  I don't see significant advantages of sending mail through the server, as opposed to sending it directly from the client. 

Nice Job.

 

I switched to using dovecot instead of regular mail files and an imap server because the mailstores can grow very large in my case.  with a Mailfile the whole file is read/written, with Maildir each message is separate.

 

I like having the mail files on the server vs webmail as it lets me do a find | grep if I need to in a pinch.

Plus I can use thunderbird to pull mail from all my locations, then filter it and archive it on another server.

 

No matter what client I use, my base interface is imap.

Since unRAID is an archive storage server, it makes sense to store my email there with a uniform server interface.

 

I don't see the need to run a mail server in a virtual environment. Infact that complicates things.

I want the storage to grow with the facilities I need easily.

 

Peter, I would be interested to see what you've done with dovecot as I need to reinstall mine.

 

For the record, I've installed an exim server as a mail delivery agent with success.

My purpose was for the unraid server to push local mail alerts out.

 

  • Author
No matter what client I use, my base interface is imap.

 

Indeed - I've arrived at the same conclusion, having always stuck with pop until a couple of weeks ago!

 

Since unRAID is an archive storage server, it makes sense to store my email there with a uniform server interface.

 

Just so.

 

I don't see the need to run a mail server in a virtual environment. Infact that complicates things.

I want the storage to grow with the facilities I need easily.

 

Quite.

 

Peter, I would be interested to see what you've done with dovecot as I need to reinstall mine.

 

Well, you've been there before me, building 1.1.20.  Building v2 was a trivial exercise - there are just a couple of gotchas when updating the configuration file ... and the automatic converter didn't produce a working configuration for me.  I suggest that you download the sources and give it a go.  If the configuration changes aren't immediately obvious, give me a shout.

 

I was just extolling the virtues of my new configuration to my wife.  As a quick demo, I showed her how I could even read any/all of my emails on my phone.  More realistically, I will set up mail clients on her netbook and laptop.

 

Do I gather that you've not (yet?) put a mailfetcher on to unRAID, and use it more as an archival system?  I can certainly assist with getting mpop working, and it really does seem to work well.  Apart from an initial delay as the drive spins up, fetching and displaying the mail is really quick (better than I feared it might be) so, as far as I'm concerned, it is more than adequate for current mail as opposed to simply an archive.

 

For the record, I've installed an exim server as a mail delivery agent with success.

My purpose was for the unraid server to push local mail alerts out.

 

Yes, I had wondered about doing that.  Could the ssmtp package, which comes with unRAID, be suitably configured?  If I go to the trouble of installing an smtp client/server, it may as well be configured to relay all outgoing mails (including mail sent from client desktops/laptops).

 

One thing I believe that you can help me with ... you produced a slackware install package with Dovecot 1.1.20 - can you give me a quick pointer on finding out how to do that?

Do I gather that you've not (yet?) put a mailfetcher on to unRAID, and use it more as an archival system?  I can certainly assist with getting mpop working, and it really does seem to work well.  Apart from an initial delay as the drive spins up, fetching and displaying the mail is really quick (better than I feared it might be) so, as far as I'm concerned, it is more than adequate for current mail as opposed to simply an archive.

 

I fetch with Thunderbird. I do not really want unRAID doing the fetching.

This is because most of the time at work I use a webmail interface to a current imap mail server for my domain.

When I fetch it with Thunderbird (via imap) I have rules that say messages older then 90 days get moved to a similar folder on the unRAID server. This allows me access to the most current mail from wherever I am.

 

For the record, I've installed an exim server as a mail delivery agent with success.

My purpose was for the unraid server to push local mail alerts out.

 

Yes, I had wondered about doing that.  Could the ssmtp package, which comes with unRAID, be suitably configured?  If I go to the trouble of installing an smtp client/server, it may as well be configured to relay all outgoing mails (including mail sent from client desktops/laptops).

 

 

SSMTP could do the trick, but I needed to use mailx as I was going to port my nagios configurati0n to unRAID.

But without cgi-bin access on unRAID, that's not feasible at the current time.

 

One thing I believe that you can help me with ... you produced a slackware install package with Dovecot 1.1.20 - can you give me a quick pointer on finding out how to do that?

 

My slackware package should have the slackbuild and ancillary files included in it. I  cannot remember at the moment where they are but look at the tar files.

If need be I can provide the ancillary files needed to utilize the slackbuild script.

Basically you edit the slackbuild script and set the variables to point to the proper files, then run it and it builds the binary, directory structure and .tgz file.

ssmtp is outbound only.  It does not do inbound mail.

  • Author

I've just got Pigeonhole running - the implementation of Sieve for Dovecot.  This means that I now have server-side filtering so that moving mails to appropriate mailing list folders etc. is done by the lda/mda before the mua even gets to see them.

 

This makes it even more convenient to be able to access my mail from any machine/mua.

 

I'm still using cron to invoke the mpop fetcher, but will still look at using a self-re-launching script, and I've not yet attempted to use an smtp client on unRAID.

  • 1 year later...

PeterB,

 

I saw your plugin threads, but I figured posting here was more appropriate.  I am trying to break free from the google, and to have my unraid server be the only machine on in the house 24/7, so it makes sense to attempt to use it for a full service mail server.  I have been attempting to find out how to do this for a while, but am at a roadblock.  Doesn't dovecot not actually act as a MTA, so I would have to use postfix or some other program for the actual server portion?  If dovecot and mpop are all that is needed, that's great, but the dovecot.org website seems to suggest otherwise.  If you could just point me in the right direction, I would greatly appreciate it.  Thanks!

 

P

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.