LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 07-18-2008, 07:27 AM   #1
eliufoo
Member
 
Registered: Oct 2007
Posts: 69

Rep: Reputation: 15
Maildrop : unable to change to home directory


hi guys,

I've been working on this ( /usr/bin/maildrop: Unable to change to home directory)error the for past 5 days with no luck. I've the following setting setup, (Virtual Users With Postfix, PostfixAdmin, Courier, Mailscanner, ClamAV On CentOS).

I have also notice that, courier is not creating maildir, even when postfixadmin is sending a default welcome email. The email get stuck in mailq.

Please ASSIST,

here are my configuration details:

postconf -n

Quote:
imealias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
header_checks = regexp:/etc/postfix/header_checks
inet_interfaces = all
local_recipient_maps = proxy:unixasswd.byname $alias_maps
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = example.co.tz
myhostname = mail.example.co.tz
mynetworks = $config_directory/mynetworks
relay_domains = mysql:/etc/postfix/mysql_relay_domains_maps.cf
smtp_use_tls = no
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_non_fqdn_hostname,reject_non_fqdn_sender,reject_n on_fqdn_recipient,reject_unauth_destination,reject_unauth_pipelining,reject_invalid_hostname,reject_ rbl_client opm.blitzed.org,reject_rbl_client list.dsbl.org,reject_rbl_client bl.spamcop.net,reject_rbl_client sbl-xbl.spamhaus.org
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = smptd
smtpd_sasl_security_options = noanonymous
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /usr/local/ssl/mail.example.co.tz.crt
smtpd_tls_key_file = /usr/local/ssl/mail.example.co.tz.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:/etc/postfix/tls_smtpd_scache
smtpd_use_tls = yes
transport_maps = hash:/etc/postfix/transport
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:1001
virtual_mailbox_base = /var/vmail2
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 1001
virtual_transport = maildrop
virtual_uid_maps = static:1001

master.cf
Quote:
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - - smtpd
567 inet n - n - - smtpd
#submission inet n - n - - smtpd
# -o smtpd_enforce_tls=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
smtps inet n - n - - smtpd
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes

#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -w 90 -d ${recipient}
#
# ====================================================================
#

# VIRTUAL VACATION
#
vacation unix - n n - - pipe
flags=DRhu user=vacation argv=/var/spool/vacation/vacation.pl -f ${sender} -- ${recipient}
maildrop -v
Quote:
maildrop 2.0.2 Copyright 1998-2005 Double Precision, Inc.
GDBM extensions enabled.
Courier Authentication Library extension enabled.
Maildir quota extension enabled.
This program is distributed under the terms of the GNU General Public
License. See COPYING for additional informatio
n.

/usr/sbin/authtest ally@example.co.tz ally

Quote:
Authentication succeeded.

Authenticated: ally@example.co.tz (uid 1001, gid 1001)
Home Directory: /var/vmail2
Maildir: /var/vmail2/ally@example.co.tz/
Quota: 0S
Encrypted Password: $1$c7faaab5$Iz1tRba51pOoYaH/5mWEl/
Cleartext Password: ally
Options: wbnochangepass=1,wbusexsender=1,disableshared=1
[root@mail postfix]#
 
Old 07-18-2008, 09:24 AM   #2
BlueC
Member
 
Registered: Aug 2007
Posts: 122

Rep: Reputation: 17
try this in /etc/maildroprc

Code:
#SHELL="/bin/sh"
VERBOSE=5

# commands and variables for making the mail directories
maildirmake=/usr/lib/courier-imap/bin/maildirmake
mkdir=/bin/mkdir
rmdir=/bin/rmdir
MAILDIR=$DEFAULT

# make the user's mail directory if it doesn't exist
`test -e $MAILDIR`
if ($RETURNCODE != 0)
{
 `$mkdir -p $MAILDIR`
 `$rmdir $MAILDIR`
 `$maildirmake $MAILDIR`
}

# make the .Junk folder if it doesn't exist
JUNK_FOLDER=.Junk
_JUNK_DEST=$MAILDIR/$JUNK_FOLDER/
`test -d $_JUNK_DEST`
if ($RETURNCODE != 0 )
{
 `$maildirmake $_JUNK_DEST`
 #auto subscribe. the following works for courier-imap
 `echo INBOX.Junk >> $MAILDIR/courierimapsubscribed`
}

