# mail through maildrop disappears [solved]

## hika

I have setup a Courier-ldap mailserver sometime ago and it works fine.

I'm now working on fetchmail and basically it works except when I use maildrop to deliver the mail to its destination. It says it's OK but the mail is nowhere to be found. If I use sendmail it gets delivered as it should. 

As said I use ldap for user info, authentication etc. Since I wanted the mail separated from the direct userdirectories (some have a linux one in /home others a samba one in /home/samba/users and a few have both and mail without either should be possible). In /etc/courier/authlib/authldaprc I have set LDAP_MAILROOT=/home/samba/maildirs. Under that root every mailaccount has his own mailuser directory with a Maildir in it. As said this works OK. except with maildrop, which comes from courier. Even if I use maildrop as 'maildrop -a -d <username>', where -a should force it to go past authlib, I don't see anything in the log. With sendmail I see it retrieving the maildir through authlib, as it must.

I haven't been able to get maildrop more telling on what it does. I've searched all alternative home locations, /var/mail and more. It seems it sends it to /dev/null. Also the documentation on maildrop as MDA is scares.

Fetchmail works with sendmail, but I need maildrop (according to the courier documentation) for filtering (spamassassin and clamav) or does somebody know how to do it without. An alternative way is through esmtp, but I can't get the authentication part working. Probably because of ldap, esmtp still wants authentication if I turn it of. And adding esmtpuser and asmtppassword to fetchmailrc gives me a syntaxerror.

Working fetchmailrc with sendmail with the maildrop alternative remarked out:

```
set postmaster root

set no bouncemail

# set daemon 90

# set syslog

defaults proto pop3 no dns fetchall no rewrite

poll pop.kpnmail.nl

user so9oz0@kpnmail.nl

pass xxxxxxxx

mda sendmail hika

# mda maildrop -a -d hika
```

And the ESMTP alternative that gives a syntaxerror on esmtpname and esmtppassword and fails without them on the esmtp server[/code] 

```
set postmaster root

set no bouncemail

# set daemon 90

# set syslog

esmtpname hika

esmtppassword xxxxxx

defaults proto pop3 no dns fetchall no rewrite

poll pop.kpnmail.nl

user so9oz0@kpnmail.nl

pass xxxxxxxxx

smtpname hika
```

For testing I run them by hand: fetchmail -f /etc/fetcmailrc, so for now I disabled daemon and syslog.

Any thoughts?

HikaLast edited by hika on Tue Apr 01, 2014 4:12 pm; edited 2 times in total

----------

## hika

I had an idea, that didn't work, but might be the right track.

As said in /etc/courier/authlib/authldaprc the variables LDAP_MAILROOT, LDAP_HOMEDIR and the variable LDAP_MAILDIR determine the location of the maildir:

where I have set LDAP_HOMEDIR=uid, which is the username

eg ${LDAP_MAILROOT}/${ LDAP_HOMEDIR}/${LDAP_MAILDIR}

In /et/courier/courierd I see two variables:

```
DEFAULTDELIVERY=./Maildir

MAILDROPDEFAULT=./Maildir
```

Which points to Maildir inside the homedirectory. I tried both:

```
MAILDROPDEFAULT=/home/samba/maildirs/$USER/Maildir
```

and adding to the top:

```
LDAP_MAILROOT=/home/samba/maildirs

MAILROOT=/home/samba/maildirs
```

The question is how does maildrop determine the maildirectory? Does it just grep the homedirectory somewhere?

I already some time ago simlinked /home/samba/maildirs/hika/Maildir to /home/hika/Maildir, which is the official homedirectory. 

Also the user hika is both set as alias for root and as postmaster.

Any thoughts, while I look and think further?

Hika

----------

## khayyam

hika ...

I've not used courier, but I've used maildrop in conjunction with qmail (an awful long time ago) ... anyhow, what immediately comes to mind here is permissions, and ownership. The maildrop documentation has the following comments:

 *Quote:*   

>  If in delivery mode the user's home directory has the sticky bit set, maildrop immediately terminates with an exit code of EX_TEMPFAIL, without doing anything. Mail servers interpret the EX_TEMPFAIL exit code as a request to reschedule the message for another delivery attempt later. Setting the sticky bit allows $HOME/.mailfilter to be edited while temporarily holding all incoming mail.
> 
> maildrop also terminates with EX_TEMPFAIL if the user's home directory has world write permissions.
> 
> maildrop immediately terminates with EX_TEMPFAIL if the filename is not owned by the user, or if it has any group or world permissions. This includes read permissions. The permissions on $HOME/.mailfilter may only include read and write privileges to the user.
> ...

 

As your using ldap to map users, and delivering to samba shares, I wonder if this isn't simply a question of the permission/ownership of the maildirs?

I'm hypothesising as I've not used these in conjunction, so ignore this if this is something you've already considered.

HTH & best ... khay

----------

## hika

I've seen that text and checked the sticky bit, but it wasn't set, but just to be sure I ran chmod -R u-s on the mailuser directory. Originally I had set all the mail directories as owned by $USER.mail with 770 (or 660 for the files). I have then removed the group rights, with no effect. Also courier itself runs fine and I don't get no error, which baffles me the most.

I was now thinking of temporarily creating a Maildir in /root, but I don't expect any of it.

----------

## hika

Much earlier I saw a file Maildir, containing the messages apear in /home/hika after I think I saw a pop-up about having mail. That's when I created the simlink to the real Maildir in /home/samba/maildirs/hika. After which through maildrop no mail message arrived there anymore. I just saw the same with root. A message on the console: "You have new mail in /var/mail/root" and nothing there (I had created a Maildir there) and a container file "Maildir" with several mails in /root. 

I have seen something about a variable DEFAULT or something like it, used by dropmail defaulting to /var/mail/$USER, but I can't find it back and I haven't been able to find where to set it.

Also in the description of the -a switch, which should force it to go past authlib it talks about "depending on the configuration", but nowhere anything about configuring.

Hika

----------

## hika

I'm looking at the useflags for standalone maildrop. I'm using the one integrated in courier. On of them besides ldap is authlib, which should be automatic in the integrated version.

Can anybody tell me if this authlib support is activated in the integrated version or how to check that out? For to me it sure looks like missing!

Hika

----------

## hika

I think it is a BUG!

running courier-config I get:

```
prefix=/usr

exec_prefix=/usr

bindir=/usr/bin

sbindir=/usr/sbin

libexecdir=/usr/lib64/courier

sysconfdir=/etc/courier

datadir=/usr/share/courier

localstatedir=/var/lib/courier

mailuser=mail

mailgroup=mail

mailuid=8

mailgid=12

configure_args="'--build=x86_64-pc-linux-gnu' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--libdir=/usr/lib64' '--with-ldapconfig=/etc/courier/maildropldap.conf' '--with-fam' '--without-ipv6' '--with-ispell' '--with-ldapaliasd' '--enable-maildroldap' '--without-gnutls' '--enable-mimetypes=/etc/mime.types' '--prefix=/usr' '--disable-root-check' '--mandir=/usr/share/man' '--sysconfdir=/etc/courier' '--libexecdir=/usr/lib64/courier' '--datadir=/usr/share/courier' '--sharedstatedir=/var/lib/courier/com' '--localstatedir=/var/lib/courier' '--with-piddir=/var/run/courier' '--with-authdaemonvar=/var/lib/courier/authdaemon' '--with-mailuser=mail' '--with-mailgroup=mail' '--with-paranoid-smtpext' '--with-db=gdbm' '--disable-autorenamesent' '--cache-file=/var/tmp/portage/mail-mta/courier-0.71/work/courier-0.71/configuring.cache' '--host=x86_64-pc-linux-gnu' 'debug=true' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'CFLAGS=-mtune=generic -march=core2 -O2 -pipe' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' 'CPPFLAGS=' 'CXXFLAGS=-mtune=generic -march=core2 -O2 -pipe' --enable-utf7-folder-encoding"
```

Which looks like the build config.

Next to it mentioning a '--with-ldapconfig=/etc/courier/maildropldap.conf', which probably has to do with mail aliases, I see  '--enable-maildroldap' which seems to me a typo!

Can anybody help me to compile again with '--enable-maildroldap' changed to  '--enable-maildropldap'

----------

## khayyam

hika ...

yes, that does seem to be a typo, I don't see a bug so you might want to report it on b.g.o. You can fix it fairly easily, create a local overlay and copy over mail-mta/courier/courier-0.65.2-r1.ebuild and edit the 'econf' section to correct the typo, then build the manifest and install ... the following should be all that's required:

/etc/portage/make.conf

```
PORTDIR_OVERLAY="/usr/local/portage"
```

... create the directory structure, copy the ebuild and files, edit, build the manifest, and emerge.

```
# mkdir -p /usr/local/portage/mail-mta/courier

# cp -a /usr/portage/mail-mta/courier/{files,metadata.xml,courier-0.65.2-r1.ebuild} /usr/local/portage/mail-mta/courier/

# cd /usr/local/portage/mail-mta/courier/

# sed -i 's/maildroldap/maildropldap/' courier-0.65.2-r1.ebuild

# ebuild courier-0.65.2-r1.ebuild manifest

# emerge -a courier
```

HTH & best ... khay

----------

## hika

Thanks, seems mostly straightforward, but you lost me in two parts. 'on b.g.o.'? 

and 'create  a local overlay'? I've never tried to adapt an emerge config, so what is meant by an overlay? Is there maybe an item in the wiki?

Ah, I read to fast. Your follow up on the overlay etc seems clear. But b.g.o? That is not the bugzilla site?

----------

## khayyam

 *hika wrote:*   

> Thanks, seems mostly straightforward, but you lost me in two parts. 'on b.g.o.'?

 

hika ... sorry, standard acronym here ... bugs.gentoo.org

 *hika wrote:*   

> [...] and 'create  a local overlay'? I've never tried to adapt an emerge config, so what is meant by an overlay? Is there maybe an item in the wiki?

 

Well, in the above I created a "local overlay" in /usr/local/portage ... but, yes, there is an overlays: users' guide (though local overlays are not covered in detail, if at all).

best ... khay

----------

## hika

I added it to an old bugrepport: https://bugs.gentoo.org/show_bug.cgi?id=33166 from ten years ago, where the user solved it, but didn't report back.

The then handlers show status retired.

Hika

----------

## khayyam

 *hika wrote:*   

> I added it to an old bugrepport from ten years ago, where the user solved it, but didn't report back. The then handlers show status retired.

 

hika ... robbat is is on the CC list so it should get re-opened and assigned. You might also want to mention that correcting the typo fixes the issue (I assume it did).

best ... khay

----------

## hika

It will be a few days before I will do it. I'm in the middle of a server migration and are testing things on my own private server.

Looking at the e-build of maildrop stand-alone and seeing the -a switch (use authlib) not working with me, a switch --enable-authlib might also be needed.

I'll know more in a few days.

----------

## hika

I've tried compiling with both '--enable-maildropldap' and '--enable-maildrop-ldap' and even with '--enable-authlib' added. But the behavior stays the same. In the emerge log I see none of them used or even a check. According to the man-page the default usage of authlib can be compiled in or can be optional and enabled through the -a switch, so there is some compilation switch.

I know little about compiling and I don't know, where to find available switches.

----------

## khayyam

 *hika wrote:*   

> I know little about compiling and I don't know, where to find available switches.

 

hika ...

'./configure --help' in the source tree will show what switches are available for that particular build ...

```
# ebuild /path/to/mail-mta/courier/courier-0.69.0.ebuild unpack

# cd /var/tmp/portage/mail-mta/courier-0.69.0/work/courier-0.69.0/

# ./configure --help
```

HTH & best ... khay

----------

## hika

you mean extracting the package locally  and running it in that tree?

I extracted it already to look at the companying text files, so no problem.

----------

## hika

That gives:

```
`configure' configures courier 0.71 to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as

VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:

  -h, --help              display this help and exit

      --help=short        display options specific to this package

      --help=recursive    display the short help of all the included packages

  -V, --version           display version information and exit

  -q, --quiet, --silent   do not print `checking ...' messages

      --cache-file=FILE   cache test results in FILE [disabled]

  -C, --config-cache      alias for `--cache-file=config.cache'

  -n, --no-create         do not create output files

      --srcdir=DIR        find the sources in DIR [configure dir or `..']

Installation directories:

  --prefix=PREFIX         install architecture-independent files in PREFIX

                          [/usr/local]

  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX

                          [PREFIX]

By default, `make install' will install all the files in

`/usr/local/bin', `/usr/local/lib' etc.  You can specify

an installation prefix other than `/usr/local' using `--prefix',

for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:

  --bindir=DIR            user executables [EPREFIX/bin]

  --sbindir=DIR           system admin executables [EPREFIX/sbin]

  --libexecdir=DIR        program executables [EPREFIX/libexec]

  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]

  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]

  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]

  --libdir=DIR            object code libraries [EPREFIX/lib]

  --includedir=DIR        C header files [PREFIX/include]

  --oldincludedir=DIR     C header files for non-gcc [/usr/include]

  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]

  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]

  --infodir=DIR           info documentation [DATAROOTDIR/info]

  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]

  --mandir=DIR            man documentation [DATAROOTDIR/man]

  --docdir=DIR            documentation root [DATAROOTDIR/doc/courier]

  --htmldir=DIR           html documentation [DOCDIR]

  --dvidir=DIR            dvi documentation [DOCDIR]

  --pdfdir=DIR            pdf documentation [DOCDIR]

  --psdir=DIR             ps documentation [DOCDIR]

Program names:

  --program-prefix=PREFIX            prepend PREFIX to installed program names

  --program-suffix=SUFFIX            append SUFFIX to installed program names

  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names

System types:

  --build=BUILD     configure for building on BUILD [guessed]

  --host=HOST       cross-compile to build programs to run on HOST [BUILD]

Optional Features:

  --disable-option-checking  ignore unrecognized --enable/--with options

  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)

  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]

  --enable-dependency-tracking

                          do not reject slow dependency extractors

  --disable-dependency-tracking

                          speeds up one-time build

  --enable-shared[=PKGS]  build shared libraries [default=yes]

  --enable-static[=PKGS]  build static libraries [default=yes]

  --enable-fast-install[=PKGS]

                          optimize for fast installation [default=yes]

  --disable-libtool-lock  avoid locking (might break parallel builds)

  --disable-root-check    Allow build as root (make check will fail)

Optional Packages:

  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]

  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)

  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use

                          both]

  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]

  --with-sysroot=DIR Search for dependent libraries within DIR

                        (or the compiler's sysroot if not specified).

 --with-certsdir Directory where certs are created

  --with-db=gdbm          Use the GDBM library.

  --with-db=db            Use the libdb.a library.

Some influential environment variables:

  CC          C compiler command

  CFLAGS      C compiler flags

  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a

              nonstandard directory <lib dir>

  LIBS        libraries to pass to the linker, e.g. -l<library>

  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if

              you have headers in a nonstandard directory <include dir>

  CPP         C preprocessor

  CXX         C++ compiler command

  CXXFLAGS    C++ compiler flags

  CXXCPP      C++ preprocessor

Use these variables to override the choices made by `configure' or to help

it to find libraries and programs with nonstandard names/locations.

Report bugs to <courier-users@lists.sourceforge.net>.
```

So how do I find the FEATURE and PACKAGE list

----------

## khayyam

 *hika wrote:*   

> So how do I find the FEATURE and PACKAGE list

 

hika ... those entries are standard speak for "whatever features/package there are". It looks to be a standard configure script (designed to work for most purposes) without specific entries for courier (though the --with-certsdir seems to be a courier specific additon). So, where are they ... well, not in the './configure --help' we know that now. What about the documentation, ie, INSTALL.txt or README.txt?

best ... khay

----------

## hika

As said I already opened the package to look for info. README mostly points to install and install is a copy of the information on internet. Mostly focused on after compilation and which I spelled out on my first install.

Any suggestions where to look further, although I understand we're out of standard solutions.

Hika

----------

## hika

The only thing I can think of is going to the developers.

----------

## hika

I emerged mail-filter/maildrop-2.6.0 with authlib support on my workstation. 

I copied the authlib configuration from the server and started courier-authlib.

The maildirs are available through nfs.

Sending a message with maildrop on my workstation with or without the -a switch works like a charm!

I'm now going to compare the emerge logs.

----------

## khayyam

 *hika wrote:*   

> The only thing I can think of is going to the developers.

 

hika ... sorry, I was too busy today to answer any sooner. Yes, try and contact them, according to the courier website (here) there is an irc channel #courier on irc.freenode.net ... though they also have developer and user mailing lists.

 *hika wrote:*   

> Sending a message with maildrop on my workstation with or without the -a switch works like a charm! I'm now going to compare the emerge logs.

 

OK, that suggests that the issue is in the courier build (meaning a gentoo issue, rather than courier)

best ... khay

----------

## hika

The weird thing is that if I look at the ebuild from maildrop, they add a switch '--disable-authlib' to the build if the useflag is not set. Suggesting that authlib support is on by default, but is not in the maildrop in the courier package. Adding a buid switch '--enable-authlib' to the courier build has no effect. This could suggest it is an error on the courier part. On the other side, according to the user who started the bug-report 10 years ago he got it working with a change to the ebuild based on the maildrop ebuild. But then he could have been talking about ldapalias support.

Looking at the build logs doesn't seem to get me any wiser. I have to little background on C compiling.

Hika

----------

## hika

I'm now thinking , as a fast fix, to build the maildrop package on a similar machine to my server and copying the executable. Would that work with dependencies? The CFLAGs etc are the same and they are both up to date. It worked before with problems with a library.

Hika

----------

## khayyam

 *hika wrote:*   

> I'm now thinking , as a fast fix, to build the maildrop package on a similar machine to my server and copying the executable. Would that work with dependencies? The CFLAGs etc are the same and they are both up to date. It worked before with problems with a library.

 

hika ... you can compare the two binaries and see what they are linked against ... like so:

```
# ldd /bin/ls

  linux-gate.so.1 (0xb776c000)

  librt.so.1 => /lib/librt.so.1 (0xb7754000)

  libcap.so.2 => /lib/libcap.so.2 (0xb774e000)

  libacl.so.1 => /lib/libacl.so.1 (0xb7745000)

  libc.so.6 => /lib/libc.so.6 (0xb7599000)

  libpthread.so.0 => /lib/libpthread.so.0 (0xb757d000)

  libattr.so.1 => /lib/libattr.so.1 (0xb7577000)

  /lib/ld-linux.so.2 (0xb776d000)
```

Assuming they are the same it may be possible to swap the broken version out (though, I'd keep it about incase you need to backtrack).

best ... khay

----------

## hika

The stand alone version has two more links. One expected : libcourierauth.so and : libidn.so.11 which isn't coming from the package itself.

I know I can check the package ownership. Do you know the command?

Courier version:

```
   linux-vdso.so.1 (0x00007fff9cfff000)

   libgdbm.so.3 => /usr/lib64/libgdbm.so.3 (0x00007fcaaa94b000)

   libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fcaaa72e000)

   libpcre.so.1 => /lib64/libpcre.so.1 (0x00007fcaaa4c6000)

   libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/libstdc++.so.6 (0x00007fcaaa1c0000)

   libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fcaa9faa000)

   libc.so.6 => /lib64/libc.so.6 (0x00007fcaa9bfa000)

   /lib64/ld-linux-x86-64.so.2 (0x00007fcaaab51000)

   libm.so.6 => /lib64/libm.so.6 (0x00007fcaa98fc000)
```

Stand alone version:

```
   linux-vdso.so.1 (0x00007fff23f1f000)

   libidn.so.11 => /usr/lib64/libidn.so.11 (0x00007f3966638000)

   libgdbm.so.3 => /usr/lib64/libgdbm.so.3 (0x00007f3966431000)

   libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f3966214000)

   libcourierauth.so => /usr/lib64/courier-authlib/libcourierauth.so (0x00007f3966007000)

   libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f3965d9e000)

   libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/libstdc++.so.6 (0x00007f3965a97000)

   libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f3965881000)

   libc.so.6 => /lib64/libc.so.6 (0x00007f39654d1000)

   /lib64/ld-linux-x86-64.so.2 (0x00007f396686c000)

   libm.so.6 => /lib64/libm.so.6 (0x00007f39651d3000)
```

----------

## hika

I found the owner net-dns/libidn.

----------

## khayyam

hika ...

If you need to corrolate a file with a package you can use 'e-file' from app-portage/pfl

```
# for f in /usr/lib64/courier-authlib/libcourierauth.so /usr/lib64/libidn.so.11 ; do e-file $f 2>/dev/null | awk '/^.*\*/{print $3}'; done

net-libs/courier-authlib

net-dns/libidn
```

I'm just outputing the package names here for brevity, more information is provided in the output.

Though as they are installed on one of you hosts you can use 'equery' from app-portage/gentoolkit

```
# equery belongs /usr/lib64/courier-authlib/libcourierauth.so
```

best ... khayLast edited by khayyam on Thu Mar 20, 2014 12:17 am; edited 1 time in total

----------

## hika

Thanks for all your help.

To be on the save side I emerged the net-dns/libidn package on the server and copied the maildrop binary, after of cause moving the original binary to maildrop.org, and it now works.

In the coming time I'm going to look further into the cause for the missing dependency to authlib and when I know more I'll report back.

Hika

----------

## khayyam

hika ...

you're welcome ... pleased to hear that its working as expected. You might want to take some time to add any relevent information to the bug (or open a new bug if the old bug hasn't been re-activated).

best ... khay

----------

## hika

I've already yesterday added to the bug, including a link to this thread. And I've added me to the cc list. If by the time I found more, I've heard nothing from the bug, I will open a new one, linking to the old one and this thread.

Hika

----------

## hika

It definitely is a bug in the maildrop configure script inside courier. The part that arranges it: 

```
COURIERAUTHCONFIG=$ac_cv_path_COURIERAUTHCONFIG

if test -n "$COURIERAUTHCONFIG"; then

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COURIERAUTHCONFIG" >&5

$as_echo "$COURIERAUTHCONFIG" >&6; }

else

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5

$as_echo "no" >&6; }

fi

  test -n "$COURIERAUTHCONFIG" && break

done

# When we're a part of the Courier build, we let Courier do the authlib stuff

if test -d ${srcdir}/../courier

then

   COURIERAUTHCONFIG=""

fi

# Check whether --enable-authlib was given.

if test "${enable_authlib+set}" = set; then :

  enableval=$enable_authlib;

if test "$enableval" = "no"

then

   COURIERAUTHCONFIG=""

fi

fi

AUTHINCLUDE=""

AUTHLDADD=""

AUTHLIB=0

if test "$COURIERAUTHCONFIG" != ""

then

   AUTHINCLUDE=`$COURIERAUTHCONFIG --cppflags`

   AUTHLDADD="`$COURIERAUTHCONFIG --ldflags` -lcourierauth"

   AUTHLIB=1

fi
```

Gives no way to enable the support. Possibly left over from earlier versions, that arranged it differently.

Scanning the whole courier code directory for enable-authlib and enable_authlib only gives this.

Hika

----------

## hika

And maildropldap, maildrop-ldap maidrop_ldap gives no hit at all.

----------

## hika

But checking the linking of sendmail, there is no linking to authlib, but it uses it anyway.

Possibly because it goes by the authlib socket:"/var/lib/courier/authlib/socket". But then why does maildrop not do that.

I should go talk/look/ask on a courier site.

Hika

----------

## hika

I found the way to do it.

The way is using /etc/courier/maildroprc. I already before tried adding HOME="home/samba/maildirs/$USER" to it, but USER is not imported by maildrop in delivery mode.

LOGNAME is. So heading op /etc/courier/maildroprc with:

```
HOME="/home/samba/maildirs/$LOGNAME"

DEFAULT="$HOME/Maildir/"

```

Works.

Hika

----------

## hika

One thing though.

A .mailfilter file in /home/samba/maildirs/$LOGNAME is ignored. It still looks for it in the system define homedirectory /home/$LOGNAME.

The weird thing is that this file does use the changed variables for HOME and DEFAULT, so you don't need to define them again.

Hika

----------

