Saulo Calixto Bonfim wrote:
OK, but my $HOME and $DEFAULT maildroip variables aren't set by me or by
the linux system, but by the mysql database, am I right?
Example:
$ cat /etc/maildroprc
`echo $HOME > /tmp/maildir`
`echo $DEFAULT >> /tmp/maildir`
$
$ mail user...@domain.tld
$
$ cat /tmp/maildir
/var/spool/mail/domain.tld/user
/var/spool/mail/domain.tld/user/Maildir
$
$ mail user...@domain.tld
$
$ cat /tmp/maildir
$
Obviously, $HOME and $DEFAULT in my linux box are variables from the
linux system, and doesn't have nothing to do with maildrop/mysql/courier
environment.
My question again is: why the heck maildrop doesn't get those variables
when maildir is not created?
It has to do with maildrop and only this. I guess you've got something
like this in your maildropmysql.config:
-->%--
maildir_field maildir
homedirectory_field home
-->%--
So maildrop reads the values from your mysql tables and tries to cd to
$home first! If this directory doesn't exist it will normally return
something like
-->%--
relay=maildrop, delay=108, status=deferred (temporary failure. Command
output: /usr/local/bin/maildrop: Unable to change to home directory. )
-->%--
and stop exactly here before any code from maildroprc gets executed.
My suggestion (the same again) is, change the home dir value to either
the home directory of your maildelivery user (vmail?) or to another
existing directory like /var/spool/mail.