if (/^X-Spam-Flag:.*YES/)
{
    exception {
        to $DEFAULT/.Junk/
    }
}
That will automatically create the mail directories if they don't exist, and will also put anything marked as spam by SA in the .Junk mail folder for that user.

HTH
C
 
Old 07-18-2008, 10:20 AM   #3
eliufoo
Member
 
Registered: Oct 2007
Posts: 69

Original Poster
Rep: Reputation: 15
hi BlueC,

I'm still facing the same problem. I tried the following

maildrop -V 3 -d ally@example.co.tz maildrop

Quote:
maildrop: authlib: groupid=1001
maildrop: authlib: userid=1001
maildrop: authlib: logname=ally@example.co.tz, home=/var/vmail2, mail=/var/vmail2/ally@example.co.tz/
maildrop: Changing to /var/vmail2
maildrop: Unable to change to home directory.
What other methods can I use to investigate and resolve this problem?

Thanks,
 
Old 07-18-2008, 10:28 AM   #4
BlueC
Member
 
Registered: Aug 2007
Posts: 122

Rep: Reputation: 17
I dunno, does /var/vmail2 exist? Does it have the right permissions?
 
Old 07-18-2008, 10:55 AM   #5
eliufoo
Member
 
Registered: Oct 2007
Posts: 69

Original Poster
Rep: Reputation: 15
It does exist and have all the right permissions.

Are you available now to help with my issue on a IM?
 
Old 07-18-2008, 11:10 AM   #6
BlueC
Member
 
Registered: Aug 2007
Posts: 122

Rep: Reputation: 17
Nope. What is the maildir field in your mysql database?
 
Old 07-18-2008, 11:51 AM   #7
eliufoo
Member
 
Registered: Oct 2007
Posts: 69

Original Poster
Rep: Reputation: 15
it maildir

values inside the fields appear as ally@example.co.tz/
 
Old 07-23-2008, 11:10 AM   #8
eliufoo
Member
 
Registered: Oct 2007
Posts: 69

Original Poster
Rep: Reputation: 15
maildrop: unable to change directory (resolved)

I got this resolved. I take my permission post back.

I change the permission from /var/vmail from 600 (recommend by the tutorial i was using) to 700. i.e

chmod 700 /var/vmail
chown vmail:vmail
Quote:
drwx------ 9 vmail vmail 4096 Jul 23 12:45 vmail
I'm also running the maildroprc script from BlueC

One more thing. I'm using Postfixadmin v2.2.x and it not creating maildir files like it supposed too. My maildir structure looks like /var/vmail/user@domain.tld instead of /var/vmail/domain.tld/user/

Does any one have a solution for this?

Last edited by eliufoo; 07-23-2008 at 11:13 AM.
 
Old 07-23-2008, 03:22 PM   #9
BlueC
Member
 
Registered: Aug 2007
Posts: 122

Rep: Reputation: 17
Quote:
Originally Posted by eliufoo View Post
One more thing. I'm using Postfixadmin v2.2.x and it not creating maildir files like it supposed too. My maildir structure looks like /var/vmail/user@domain.tld instead of /var/vmail/domain.tld/user/

Does any one have a solution for this?
Yes, in config.inc.php from postfixadmin set the following variables as follows:

Code:
$CONF['domain_path'] = 'NO';
$CONF['domain_in_mailbox'] = 'YES';
That should do it.

C
 
Old 07-25-2008, 05:25 AM   #10
eliufoo
Member
 
Registered: Oct 2007
Posts: 69

Original Poster
Rep: Reputation: 15
yap.. it worked. Thanks again BlueC.

Regards,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change HOME directory? bhuwan Linux - Newbie 7 01-30-2006 09:19 AM
Unable to access home directory zillah Solaris / OpenSolaris 50 07-07-2005 07:39 AM
unable to Mount server home directory to clients abhishek124 Linux - Networking 1 06-24-2005 02:44 AM
apache unable to access /home/*/public_html directory cavemanf16 Linux - Software 6 07-08-2004 05:43 AM
how to change a user's Home directory n1wil Linux - General 8 08-24-2002 03:22 PM


All times are GMT -5. The time now is 06:10 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration