# courier-mta - submit error.

## WildCoder

Hello,

I emerged courier to use the mta and the imap server. I configured all the files added a mysql database for my virtual user login, and got the imap to connect without problem. I copied .maildir from an older server into the new one to test and I can access everything fine. My problem is with the mta part.

When I /etc/init.d/courier-authlib restart I get:

 * Stopping Courier mail server:...

 *  Stopping courier-esmtpd...

 *  Stopping courier-esmtpd-msa...

 *  Stopping courier-esmtpd-ssl...

 *  Stopping courier-pop3d...

 *  Stopping courier-pop3d-ssl...

 *  Stopping courier-imapd...

 *  Stopping courier-imapd-ssl...

 *  Stopping courierd...

init: ERR: No such file or directory

 *  Stopping webmaild...

 *  Stopping courierfilterd...                                                                                                                     [ ok ]

 * Starting Courier mail server:...

 *  Starting courierfilterd...

 *  Starting webmaild...

 *  Starting courierd...

 *  Starting esmtpd...

 *  Starting esmtpd-msa...

 *  Starting esmtpd-ssl...

 *  courier-imapd-ssl...                                                                                                                           [ ok ]

in my logs:

May 24 10:53:08 [authdaemond] stopping authdaemond children

May 24 10:53:09 [authdaemond] modules="authmysql", daemons=5

May 24 10:53:09 [authdaemond] Installing libauthmysql

May 24 10:53:09 [authdaemond] Installation complete: authmysql

May 24 10:53:09 [courierd] No such file or directory

When I try to send an email to myself:

echo "To: postmaster" | sendmail

I get:

432 Service temporarily unavailable.

and in the log I see:

May 24 10:53:44 [courieresmtpd] started,ip=[::ffff:192.168.1.102]

May 24 10:53:44 [submit] No such file or directory

But nowhere can I see what file or directory is missing.

Can anybody tell me how I could figure what file or directory it's trying to access? 

Thanks for your help

----------

## adaptr

Your maildir.

Use maildirmake to create a user maildir (not root!); you can copy contents to it afterwards.

Copying an entire maildir usually won't work - as you now see, since courier can't write to it.

----------

## WildCoder

Sorry that's not the problem. I first used maildirmake then copied my old emails over.

But just to double check, I had a new user who wasn't on the old server so nothing was copied over, and I get the same error when I try to email him:

echo "To: john" | sendmail

432 Service temporarily unavailable.

and that in the log:

May 24 14:10:47 [submit] No such file or directory

What's really strange is my imap server is working fine. I can see all emails (the one I copied over)

I even (as a test) set 777 on john' .maildir with the same error.

I even installed the webadmin module adjusted a few things and when I try to restart it I get this:

courier 0.48.1 - Installing new configuration

Installing new configuration...

Executing /usr/sbin/esmtpd-ssl stop ; . /etc/courier/esmtpd-ssl ; test "$ESMTPDSSLSTART" != YES || /usr/sbin/esmtpd-ssl start...

Executing /usr/sbin/esmtpd-msa stop ; . /etc/courier/esmtpd-msa ; test "$ESMTPDSTART" != YES || /usr/sbin/esmtpd-msa start...

Executing /usr/sbin/esmtpd stop ; . /etc/courier/esmtpd ; test "$ESMTPDSTART" != YES || /usr/sbin/esmtpd start...

Executing courier stop...

init: ERR: No such file or directory

not sure why it's using /usr/sbin/esmtpd stop but only courier stop.

Thanks for the help anyway. Any other suggestions? Thanks.

----------

## WildCoder

Reading throught the courier-mta install again shows that I should have "One of the two courierd processes will be running as root". I'm definitely missing courierd processes so it's the start that fails during the init process.

Is there any hook that I could install before starting courier that would tell me which file or directory it's trying to access that would help a lot. I'm at a loss.

Thanks for your help.

----------

## adaptr

