Mailserver installation issues on Raspbian


10 posts
by tonyhughes » Wed Dec 26, 2012 4:12 am
Hi guys,

I'm new here, and late to the party, just received my first RPi a few days ago -

Model B rev 2
16GB Apacer Class 10 card
1 Amp PSU + good quality Micro SD USB cable

The installation of Raspbian has gone well, and I have installed and configured various software, from the very basic 'htop' through to Postfix and Apache (2).

I have a server running at home with Ubuntu/LAMP/Postfix/Dovecot that is working well, that I originally used Tasksel to set up, but later did a complete re-install and installed those packages individually using apt-get, and it has been running well for some time.

The trouble I am running into, is trying to get Dovecot installed...

I have tried Tasksel many times, with a complete reinstall of Raspbian in between tries - Tasksel just errors out with error 100, which I think many have encountered - has ANYONE actually got a mailserver installed successfully on the RPi with Tasksel?

Possibly related, is trying to install Dovecot using apt-get. Some packages install okay, but specifcally 'dovecot-imapd' and a few others give errors similar to below...

Code: Select all
udo apt-get install dovecot-imapd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  dovecot-imapd
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 412 kB of archives.
After this operation, 569 kB of additional disk space will be used.
Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main dovecot-imapd armhf 1:2.1.7-2 [412 kB]
Fetched 412 kB in 2s (204 kB/s)       
Selecting previously unselected package dovecot-imapd.
(Reading database ... 85185 files and directories currently installed.)
Unpacking dovecot-imapd (from .../dovecot-imapd_1%3a2.1.7-2_armhf.deb) ...
Setting up dovecot-imapd (1:2.1.7-2) ...
doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf: service(managesieve-login): executable is empty
Restarting IMAP/POP3 mail server: dovecotdoveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf: service(managesieve-login): executable is empty
 failed!
