Setting up IMAP

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Setting up IMAP

Post by alex.barylski »

I only plan on supporting IMAP and requiring SPA (Secure Password Authentication) in Outlook Express.

How do I go about disabling (not nessecarily removing) sendmail and any SMTP service - I may occasionally use to fire simple newsletters to clients. This is not an option for anyone else. I will require all outgoing mail to be sent by their ISP SMTP (typical of sharedhosts).

I know you can use another SMTP other than locally, even in thin clients:

http://www.shaw.ca/en-ca/CustomerCare/I ... etails.htm

It doesn't look like this would be possible with my high-speed provider; how does SMTP work locally? Is it because they have my IP and know who I am based on that I don't require SMTP authentication? Can I use this to send emails from my server?

I have a single IP address mapped to several domains, each domain will have several potential email addresses. Is there a way I can store each accounts email inside a folder that maps to that domain - if that made any sense.

Basically, it appears as though I have to store all email inside /var/mail but I'm curious how that works when several domains all store messages in that folder? Ideally storing emails in a DB like MySQL would be nice as I could latter develop my own email client in PHP and easily glob messages.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

For the virtual domains over IMAP you need uw-imap patched with the "vimap" patch which is available on sourceforge. The patch makes uw-imap look for passwords, alises etc in /etc/vmail/*.domain.tld rather than using standard PAM authentication.

As for disabling SMTP... you'll at least need to have an incoming MX because the IMAP service needs it. You'll also need to set this up to write to ~/Mail/domain.tld/mbox for the patched IMAP to work. I'd suggest using Exim4 since it's easiest to configure for things like this. To be honest, you're not going to get a massive amount of support from us because this is actually really in-depth mail server stuff. Basic system accounts are easy, but virtual accounts are tricky.

Webmin/CPanel have this already set up IMHO. uw-imap probably won't work with SPA authentication though, unless you can modify the patch yourself (it's written in C).
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

Thanks again for the feedback.

I've read bit more on mail - it is complex. I see now that sendmail, exim, etc are MTA's which need to exist regardless of whether you wish to support SMTP. sendmail is a misnomer I must say as to me it implies "sending" only not receiving, which is what complicated things for me.

I am using the Debian forums and IRC but I kind figured you would reply, so I posted away, knowing you are probably quite familiar email servers with SWIFT mailer and all. :)
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

I just noticed I wrote IMHO where I meant AFAIK :P If you're planning on offering hosting for clients I'd probably pay for CPanel simply for the ease of use with it.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

The less I have installed, the better off I am. I am more confident in security and the there is less to maintain. Web applications are notorious for security threats (via: SQL injection) as we are all aware. :)

The only servers I wanted running and accessible from the outside world were HTTP.

I'm not offering random hosting, my clients are a select group, which I control quite tightly so I can get away with removing nessecities like FTP, etc.

It appears as though now I need a MTA such as sendmail, which I guess is something like a server, in that it handles client requests...

The Linux mail systems are quite complicated and confusing in part due to the enormous amount of options you have available. I just switched from courier-imap to another program, because aqfter reviewing all these options I concluded the latter was better.

Personally I hate cPanel over the years I've had so many problems with it - mostly JS errors. I really like webmin but I'd prefer to everything as simple or rather, low-level as possible. Once I've gained deeper insight into system administration, I'll probably switch to using a GUI for ease of use, but I guess I like learning the hard way.

Cheers :)
Post Reply