There are several possibilities (for files it can't access/create):

- the pid file

- any log files

- a pipe or socket of some sort

- a queue, although that would mean the whole courier system is b0rked...

Unless you post the *actual* contents of some log files (the systemlog and/or any courier specific log files you have) and your configs it's going to be very difficult to say...

Don't try to interpret them, just post them.

Have you tried simply remerging courier-mta ?

----------

## WildCoder

Sure but as far are logs go I posted what was generated by courier already. Anyway here are what I have now:

more /var/log/mail/current

                - Last output repeated twice -

May 24 15:20:18 [authdaemond] stopping authdaemond children

May 24 15:26:27 [authdaemond] modules="authmysql", daemons=5

May 24 15:26:27 [authdaemond] Installing libauthmysql

May 24 15:26:28 [authdaemond] Installation complete: authmysql

May 24 15:26:42 [courierd] No such file or directory

May 24 15:26:53 [submit] No such file or directory

May 24 15:27:30 [authdaemond] stopping authdaemond children

May 24 15:27:31 [authdaemond] modules="authmysql", daemons=5

May 24 15:27:31 [authdaemond] Installing libauthmysql

May 24 15:27:31 [authdaemond] Installation complete: authmysql

May 24 15:27:31 [courierd] No such file or directory

tail -n 50 /var/log/everything/current

May 24 13:26:33 [authdaemond] Installation complete: authmysql

May 24 13:26:34 [courierd] No such file or directory

May 24 13:31:01 [authdaemond] stopping authdaemond children

May 24 13:31:02 [authdaemond] modules="authmysql", daemons=5

May 24 13:31:02 [authdaemond] Installing libauthmysql

May 24 13:31:02 [authdaemond] Installation complete: authmysql

May 24 13:31:03 [courierd] No such file or directory

May 24 13:32:37 [authdaemond] stopping authdaemond children

May 24 13:32:38 [authdaemond] modules="authmysql", daemons=5

May 24 13:32:38 [authdaemond] Installing libauthmysql

May 24 13:32:38 [authdaemond] Installation complete: authmysql

May 24 13:32:38 [courierd] No such file or directory

                - Last output repeated twice -

May 24 14:10:47 [submit] No such file or directory

                - Last output repeated twice -

May 24 14:23:58 [courierd] No such file or directory

May 24 15:20:18 [authdaemond] stopping authdaemond children

May 24 15:26:24 [rc-scripts] ERROR:  "courier-authlib" has not yet been started.

May 24 15:26:27 [authdaemond] modules="authmysql", daemons=5

May 24 15:26:27 [authdaemond] Installing libauthmysql

May 24 15:26:28 [authdaemond] Installation complete: authmysql

May 24 15:26:39 [rc-scripts] ERROR:  "courier" has not yet been started.

May 24 15:26:42 [courierd] No such file or directory

May 24 15:26:53 [submit] No such file or directory

May 24 15:27:30 [authdaemond] stopping authdaemond children

May 24 15:27:31 [authdaemond] modules="authmysql", daemons=5

May 24 15:27:31 [authdaemond] Installing libauthmysql

May 24 15:27:31 [authdaemond] Installation complete: authmysql

May 24 15:27:31 [courierd] No such file or directory

I got the rc-script when I accidentaly stoped the service twice. It usualy doesn't come up.

la /var/run/courier/

total 25

drwxr-xr-x  2 mail root 584 May 24 15:27 .

drwxr-xr-x  5 root root 440 May 24 12:56 ..

-rw-------  1 mail mail   6 May 24 15:27 courierfilter.pid

-rw-r--r--  1 root root   6 May 24 16:22 esmtpd-msa.pid

-rw-------  1 root root   0 May 24 08:33 esmtpd-msa.pid.lock

-rw-r--r--  1 root root   6 May 24 16:22 esmtpd-ssl.pid

-rw-------  1 root root   0 May 24 08:33 esmtpd-ssl.pid.lock

-rw-r--r--  1 root root   6 May 24 16:22 esmtpd.pid

-rw-------  1 root root   0 May 24 08:33 esmtpd.pid.lock

-rw-r--r--  1 root root   6 May 24 15:27 imapd-ssl.pid

-rw-------  1 root root   0 May 24 08:33 imapd-ssl.pid.lock

-rw-------  1 root root   0 May 24 09:29 imapd.pid.lock

-rw-------  1 root root   0 May 24 09:29 pop3d-ssl.pid.lock

-rw-------  1 root root   0 May 24 09:29 pop3d.pid.lock

-rw-r--r--  1 root root   6 May 24 15:27 sqwebmaild.pid

-rw-------  1 root root   0 May 24 08:33 sqwebmaild.pid.lock

-rw-------  1 root root   0 May 24 09:29 sqwebmaild.pid.pcp.lock

la /var/spool/

total 0

drwxr-xr-x   4 root root 144 May 24 13:26 .

drwxr-xr-x  15 root root 392 May 22 11:39 ..

-rw-r--r--   1 root root   0 Apr  7 14:13 .keep

lrwxrwxrwx   1 root root   4 May 24 13:26 courier -> mail

drwxr-x---   4 root cron 120 May  9 15:45 cron

drwxrwxr-x   2 root mail  72 Apr 11 08:11 mail

I created the symbolic link because on courier-mta.org they say it uses /var/spool/courier but not luck.

I can't seem to find any other log files for courier.

The config files have nothing fancy in them:

/etc/courier/courierd:

##VERSION: $Id: courierd.dist.in,v 1.13 2003/12/16 01:19:02 mrsam Exp $

#

# courierd created from courierd.dist by sysconftool

#

# Do not alter lines that begin with ##, they are used when upgrading

# this configuration.

#

#  Copyright 1998 - 2001 Double Precision, Inc.  See COPYING for

#  distribution information.

#

#  This configuration file sets various global options for Courier.

#  The contents of this file is turned into courierd's environment by

#  the courierctl.start script.

##NAME: prefixes:0

#

prefix="/usr"

exec_prefix="/usr"

##NAME: PIDFILE:0

PIDFILE=/var/run/courier/courier.pid

##NAME: PATH:0

#

#

#  Specify the default PATH that everything inherits -- including commands

#  executed from individual .courier files

PATH=/usr/bin:/bin:/usr/bin:/usr/local/bin

##NAME: SHELL:0

#

#  The default shell

SHELL=/bin/sh

##NAME: DSNNOTIFY:0

#

#  If you would like to suppress all bounces for mail forwarded via an

#  individual .courier file, uncomment the following:

#

# DSNNOTIFY=N

##NAME: DYNAMICDELIVERIES:0

#

#  If you would like to disable the ability to generate dynamic delivery

#  instructions, set the following variable to 0.  See dot-courier(5)

#  for more information.

DYNAMICDELIVERIES=1

########################################################################

#

##NAME: DEFAULTDELIVERY:0

#

#  Specify default delivery instructions by setting DEFAULTDELIVERY

#  One of the following definitions of DEFAULTDELIVERY should be

#  uncommented.

#

#  Default deliveries to $HOME/Maildir

#

#  DEFAULTDELIVERY=./Maildir

#

#  Alternatively, use procmail to deliver mail to local mailboxes.

#

#  DEFAULTDELIVERY="| /usr/bin/preline /usr/bin/procmail"

#

#  Here's how to have maildrop handle local deliveries.

#

#  DEFAULTDELIVERY="| /usr/bin/maildrop"

#

#  If you want to automatically enable .forward support globally,

#  use something like this:

#

#  DEFAULTDELIVERY="|| dotforward

#  ./Maildir"

#

#  Yes, it's two lines long, with an embedded newline.  Of course, you can use

#  any default local mail delivery instruction in place of ./Maildir.

DEFAULTDELIVERY="./.maildir"

##NAME: MAILDROPDEFAULT:0

#

#  The following setting initializes the DEFAULT variable in maildrop,

#  the location of the default mailbox.  You should not change this setting

#  unless you REALLY know what you're doing.

MAILDROPDEFAULT=./.maildir

##NAME: ESMTP_CORK:0

#

#  ESMTP_CORK=1 is an extension used with Linux kernel >2.2 that avoids sending

#  partial frames when sending a message via ESMTP.  Set ESMTP_CORK to 0 to

#  disable it (diagnostic option).  In certain situations this option has no

#  effect.  For example, when using SSL the entire channel has an encryption

#  layer around, so courieresmtp is actually talking to a pipe.

ESMTP_CORK=1

##NAME: SOURCE_ADDRESS:0

#

#  Specify the source IP address to be used when making ESMTP connections

#  outbound to deliver mail. If this value is not specified or "0", the

#  kernel will assign the source IP address.

#

#  SOURCE_ADDRESS=127.0.0.1

##NAME: UUXFLAGS:0

#

#  Specify additional flags to uux.  Allowed flags are -g [grade], -j, and

#  -r ONLY.  This environment variable is parsed in a rather simplistic

#  fashion -- it is broken up into space-separate words, and each one is

#  passed to uux together with the mandatory uux flags (namely -p).

UUXFLAGS="-j -g C"

##NAME: ARCHIVEDIR:0

#

#  This is the big-brother option that saves a copy of EACH and EVERY

#  message passing through the system.  Uncomment ARCHIVEDIR, and after

#  a message is delivered, its queue and data file is moved to ARCHIVEDIR

#  instead of being deleted.  You must create the ARCHIVEDIR directory

#  yourself, and it must be owned by the "mail" userid.

#

#  Also, ARCHIVEDIR *MUST* be on the same partition/volume as Courier's

#  mail queue directory.

#

#  All messages will be saved into a flat directory, with one subdirectory

#  created each calendar day.  Therefore, you will need to make sure that

#  your filesystem can handle it.  Each message consists of two files,

#  the control file, and the message data file.  The Linux ext2 filesystem,

#  for example, will start to have problems once there are more than

#  32,000 files in the same directory, so if your system carries a higher

#  daily volume, you'll need to purge out the archive subdirectory several

#  times a day.

#

#  If you fill up an archive directory, mail will continue to move, but

#  not archived.  Caveat emptor.

#

#  ARCHIVEDIR="/usr/lib/courier/bigbrother"

##NAME: ESMTP_USE_STARTTLS:0

#

# The following variables specify whether or not the ESMTP *client* will use

# SSL when talking to a remote ESMTP server that supports SSL.

ESMTP_USE_STARTTLS=1

##NAME: LC_ALL:0

#

# Reset the locale to make sure there are no unexpected surprises

LC_ALL=C

##NAME: COURIERTLS:0

#

# For SSL to work, OpenSSL must be available when Courier is compiled, and

# couriertls must be installed here:

#

# If couriertls is not installed, ESMTP_USE_TLS is quietly ignored.

COURIERTLS=/usr/bin/couriertls

##NAME: ESMTP_TLS_VERIFY_DOMAIN:0

#

# The following variables specify SSL/TLS properties for the ESMTP SSL client.

#

# Set ESMTP_TLS_VERIFY_DOMAIN to 1 if we must verify the domain in the remote

# server's certificate.  For this to actually work as intended, you must

# install root authority certificates in the locations specified by CERTINFO

# setting, and set TLS_VERIFYPEER to PEER.  Otherwise, this is meaningless.

ESMTP_TLS_VERIFY_DOMAIN=0

##NAME: TLS_PROTOCOL:0

#

# TLS_PROTOCOL sets the protocol version.  The possible versions are:

#

# SSL2 - SSLv2

# SSL3 - SSLv3

# TLS1 - TLS1

TLS_PROTOCOL=SSL3

##NAME: TLS_CIPHER_LIST:0

#

# TLS_CIPHER_LIST optionally sets the list of ciphers to be used by the

# OpenSSL library.  In most situations you can leave TLS_CIPHER_LIST

# undefined

#

# TLS_CIPHER_LIST="ALL:!ADH:RC4+RSA:+SSLv2:@STRENGTH"

# TLS_TIMEOUT is currently not implemented, and reserved for future use.

# This is supposed to be an inactivity timeout, but its not yet implemented.

##NAME: TLS_DHCERTFILE:0

#

# TLS_DHCERTFILE - PEM file that stores our Diffie-Hellman cipher pair.

# When OpenSSL is compiled to use Diffie-Hellman ciphers instead of RSA

# you must generate a DH pair that will be used.  In most situations the

# DH pair is to be treated as confidential, and the file specified by

# TLS_DHCERTFILE must not be world-readable.

#

# TLS_DHCERTFILE=

##NAME: TLS_CERTFILE:0

#

# TLS_CERTFILE - certificate to use.  TLS_CERTFILE is required for SSL/TLS

# servers, and is optional for SSL/TLS clients.  TLS_CERTFILE is usually

# treated as confidential, and must not be world-readable.

#

# TLS_CERTFILE=

##NAME: TLS_TRUSTCERTS:0

#

# TLS_TRUSTCERTS=pathname - load trusted certificates from pathname.

# pathname can be a file or a directory. If a file, the file should

# contain a list of trusted certificates, in PEM format. If a

# directory, the directory should contain the trusted certificates,

# in PEM format, one per file and hashed using OpenSSL's c_rehash

# script. TLS_TRUSTCERTS is used by SSL/TLS clients (by specifying

# the -domain option) and by SSL/TLS servers (TLS_VERIFYPEER is set

# to PEER or REQUIREPEER).

#

# We install a default set of root certificates in /usr/share/courier/rootcerts

TLS_TRUSTCERTS=/usr/share/courier/rootcerts

##NAME: TLS_TRUSTSECURITYCERTS:0

#

# TLS_TRUSTSECURITYCERTS=pathname - same as TLS_TRUSTCERTS, except that

# these certs are used when the Courier-specific SECURITY extension is

# specified for a given message. ESMTP_USE_STARTTLS must be set to 1,

# above, and this option implies ESMTP_TLS_VERIFY_DOMAIN.

#

# This setting, of course, can be same as TLS_TRUSTCERTS, however it is

# often desirable to use a separate, private, root CA cert in order to

# create private, organization-internal, secure mail delivery channel

# over an untrusted network, that's validated by X.509 certs signed

# by a private root CA.

#

# !!!NOTE!!! this is an experimental, not heavily tested, extension

#

# TLS_TRUSTSECURITYCERTS=

##NAME: TLS_VERIFYPEER:1

#

# TLS_VERIFYPEER - how to verify server certificates.  This value should

# be kept at its default value of NONE unless you want to enable peer

# certificate verification.

#

# NONE - do not verify anything

#

# PEER - verify the client certificate, if one's presented

#

# REQUIREPEER - require a client certificate, fail if one's not presented

TLS_VERIFYPEER=NONE

/etc/courier/esmtpd:

##VERSION: $Id: esmtpd.dist.in,v 1.20 2004/10/23 16:18:19 mrsam Exp $

#

#

# esmtpd created from esmtpd.dist by sysconftool

#

# Do not alter lines that begin with ##, they are used when upgrading

# this configuration.

#

#  Copyright 1998 - 2004 Double Precision, Inc.  See COPYING for

#  distribution information.

#

#  This configuration file sets various options for Courier's esmtpd server.

#  It is started by couriertcpd, Courier's TCP server.

#  A lot of the stuff here is documented in the manual page for couriertcpd.

##NAME: PATH:0

#

#  Specify the default PATH that everything inherits.

PATH=/usr/bin:/bin:/usr/bin:/usr/local/bin

##NAME: SHELL:0

#

#  The default shell

SHELL=/bin/sh

##NAME: ULIMIT:0

#

#  Sets the maximum size of courieresmtpd's data segment

#

ULIMIT=4096

##NAME: BOFHCHECKDNS:0

#

#  Comment out the following line in order to accept mail with a bad

#  return address.

BOFHCHECKDNS="1"

##NAME: BOFHNOEXPN:1

#

#  Set BOFHNOEXP to 1 to disable EXPN

BOFHNOEXPN=0

##NAME: BOFHNOVRFY:1

#

#  Set BOFHNOVERIFY to disable VRFY

BOFHNOVRFY=0

##NAME: NOADDMSGID:0

#

#  The following environment variables keep Courier from adding

#  default Date: and Message-ID: header to messages which do not have them.

#  If you would like to add default headers only for mail from certain

#  IP address ranges, you can override them in couriertcpd access file,

#  see couriertcpd( :Cool: .

NOADDMSGID="1"

##NAME: NOADDDATE:0

#

NOADDDATE="1"

##NAME: ESMTP_LOG_DIALOG:0

#

#  If set, log the esmtp dialog.

ESMTP_LOG_DIALOG=1

##NAME: AUTH_REQUIRED:0

#

# Set AUTH_REQUIRED to 1 in order to force the client to use ESMTP

# authentication.  You can override AUTH_REQUIRED on a per-IP address basis

# using smtpaccess.  See makesmtpaccess( :Cool: .

AUTH_REQUIRED="0"

#########################################################################

#

##NAME: COURIERTLS:0

#

# The following variables configure ESMTP STARTTLS.  If OpenSSL is available

# during configuration, the couriertls helper gets compiled, and upon

# installation a dummy TLS_CERTFILE gets generated.  courieresmtpd will

# automatically advertise the ESMTP STARTTLS extension if both TLS_CERTFILE

# and COURIERTLS exist.

#

# WARNING: Peer certificate verification has NOT yet been tested.  Proceed

# at your own risk.  Only the basic SSL/TLS functionality is known to be

# working. Keep this in mind as you play with the following variables.

COURIERTLS=/usr/bin/couriertls

##NAME: ESMTP_TLS_REQUIRED:0

#

# Set ESMTP_TLS_REQUIRED to 1 if you REQUIRE SSL/TLS to be used for receiving

# mail.  Setting it here will require it for every connection.  You can also

# set ESMTP_TLS_REQUIRED in the smtpaccess file, see makesmtpaccess( :Cool:  for

# more information

#

# ESMTP_TLS_REQUIRED=1

##NAME: TLS_PROTOCOL:0

#

# 

# TLS_PROTOCOL sets the protocol version.  The possible versions are:

#

# SSL2 - SSLv2

# SSL3 - SSLv3

# TLS1 - TLS1

TLS_PROTOCOL=SSL3

##NAME: TLS_CIPHER_LIST:0

#

# TLS_CIPHER_LIST optionally sets the list of ciphers to be used by the

# OpenSSL library.  In most situations you can leave TLS_CIPHER_LIST

# undefined

#

# TLS_CIPHER_LIST="ALL:!ADH:RC4+RSA:+SSLv2:@STRENGTH"

# TLS_TIMEOUT is currently not implemented, and reserved for future use.

# This is supposed to be an inactivity timeout, but its not yet implemented.

##NAME: TLS_DHCERTFILE:0

#

# TLS_DHCERTFILE - PEM file that stores our Diffie-Hellman cipher pair.

# When OpenSSL is compiled to use Diffie-Hellman ciphers instead of RSA

# you must generate a DH pair that will be used.  In most situations the

# DH pair is to be treated as confidential, and the file specified by

# TLS_DHCERTFILE must not be world-readable.

#

# TLS_DHCERTFILE=

##NAME: TLS_CERTFILE:0

#

# TLS_CERTFILE - certificate to use.  TLS_CERTFILE is required for SSL/TLS

# servers, and is optional for SSL/TLS clients.  TLS_CERTFILE is usually

# treated as confidential, and must not be world-readable.

#

TLS_CERTFILE=/usr/share/courier/esmtpd.pem

##NAME: TLS_CERTINFO:0

#

# TLS_PEERCERTDIR, TLS_OURCACERT - when it is required that all peer

# certificates are signed by specific certificate authorities, set

# TLS_OURCACERT to the name of the file containing the certificate root keys,

# or set TLS_PEERCERTDIR to the name of the directory containing

# the certificate root keys.

#

# For convenience's sake, Courier installs a default set of root certificates

# (which has been swiped from Mozilla's CVS tree  :Smile:  ).  Before enabling

# certificate verification, you should examine all the certificates in the

# following directory.  ANY certificate signed by ANY root cert in

# TLS_PEERCERTDIR will be accepted

#

# TLS_PEERCERTDIR=/usr/share/courier/rootcerts

# TLS_OURCACERT=

##NAME: TLS_VERIFYPEER:0

#

# TLS_VERIFYPEER - how to verify peer certificates.  The possible values of

# this setting are:

#

# NONE - do not verify anything

#

# PEER - verify the peer certificate, if one's presented

#

# REQUIREPEER - require a peer certificate, fail if one's not presented

#

# SSL/TLS servers will usually set TLS_VERIFYPEER to NONE.  SSL/TLS clients

# will usually set TLS_VERIFYPEER to REQUIREPEER.

#

TLS_VERIFYPEER=NONE

##NAME: MAILUSERGROUP:0

#

#  Mail user and group

MAILUSER=mail

MAILGROUP=mail

##NAME: ADDRESS:0

#

#  Address to listen on, can be set to a single IP address.

#

#  ADDRESS=127.0.0.1

##NAME: PORT:1

#

#  PORT specified the port number to listen on.  The standard "smtp" port

#  is port 25.

#

#  Multiple port numbers can be separated by commas.  When multiple port

#  numbers are used it is possibly to select a specific IP address for a

#  given port as "ip.port".  For example, "127.0.0.1.900,192.68.0.1.900"

#  accepts connections on port 900 on IP addresses 127.0.0.1 and 192.68.0.1

#  The ADDRESS setting, if given, is a default for ports that do not have

#  a specified IP address.

PORT=smtp

##NAME: BLACKLISTS:1

#

#  Blacklists we query.

#

#  The BLOCK environment variable is automatically enforced by submit.

#  Nobody really does anything about BLOCK2, this is mainly for use by

#  plug-in mail filters.  If you want Courier to unilaterally block

#  mail from IP addresses listed on the RBL and RSS, and you have a separate

#  filter that keys off BLOCK2, uncomment the following.  If you want

#  to unilaterally block everything on the RBL and RSS, just replaced BLOCK2

#  with BLOCK.  DUL can be added too...

#

# BLACKLISTS='-block=blackholes.mail-abuse.org,BLOCK -block=relays.mail-abuse.org,BLOCK2'

BLACKLISTS=""

##NAME: ACCESSFILE:1

#

#  Access file: $ACCESSFILE - plain text file/dir, $ACCESSFILE.dat - compiled

#  database.

#

ACCESSFILE=${sysconfdir}/smtpaccess

##NAME: MAXDAEMONS:0

#

#  Maximum number of daemons started

#

MAXDAEMONS="40"

##NAME: MAXPERC:0

#

#  Maximum number of connections accepted from the same C address block

#

MAXPERC="5"

##NAME: MAXPERID:0

#

#

#  Maximum number of connections accepted from the same IP address

MAXPERIP="5"

##NAME: PIDFILE:0

#

#  File where couriertcpd will save its process ID

#

PIDFILE=/var/run/courier/esmtpd.pid

##NAME: TCPDOPTS:3

#

# TCPDOPTS can contain other couriertcpd options, such as

# -nodnslookup and -noidentlookup.

#

TCPDOPTS="-stderrlogger=/usr/sbin/courierlogger"

##NAME: ESMTPAUTH:4

#

# To enable authenticated SMTP relaying, uncomment the ESMTPAUTH setting,

# below, and set it to ESMTP authentication mechanisms we support.  Currently

# LOGIN and CRAM-MD5 are available:

#

# ESMTPAUTH="LOGIN CRAM-MD5"

#

# You can also try PLAIN and CRAM-SHA1.  See INSTALL for more information.

#

ESMTPAUTH="CRAM-MD5"

##NAME: ESMTPAUTH_WEBADMIN:4

#

# ESMTPAUTH_WEBADMIN is used by the webadmin module

#

# Don't touch this setting.

ESMTPAUTH_WEBADMIN="LOGIN CRAM-MD5"

##NAME: ESMTPAUTHINFOTLS:3

#

# To enable SASL PLAIN authentication when using TLS, uncomment the following.

# To enable SASL PLAIN with or without TLS, just add PLAIN to ESMTPAUTH,

# above:

#

# ESMTPAUTH_TLS="PLAIN LOGIN CRAM-MD5"

#

# ESMTPAUTH_TLS_WEBADMIN is used by the webadmin module

ESMTPAUTH_TLS="PLAIN LOGIN CRAM-MD5"

##NAME: ESMTPAUTH_TLS_WEBADMIN:4

ESMTPAUTH_TLS_WEBADMIN="PLAIN LOGIN CRAM-MD5"

##NAME: ESMTPDSTART:0

#

# ESMTPDSTART is not referenced anywhere in the standard Courier programs

# or scripts.  Rather, this is a convenient flag to be read by your system

# startup script in /etc/rc.d, like this:

#

#  prefix=/usr

#  exec_prefix=/usr

#  . ${sysconfdir}/esmtpd

#  case x$ESMTPDSTART in

#  x[yY]*)

#        /usr/sbin/esmtpd start

#        ;;

#  esac

#

# The default setting is going to be NO, until Courier is shipped by default

# with enough platforms so that people get annoyed with having to flip it to

# YES every time.

ESMTPDSTART="YES"

and I checked every files it references exist.

Let me know if there's anything else I should provide.

Thanks.

----------

## WildCoder

BTW I did a new emerge of courier. Did an etc-update to see what files I changed which really wasn't a whole lot mainly turning off pop3 and pop3-ssl since I only want imap. and got the exact same result.  :Sad: 

At this point I'm thinking of installing an hex editor on my desktop and look at the courier binary to search for filenames and check if they all exist. I wonder if there's a command line tool that would extract all the string from within a binary file? I'll do a google for that just in case.

----------

## WildCoder

Great, did a search on google and found an Gentoo weekly newsletter with a tip and trick for strings.

6. Tips and Tricks

Reading binary data with strings

This week's tip shows you how to extract ascii content from binary data using strings. This program is useful for determining the contents of non-text files such as core or other binary error files. 

Use strings filename to print the strings of printable characters in the file.

For more information, see man strings.

Boy do I love Gentoo  :Smile:  I do miss the tip and tricks in the latest newsleters though. 

on with the search now...

----------

## WildCoder

I've made some progress!

by using:

strings /usr/sbin/courier

I noticed one path that didn't exist /var/lib/courier/tmp so I did:

mkdir /var/lib/courier/tmp  

chown mail:mail /var/lib/courier/tmp

/etc/init.d/courier-authlib restart

and this time it didn't complain about a missing file or directory.

But in the logs it showed:

May 26 10:46:22 [courierd] Loading STATIC transport module libraries.

May 26 10:46:22 [courierd] Courier 0.48.1 Copyright 1999-2004 Double Precision, Inc.

May 26 10:46:22 [courierd] Installing [0/0]

May 26 10:46:22 [courierd] Installing uucp

May 26 10:46:22 [courierd] Installed: module.uucp - Courier 0.48.1 Copyright 1999-2004 Double Precision, Inc.

May 26 10:46:22 [courierd] Installing local

May 26 10:46:22 [courierd] Installed: module.local - Courier 0.48.1 Copyright 1999-2004 Double Precision, Inc.

May 26 10:46:22 [courierd] Installing fax

May 26 10:46:22 [courierd] Installed: module.fax - Courier 0.48.1 Copyright 1999-2004 Double Precision, Inc.

May 26 10:46:22 [courierd] Installing esmtp

May 26 10:46:22 [courierd] Installed: module.esmtp - Courier 0.48.1 Copyright 1999-2004 Double Precision, Inc.

May 26 10:46:22 [courierd] Installing dsn

May 26 10:46:22 [courierd] Installed: module.dsn - Courier 0.48.1 Copyright 1999-2004 Double Precision, Inc.

May 26 10:46:22 [courierd] Initializing uucp

May 26 10:46:22 [courierd] Initializing local

May 26 10:46:22 [courierd] Initializing fax

May 26 10:46:22 [courierd] Initializing esmtp

May 26 10:46:22 [courierd] Initializing dsn

May 26 10:46:22 [courierd] Started ./courieruucp, pid=25414, maxdels=4, maxhost=4, maxrcpt=16

May 26 10:46:22 [courierd] Started ./courierlocal, pid=25415, maxdels=10, maxhost=4, maxrcpt=1

May 26 10:46:22 [courierd] Started ./courierfax, pid=25462, maxdels=1, maxhost=1, maxrcpt=1

May 26 10:46:22 [courierd] Started ./courieresmtp, pid=25472, maxdels=40, maxhost=4, maxrcpt=100

May 26 10:46:22 [courierd] Started ./courierdsn, pid=25482, maxdels=4, maxhost=1, maxrcpt=1

May 26 10:46:22 [courierd] queuelo=200, queuehi=400

May 26 10:46:23 [courierd] Purging /var/lib/courier/msgq

May 26 10:46:23 [courierd] Purging /var/lib/courier/msgs

May 26 10:46:23 [courierd] No such file or directory

May 26 10:46:23 [courierd] ABNORMAL TERMINATION, exit status: 1

May 26 10:46:23 [courierd] Will restart in 60 seconds.

I checked and it did create the /var/lib/courier/msgq directory automaticaly but not the other one. So I created it

mkdir /var/lib/courier/msgs

chown mail:mail /var/lib/courier/msgs 

and it started clean  :Smile: 

I can even send email to the outside world  :Smile: 

But not to myself yet  :Sad:  I must have screwed up something with the local delivery but it's getting close...  :Smile: 

----------

## adaptr

Have you checked bugzilla for that version of courier ?

It looks like it doesn't get installed completely.

----------

## WildCoder

I did and didn't find anything about it so I posted a bug. Hopefully next ebuild will be fixed. I still can't figure out why I can't send email to myself. Going to start with the installation doc over again. Now that it starts properly I might notice what I did wrong. Finger crossed.

----------

## WildCoder

Strange it seem to have taken some time but the email finaly were delivered in my inbox. Yeepee!

So those 2 extra directory were all that were missing. Why on earth didn't I think of using strings sooner. strings is my friend  :Smile: 

Thanks for the suggestions anyway!

----------

