Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 10th April 2013, 05:39
markc markc is offline
Member
 
Join Date: Dec 2012
Posts: 56
Thanks: 6
Thanked 9 Times in 9 Posts
Default Converting a server from dovecot to courier-imap

Ubuntu 64bit 13.04 with ISPConfig 3.0.5.2

I am attempting to convert and already setup server from dovecot to courier-imap so I can use maildrop for delivery. I've removed dovecot and /etc/dovecot and re-run update.php a few times and some messages have been delivered but now I am bumping into this one... note the/var/vmail path is completely wrong, this users real path is /var/vmail/yyyyyy.org/markc where I have moved the original Maildir/{cur,new,tmp} up a level.

Apr 10 13:08:14 hp postfix/pipe[5838]: DA29D10065D: to=<markc@yyyyyy.org>, relay=maildrop, delay=0.05, delays=0.01/0.01/0/0.03, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/bin/maildrop.orig: Unable to create a dot-lock at /var/vmail/markc@xxxxx.net/yyyyyy.org/5844.0.hp. )

For some reason the SENDERS email address is being inserted into the path. The /usr/bin/maildrop is currently a shell script for debugging, it is...

Code:
~ cat /usr/bin/maildrop
#!/bin/sh
(echo $*; id ; env) | logger -p mail.info
/usr/bin/maildrop.orig $*

~ ll /usr/bin/maildrop*
-rwxr-xr-x 1 root root       78 Apr 10 13:07 /usr/bin/maildrop
-rwsr-xr-x 1 root daemon 196000 Jan 23 23:32 /usr/bin/maildrop.orig

Apr 10 13:15:05 hp logger: -d vmail markc@yyyyyy.org markc yyyyyy.org markc@xxxxx.net
Apr 10 13:15:05 hp logger: uid=5000(vmail) gid=5000(vmail) groups=5000(vmail)
Apr 10 13:15:05 hp logger: MAIL_CONFIG=/etc/postfix
Apr 10 13:15:05 hp logger: PATH=/usr/bin:/bin
Apr 10 13:15:05 hp logger: PWD=/var/spool/postfix
Apr 10 13:15:05 hp logger: LANG=C
Apr 10 13:15:05 hp logger: SHLVL=1
Apr 10 13:15:05 hp logger: _=/usr/bin/env
Apr 10 13:15:05 hp maildrop[6015]: Unable to create a dot-lock at /var/vmail/markc@xxxxx.net/yyyyyy.org/6015.0.hp.
Anyone have a suggestion what going on here and how to remove the senders address from the path?

I did discover I cannot use /etc/courier/maildroprc as a global filter because postfix does not provide the env variables it would normally need so I will have to use a .filter or .mailfilter in each users /var/vmail virtural maildir.

My objective it to enable Dspam filtering (via maildrop) because the default Spamassassin rules just suck, barely 80% effective. Perhaps I should investigate how to improve amavis/spamassassin but I figure there may be less pain installing Dspam which I know can work 99% effectively once trained.

Also FWIW, /etc/postfix/master.cf still has a reference to dovecot even after it's removed and I've run the update.php script...

Code:
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d vmail ${extension} ${recipient} ${user} ${nexthop} ${sender}
[... further down ...]
dovecot   unix  -       n       n       -       -       pipe
  flags=DROhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
Reply With Quote
Sponsored Links
  #2  
Old 10th April 2013, 07:28
Parsec Parsec is offline
Member
 
Join Date: Jan 2013
Posts: 66
Thanks: 1
Thanked 9 Times in 8 Posts
Default

Are you using courier-maildrop or maildrop? As per available packages in debian/ubuntu. The maildrop line in your master.cf is one that courier-maildrop uses, I don't think standalone maildrop uses the ${sender} on the end (just guessing from looking back on some old server configs).
Reply With Quote
  #3  
Old 10th April 2013, 07:35
markc markc is offline
Member
 
Join Date: Dec 2012
Posts: 56
Thanks: 6
Thanked 9 Times in 9 Posts
Default

Good point, I am using the courier-maildrop package and didn't notice the plain maildrop package (I searched for "courier" related pakages).

So I guess I should try the maildrop package and remove courier-maildrop?
Reply With Quote
  #4  
Old 10th April 2013, 07:56
Parsec Parsec is offline
Member
 
Join Date: Jan 2013
Posts: 66
Thanks: 1
Thanked 9 Times in 8 Posts
Default

Hmm no, I'm using courier-maildrop and it works fine with that master.cf line. Just that I used to use other maildrop and the master.cf was different.

I've not really delved into this courier-maildrop thing much - my ispc setup is only relatively new and i have been fighting with other issues. Actually I can't even find the maildroprc file.... I'll have a look around.
Reply With Quote
  #5  
Old 10th April 2013, 08:05
Parsec Parsec is offline
Member
 
Join Date: Jan 2013
Posts: 66
Thanks: 1
Thanked 9 Times in 8 Posts
Default

Hmm is your var/vmail setup correct? if using courier then this:
Unable to create a dot-lock at /var/vmail/markc@xxxxx.net/yyyyyy.org/5844.0.hp.

Is completely wrong. It should be
/var/vmail/yyyyyy.org/markc

Maybe you need to reset up your mailboxes because you're using courier now and not dovecot.
Reply With Quote
  #6  
Old 10th April 2013, 09:25
markc markc is offline
Member
 
Join Date: Dec 2012
Posts: 56
Thanks: 6
Thanked 9 Times in 9 Posts
Default

Right, so leave the courier-imap package as is. I've only been using ispc for a few months too but I've been using the full courier-mta suite for about 10 years on a couple of client servers so I am not used to postfix at all. Yes, I can see the dot-lock path is wrong although I have had email delivered to my inbox... until maybe I rebooted, not sure. I'd like to try and understand why this error is happening rather than patch it up because I want to add Dspam filtering and maybe even become bold enough to try courier-mta instead of postfix on a test server... but to do that I need to understand the system better which is why I switched to courier-imap because it's half way to using courier-mta.

As for a maildroprc there isn't one unless your create it but it's almost useless without courier-mta providing a bunch of env variables that maildrop needs when using a global /etc/courier/maildroprc. A maildrop filter filter in the /var/vmail/domain/users virtual home directory will probably work but I haven't got that far yet (not sure what the magic filename is yet). I use this to test with and on a standard courier-mta system those env vars are available but as you would see they are not when postfix is the MTA...

Code:
~ head /etc/courier/maildroprc
logfile "/var/log/maildrop.log"

import RECIPIENT
import SENDER
import HOME
RECIPIENT=tolower($RECIPIENT)
log "$RECIPIENT -> $HOME"
log "MAILDIR=$MAILDIR"
Obviously touch /var/log/maildrop.log; chmod 666 /var/log/maildrop.log for testing.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig3 mail doesn't work pehden Installation/Configuration 20 9th December 2013 14:05
Dual server with ISPConfig 3 but with errors alphaman36 Installation/Configuration 8 23rd August 2012 12:59
Can't receive mails baicunko Server Operation 12 3rd August 2011 22:02
What can be wrong martin_rudowicz Installation/Configuration 9 11th May 2008 19:42
Problem with keeping Apache alive bobeq Server Operation 3 29th November 2007 16:11


All times are GMT +2. The time now is 10:20.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.