Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 21st September 2012, 09:53
fmarton fmarton is offline
Junior Member
 
Join Date: Sep 2012
Posts: 7
Thanks: 0
Thanked 2 Times in 2 Posts
Default maildrop cannot deliver to changed maildir

Dear Falko,
First let me thank you for your incredible work with your tutorials.
I've been following your documentations for years and they are far the bests among others I could find.
So thank you very much!

My problem is that I have set up a server using this tutorial:
The Perfect Server - Debian Squeeze (Debian 6.0) With BIND & Courier [ISPConfig 3]
http://www.howtoforge.com/perfect-se...er-ispconfig-3

All steps done successfully.

My pre-installed server has separate /var and /home partitions.
I usually keep stuff (mails,webs,etc.) under /home, so I ordered the install with a large (1.5TB) /home partition and a relatively small(20GB) /var partition.
Therefore, I need to change the maildir from /var/vmail to /home/vmail.
EDIT: I have copied /var/vmail to /home/vmail to keep all previously created data.
I have made the change in ISPConfig, but maildrop still tries to put mails to /var/vmail
I was getting this error message when sent a test letter:

maildrop[22912]: Unable to change to home directory.
postfix/pipe[22911]: 30CDCC0067: to=<...>, relay=maildrop, delay=50958, delays=50958/0.03/0/0.07, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/bin/maildrop: Unable to change to home directory. )

I have searched the system for "/var/vmail" with "grep -r" and found that I have a postfix entry in main.cf that was something "like virtual_mailbox_mail = /var/vmail".
I have changed it to /home/vmail, restarted postfix and all mail-related processes, but still no avail.

Edit: I have changed /var/vmail to /var/vmail.bak to see what happens, and now it is saying:

maildrop[4939]: Unable to create a dot-lock at /var/vmail/.....
postfix/pipe[4933]: 30CDCC0067: to=<....>, relay=maildrop, delay=67707, delays=67707/0.09/0/0.05, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/bin/maildrop: Unable to create a dot-lock at /var/vmail/...)

EDIT: If I rename /var/vmail.bak back to /var/vmail then the mails are delivered correctly to /var/vmail but I of course cannot see them in a client, as courier search for them in /home/vmail (because it is set in ispconfig)

Could you have any idea that can point me to the right direction?

Thank you in advance! Have a great day!

Marton

Last edited by fmarton; 21st September 2012 at 10:31.
Reply With Quote
Sponsored Links
  #2  
Old 21st September 2012, 14:22
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
Default

This is a permissions issue, maildrop is unable to write to that new path, check and fix the permissions.
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
  #3  
Old 21st September 2012, 14:37
fmarton fmarton is offline
Junior Member
 
Join Date: Sep 2012
Posts: 7
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Thank you for your answer, but I wouldn't think it is a permission issue.
Permissions are set correctly afaik (vmail:vmail 755)
The problem is that maildrop tries to deliver to the wrong place.
If there is a /var/vmail folder mails are arrives there.
However they should arrive to /home/vmail.

I don't know where else I could set the delivery location.
As I read by default it should deliver to the home directory of the user (vmail)
Which is set to /home/vmail

Thanks a lot!
Marton
Reply With Quote
  #4  
Old 22nd September 2012, 04:03
fmarton fmarton is offline
Junior Member
 
Join Date: Sep 2012
Posts: 7
Thanks: 0
Thanked 2 Times in 2 Posts
 
Smile Solution found

Took a while, but I finally solved it.
The grep -r '/var/vmail' did not find the /home/vmail/.mailfilter file which contained the entries for /var/vmail.

So if anyone else interested how to change the maildir location after completing this tutorial, I succeded to change /var/vmail to /home/vmail by following these steps:

1: Change maildir and homedir entries in ISPConfig: System -> Server config -> Mail page
2: Copy the vmail folder to the appropriate location: cp -a /var/vmail /home/vmail
3: Update vmail system user's home directory: usermod -d /home/vmail vmail
4: Set virtual_mailbox_base = /home/vmail in /etc/postfix/main.cf file
5: Update all /var/vmail entries to /home/vmail in /home/vmail/.mailfilter file
6: chown -R vmail:vmail /home/vmail
7: restart all mail services

Make sure that the quota mount options in /etc/fstab are added to the correct drive/partition containing the new maildir folder. (I already did it during the initial setup)

Cheers,
Marton
Reply With Quote
The Following User Says Thank You to fmarton For This Useful Post:
falko (22nd September 2012)
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
rkhunter warnings esezako General 7 27th September 2011 07:28
Hacked server Captain Installation/Configuration 8 23rd December 2010 10:39
Local email delivery does not work anymore after update to 3.0.3 modir Installation/Configuration 14 15th December 2010 16:23
rkhunter report Captain Installation/Configuration 6 10th October 2010 13:05
debian etch courier pop3 issue docean Installation/Configuration 6 20th March 2008 15:38


All times are GMT +2. The time now is 18:03.


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