invoke-rc.d: initscript dovecot, action "restart" failed.
dpkg: error processing dovecot-imapd (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 dovecot-imapd
E: Sub-process /usr/bin/dpkg returned an error code (1)


I have edited /var/lib/dpkg/status to edit the file and remove references to problem packages like dovecot-managesieve and run apt-get -f install and apt-get clean, but I still have no luck trying to get some packages to install.

Is this likely a problem on my end? Or is it that the packages simply aren't working will with the RPi?

I've reinstalled Raspbian a lot, making sure I try on clean installs (but always using apt-get update and apt-get upgrade first), I'm using sudo.

I'm hoping to decommission my $4-per-month-in-power-costs-plus-its-noisy Ubuntu machine, and use the RPi in its place, but mail is where I'm getting tripped up.

Postfix installs and runs fine, and sends/recieves email no problem.

Firewalls make no difference (not that we expect them to), I normally use UFW as a front end to iptables, and the issues above occur with this running or not.

I also installed Citadel and that works just fine too, but I need to use Postfix and another IMAP server as I am teaching myself Linux system administration, as well as basic scripting and web programming, and interfacing web systems with Postfix is interesting enough that it keeps me learning. (I'm actually duplicating some functionality of Webmin, just for learnings sake, but completely from scratch).

Cheers,
Tony

(Hi from New Zealand)
Baked Linux Mod http://www.geek101.co.nz/bakedlinuxmod

Easy install of Drupal, Wordpress, RazorCMS, Chyrp, Apache, Nginx, Lighttpd, firewall, Webmin, VNC, RDP, FTP servers, mailservers, MySQL, SQLite, Transmission and more...

tall.co.nz/webcam.jpg
User avatar
Posts: 931
Joined: Wed Dec 26, 2012 3:46 am
by tonyhughes » Thu Dec 27, 2012 2:08 am
I had a helpful reply from a user here via PM stating he is running Dovecot just fine on Raspbian Wheezy, and that it wouldn't start without enabling IPv6 first.

I'll carry on trying, and report back here in case it is helpful to anyone.
Baked Linux Mod http://www.geek101.co.nz/bakedlinuxmod

Easy install of Drupal, Wordpress, RazorCMS, Chyrp, Apache, Nginx, Lighttpd, firewall, Webmin, VNC, RDP, FTP servers, mailservers, MySQL, SQLite, Transmission and more...

tall.co.nz/webcam.jpg
User avatar
Posts: 931
Joined: Wed Dec 26, 2012 3:46 am
by tonyhughes » Thu Dec 27, 2012 6:37 am
Problem sorted.

Installed git-core package required by rpi-update:
Code: Select all
sudo apt-get install git-core


Installed rpi-update:
Code: Select all
sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update # Install rpi-update


Enabled IPv6:
Code: Select all
sudo modprobe ipv6

(Add 'ipv6' on its own line to the end of /etc/modules.conf to keep enabled).

Reinstalled affected packages, and dovecot imapd service started just fine. I still have some configuration to get right, but the packages are installed and the servers are running and responding to network requests.
Baked Linux Mod http://www.geek101.co.nz/bakedlinuxmod

Easy install of Drupal, Wordpress, RazorCMS, Chyrp, Apache, Nginx, Lighttpd, firewall, Webmin, VNC, RDP, FTP servers, mailservers, MySQL, SQLite, Transmission and more...

tall.co.nz/webcam.jpg
User avatar
Posts: 931
Joined: Wed Dec 26, 2012 3:46 am
by tonyhughes » Thu Dec 27, 2012 6:43 am
And I got IMAP serving up mail simply by editing /etc/dovecot/conf.d/10-mail.conf and uncommenting the 'mail_location' setting and adding the suggested mbox setting (which was the default when I installed Postfix):
Code: Select all
mail_location = mbox:~/mail:INBOX=/var/mail/%u
Baked Linux Mod http://www.geek101.co.nz/bakedlinuxmod

Easy install of Drupal, Wordpress, RazorCMS, Chyrp, Apache, Nginx, Lighttpd, firewall, Webmin, VNC, RDP, FTP servers, mailservers, MySQL, SQLite, Transmission and more...

tall.co.nz/webcam.jpg
User avatar
Posts: 931
Joined: Wed Dec 26, 2012 3:46 am
by Jim JKla » Thu Dec 27, 2012 6:44 am
Any chance you can write this up and put it on the wiki? ;)
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick
User avatar
Posts: 2086
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK
by tonyhughes » Thu Dec 27, 2012 7:09 am
Just my trouble-shooting, or a whole howto?

I'll need to play a little more to develop a useful howto (i.e. make sure I have security and usability covered).
Baked Linux Mod http://www.geek101.co.nz/bakedlinuxmod

Easy install of Drupal, Wordpress, RazorCMS, Chyrp, Apache, Nginx, Lighttpd, firewall, Webmin, VNC, RDP, FTP servers, mailservers, MySQL, SQLite, Transmission and more...

tall.co.nz/webcam.jpg
User avatar
Posts: 931
Joined: Wed Dec 26, 2012 3:46 am
by Jim JKla » Thu Dec 27, 2012 8:34 am
As much as your capable of a full how to would be nice.

The best pages for the noob tend to be written by people who have struggled to get something to work they tend to avoid jargon and also tend to be specific where they found stuff allways a help for the noob end of the noob-ubergeek spectrum. ;)

The wiki is dynamic you can put on an outline and change/add things as you go.
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick
User avatar
Posts: 2086
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK
by tonyhughes » Thu Dec 27, 2012 8:47 am
I follow the wiki link, and it seems to point to another site, needing a registration, that is closed off, and requires me to ask nicely to get an account.

Very counter-intuitive to get people to jump on and add content.

Just sayin...

:)
Baked Linux Mod http://www.geek101.co.nz/bakedlinuxmod

Easy install of Drupal, Wordpress, RazorCMS, Chyrp, Apache, Nginx, Lighttpd, firewall, Webmin, VNC, RDP, FTP servers, mailservers, MySQL, SQLite, Transmission and more...

tall.co.nz/webcam.jpg
User avatar
Posts: 931
Joined: Wed Dec 26, 2012 3:46 am
by Jim JKla » Thu Dec 27, 2012 8:54 am
This link should drop you right on the button

http://elinux.org/RPi_Hub

link for beginners

http://elinux.org/RPi_Beginners

You only need a login to edit it's not needed to read the wiki. ;)

The login to edit is mainly to controll troll activity.
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick
User avatar
Posts: 2086
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK
by mitchreward » Mon Sep 23, 2013 12:06 pm
Thank you very much mate, for this post :)
Posts: 1
Joined: Mon Sep 23, 2013 12:04 pm