Squirrel Mail - ERROR: Connection dropped by IMAP server.

Discussion in 'Installation/Configuration' started by delta440, Apr 4, 2014.

  1. delta440

    delta440 New Member

    I'm trying to setup a mailserver on my ubuntu server, I'm using postfix, courier and squirrel mail. I set it up for virtual users with postfixadmin and mysql. I got postfix admin working although it still has a warning that says I need php5-imap for some features, even though I have it installed. However my main problem is that I can't login to squirrel mail no matter what I try, I've already searched forms and read manuals but nothing I try helps except for sometimes changin the error. Squirrel mail instantly returns the error if you enter a correct login but takes a couple minutes if it's an incorrect one, so it seems to be checking the logins okay. here are a bunch of my configuration files:

    imapd:
    Code:
    ##VERSION: $Id: imapd.dist.in 159 2011-11-14 02:07:00Z mrsam $
    #
    # imapd created from imapd.dist by sysconftool
    #
    # Do not alter lines that begin with ##, they are used when upgrading
    # this configuration.
    #
    #  Copyright 1998 - 2008 Double Precision, Inc.  See COPYING for
    #  distribution information.
    #
    #  This configuration file sets various options for the Courier-IMAP server
    #  when used with the couriertcpd server.
    #  A lot of the stuff here is documented in the manual page for couriertcpd.
    #
    #  NOTE - do not use \ to split long variable contents on multiple lines.
    #  This will break the default imapd.rc script, which parses this file.
    #
    ##NAME: ADDRESS:0
    #
    #  Address to listen on, can be set to a single IP address.
    #
    # ADDRESS=127.0.0.1
    
    ADDRESS=127.0.0.1
    
    ##NAME: PORT:1
    #
    #  Port numbers that connections are accepted on.  The default is 143,
    #  the standard IMAP port.
    #
    #  Multiple port numbers can be separated by commas.  When multiple port
    #  numbers are used it is possible 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 previous ADDRESS setting is a default for ports that do not have
    #  a specified IP address.
    
    PORT=1430
    
    ##NAME: AUTHSERVICE:0
    #
    #  It's possible to authenticate using a different 'service' parameter
    #  depending on the connection's port.  This only works with authentication
    #  modules that use the 'service' parameter, such as PAM.  Example:
    #
    #  AUTHSERVICE143=imap
    #  AUTHSERVICE993=imaps
    
    ##NAME: MAXDAEMONS:0
    #
    #  Maximum number of IMAP servers started
    #
    
    MAXDAEMONS=40
    
    ##NAME: MAXPERIP:0
    #
    #  Maximum number of connections to accept from the same IP address
    
    MAXPERIP=20
    
    ##NAME: PIDFILE:0
    #
    #  File where couriertcpd will save its process ID
    #
    
    PIDFILE=/var/run/courier/imapd.pid
    
    ##NAME: TCPDOPTS:0
    #
    # Miscellaneous couriertcpd options that shouldn't be changed.
    #
    
    TCPDOPTS="-nodnslookup -noidentlookup"
    
    ##NAME: LOGGEROPTS:0
    #
    # courierlogger(1) options.                                        
    #
    
    LOGGEROPTS="-name=imapd"
    
    ##NAME: DEFDOMAIN:0
    #
    # Optional default domain. If the username does not contain the         
    # first character of DEFDOMAIN, then it is appended to the username.
    # If DEFDOMAIN and DOMAINSEP are both set, then DEFDOMAIN is appended
    # only if the username does not contain any character from DOMAINSEP.
    # You can set different default domains based on the the interface IP
    # address using the -access and -accesslocal options of couriertcpd(1).
    
    #DEFDOMAIN="@example.com"
    
    ##NAME: IMAP_CAPABILITY:1
    #
    # IMAP_CAPABILITY specifies what most of the response should be to the
    # CAPABILITY command.
    #
    # If you have properly configured Courier to use CRAM-MD5, CRAM-SHA1, or
    # CRAM-SHA256 authentication (see INSTALL), set IMAP_CAPABILITY as follows:
    #
    # IMAP_CAPABILITY="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=CRAM-MD5 AUTH=CRAM-SHA1 AUTH=CRAM-SHA256 IDLE"
    #
    
    IMAP_CAPABILITY="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE"
    
    ##NAME: KEYWORDS_CAPABILITY:0
    #
    # IMAP_KEYWORDS=1 enables custom IMAP keywords.  Set this option to 0 to
    # disable custom keywords.
    #
    # IMAP_KEYWORDS=2 also enables custom IMAP keywords, but uses a slower
    # algorithm. Use this setting if keyword-related problems occur when
    # multiple IMAP clients are updating keywords on the same message.
    
    IMAP_KEYWORDS=1
    
    ##NAME: ACL_CAPABILITY:0
    #
    # IMAP_ACL=1 enables IMAP ACL extension. Set this option to 0 to
    # disable ACL capabilities announce.
    
    IMAP_ACL=1
    
    ##NAME: SMAP1_CAPABILITY:0
    #
    # EXPERIMENTAL
    #
    # To enable the experimental "Simple Mail Access Protocol" extensions,
    # uncomment the following setting.
    #
    # SMAP_CAPABILITY=SMAP1
    
    ##NAME: IMAP_CAPABILITY_ORIG:2
    #
    # For use by webadmin
    
    IMAP_CAPABILITY_ORIG="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=CRAM-MD5 AUTH=CRAM-SHA1 AUTH=CRAM-SHA256 IDLE"
    
    ##NAME: IMAP_PROXY:0
    #
    # Enable proxying.  See README.proxy
    
    IMAP_PROXY=0
    
    ##NAME: PROXY_HOSTNAME:0
    #
    # Override value from gethostname() when checking if a proxy connection is
    # required.
    #
    # PROXY_HOSTNAME=
    
    ##NAME: IMAP_PROXY_FOREIGN:0
    #
    # Proxying to non-Courier servers.  Re-sends the CAPABILITY command after
    # logging in to the remote server.  May not work with all IMAP clients.
    
    IMAP_PROXY_FOREIGN=0
    
    ##NAME: IMAP_IDLE_TIMEOUT:0
    #
    # This setting controls how often
    # the server polls for changes to the folder, in IDLE mode (in seconds).
    
    IMAP_IDLE_TIMEOUT=60
    
    ##NAME: IMAP_MAILBOX_SANITY_CHECK:0
    #
    # Sanity check -- make sure home directory and maildir's ownership matches
    # the IMAP server's effective uid and gid
    
    IMAP_MAILBOX_SANITY_CHECK=1
    
    ##NAME: IMAP_CAPABILITY_TLS:0
    #
    # The following setting will advertise SASL PLAIN authentication after
    # STARTTLS is established.  If you want to allow SASL PLAIN authentication
    # with or without TLS then just comment this out, and add AUTH=PLAIN to
    # IMAP_CAPABILITY
    
    IMAP_CAPABILITY_TLS="$IMAP_CAPABILITY AUTH=PLAIN"
    
    ##NAME: IMAP_TLS_ORIG:0
    #
    # For use by webadmin
    
    IMAP_CAPABILITY_TLS_ORIG="$IMAP_CAPABILITY_ORIG AUTH=PLAIN"
    
    ##NAME: IMAP_DISABLETHREADSORT:0
    #
    # Set IMAP_DISABLETHREADSORT to disable the THREAD and SORT commands -
    # server side sorting and threading.
    #
    # Those capabilities will still be advertised, but the server will reject
    # them.  Set this option if you want to disable all the extra load from
    # server-side threading and sorting.  Not advertising those capabilities
    # will simply result in the clients reading the entire folder, and sorting
    # it on the client side.  That will still put some load on the server.
    # advertising these capabilities, but rejecting the commands, will stop this
    # silliness.
    #
    
    IMAP_DISABLETHREADSORT=0
    
    ##NAME: IMAP_CHECK_ALL_FOLDERS:0
    #
    # Set IMAP_CHECK_ALL_FOLDERS to 1 if you want the server to check for new
    # mail in every folder.  Not all IMAP clients use the IMAP's new mail
    # indicator, but some do.  Normally new mail is checked only in INBOX,
    # because it is a comparatively time consuming operation, and it would be
    # a complete waste of time unless mail filters are used to deliver
    # mail directly to folders.
    #
    # When IMAP clients are used which support new mail indication, and when
    # mail filters are used to sort incoming mail into folders, setting
    # IMAP_CHECK_ALL_FOLDERS to 1 will allow IMAP clients to announce new
    # mail in folders.  Note that this will result in slightly more load on the
    # server.
    #
    
    IMAP_CHECK_ALL_FOLDERS=0
    
    ##NAME: IMAP_OBSOLETE_CLIENT:0
    #
    # Set IMAP_OBSOLETE_CLIENT if your IMAP client expects \\NoInferiors to mean
    # what \\HasNoChildren really means.
    
    IMAP_OBSOLETE_CLIENT=0
    
    ##NAME: IMAP_UMASK:0
    #
    # IMAP_UMASK sets the umask of the server process.  The value of IMAP_UMASK is
    # simply passed to the "umask" command.  The default value is 022.
    #
    # This feature is mostly useful for shared folders, where the file permissions
    # of the messages may be important.
    
    IMAP_UMASK=022
    
    ##NAME: IMAP_ULIMITD:0
    #
    # IMAP_ULIMITD sets the maximum size of the data segment of the server
    # process.  The value of IMAP_ULIMITD is simply passed to the "ulimit -d"
    # command (or ulimit -v).  The argument to ulimi sets the upper limit on the
    # size of the data segment of the server process, in kilobytes.  The default
    # value of 65536 sets a very generous limit of 64 megabytes, which should
    # be more than plenty for anyone.
    #
    # This feature is used as an additional safety check that should stop
    # any potential denial-of-service attacks that exploit any kind of
    # a memory leak to exhaust all the available memory on the server.
    # It is theoretically possible that obscenely huge folders will also
    # result in the server running out of memory when doing server-side
    # sorting (by my calculations you have to have at least 100,000 messages
    # in a single folder, for that to happen).
    
    IMAP_ULIMITD=131072
    
    ##NAME: IMAP_USELOCKS:0
    #
    # Setting IMAP_USELOCKS to 1 will use dot-locking to support concurrent
    # multiple access to the same folder.  This incurs slight additional
    # overhead.  Concurrent multiple access will still work without this setting,
    # however occasionally a minor race condition may result in an IMAP client
    # downloading the same message twice, or a keyword update will fail.
    #
    # IMAP_USELOCKS=1 is strongly recommended when shared folders are used.
    
    IMAP_USELOCKS=1
    
    ##NAME: IMAP_SHAREDINDEXFILE:0
    #
    # The index of all accessible folders.  Do not change this setting unless
    # you know what you're doing.  See README.sharedfolders for additional
    # information.
    
    IMAP_SHAREDINDEXFILE=/etc/courier/shared/index
    
    ##NAME: IMAP_ENHANCEDIDLE:0
    #
    # If Courier was compiled with the File Alteration Monitor, setting
    # IMAP_ENHANCEDIDLE to 1 enables enhanced IDLE mode, where multiple
    # clients may open the same folder concurrently, and receive updates to
    # folder contents in realtime.  See the imapd(8) man page for additional
    # information.
    #
    # IMPORTANT: IMAP_USELOCKS *MUST* also be set to 1, and IDLE must be included
    # in the IMAP_CAPABILITY list.
    #
    
    IMAP_ENHANCEDIDLE=0
    
    ##NAME: IMAP_TRASHFOLDERNAME:0
    #
    # The name of the magic trash Folder.  For MSOE compatibility,
    # you can set IMAP_TRASHFOLDERNAME="Deleted Items".
    #
    # IMPORTANT:  If you change this, you must also change IMAP_EMPTYTRASH
    
    IMAP_TRASHFOLDERNAME=Trash
    
    ##NAME: IMAP_EMPTYTRASH:0
    #
    # The following setting is optional, and causes messages from the given
    # folder to be automatically deleted after the given number of days.
    # IMAP_EMPTYTRASH is a comma-separated list of folder:days.  The default
    # setting, below, purges 7 day old messages from the Trash folder.
    # Another useful setting would be:
    #
    # IMAP_EMPTYTRASH=Trash:7,Sent:30
    #
    # This would also delete messages from the Sent folder (presumably copies
    # of sent mail) after 30 days.  This is a global setting that is applied to
    # every mail account, and is probably useful in a controlled, corporate
    # environment.
    #
    # Important: the purging is controlled by CTIME, not MTIME (the file time
    # as shown by ls).  It is perfectly ordinary to see stuff in Trash that's
    # a year old.  That's the file modification time, MTIME, that's displayed.
    # This is generally when the message was originally delivered to this
    # mailbox.  Purging is controlled by a different timestamp, CTIME, which is
    # changed when the file is moved to the Trash folder (and at other times too).
    #
    # You might want to disable this setting in certain situations - it results
    # in a stat() of every file in each folder, at login and logout.
    #
    
    IMAP_EMPTYTRASH=Trash:7
    
    ##NAME: IMAP_MOVE_EXPUNGE_TO_TRASH:0
    #
    # Set IMAP_MOVE_EXPUNGE_TO_TRASH to move expunged messages to Trash.  This
    # effectively allows an undo of message deletion by fishing the deleted
    # mail from trash.  Trash can be manually expunged as usually, and mail
    # will get automatically expunged from Trash according to IMAP_EMPTYTRASH.
    #
    # NOTE: shared folders are still expunged as usual.  Shared folders are
    # not affected.
    #
    
    IMAP_MOVE_EXPUNGE_TO_TRASH=0
    
    ##NAME: IMAP_LOG_DELETIONS:0
    #
    #
    # Set IMAP_LOG_DELETIONS to log all message deletions to syslog.
    #
    # IMAP_LOG_DELETIONS=1
    
    ##NAME: IMAPDEBUGFILE:0
    #
    # IMAPDEBUGFILE="imaplog.dat"
    #
    # Generate diagnostic logging of IMAP commands.
    #
    # Set this globally, restart the server. Touch this file in an account's
    # maildir directory, and Courier-IMAP will append all IMAP commands received
    # for new sessions for this account. NOTE: existing IMAP sessions are not
    # affected, only new IMAP logins.
    
    
    ##NAME: OUTBOX:0
    #
    # The next set of options deal with the "Outbox" enhancement.
    # Uncomment the following setting to create a special folder, named
    # INBOX.Outbox
    #
    # OUTBOX=.Outbox
    
    ##NAME: SENDMAIL:0
    #
    # If OUTBOX is defined, mail can be sent via the IMAP connection by copying
    # a message to the INBOX.Outbox folder.  For all practical matters,
    # INBOX.Outbox looks and behaves just like any other IMAP folder.  If this
    # folder doesn't exist it must be created by the IMAP mail client, just
    # like any other IMAP folder.  The kicker: any message copied or moved to
    # this folder is will be E-mailed by the Courier-IMAP server, by running
    # the SENDMAIL program.  Therefore, messages copied or moved to this
    # folder must be well-formed RFC-2822 messages, with the recipient list
    # specified in the To:, Cc:, and Bcc: headers.  Courier-IMAP relies on
    # SENDMAIL to read the recipient list from these headers (and delete the Bcc:
    # header) by running the command "$SENDMAIL -oi -t -f $SENDER", with the
    # message piped on standard input.  $SENDER will be the return address
    # of the message, which is set by the authentication module.
    #
    # DO NOT MODIFY SENDMAIL, below, unless you know what you're doing.
    #
    
    SENDMAIL=/usr/sbin/sendmail
    
    ##NAME: HEADERFROM:0
    #
    # For administrative and oversight purposes, the return address, $SENDER
    # will also be saved in the X-IMAP-Sender mail header.  This header gets
    # added to the sent E-mail (but it doesn't get saved in the copy of the
    # message that's saved in the folder)
    #
    # WARNING - By enabling OUTBOX above, *every* IMAP mail client will receive
    # the magic OUTBOX treatment.  Therefore advance LARTing is in order for
    # _all_ of your lusers, until every one of them is aware of this.  Otherwise if
    # OUTBOX is left at its default setting - a folder name that might be used
    # accidentally - some people may be in for a rude surprise.  You can redefine
    # the name of the magic folder by changing OUTBOX, above.  You should do that
    # and pick a less-obvious name.  Perhaps brand it with your organizational
    # name ( OUTBOX=.WidgetsAndSonsOutbox )
    
    HEADERFROM=X-IMAP-Sender
    
    ##NAME: OUTBOX_MULTIPLE_SEND:0
    #
    # Remove the following comment to allow a COPY of more than one message to
    # the Outbox, at a time.
    #
    # OUTBOX_MULTIPLE_SEND=1
    
    ##NAME: IMAPDSTART:0
    #
    # IMAPDSTART is not used directly.  Rather, this is a convenient flag to
    # be read by your system startup script in /etc/rc.d, like this:
    #
    #  . /etc/courier/imapd
    #
    #  case x$IMAPDSTART in
    #  x[yY]*)
    #        /usr/lib/courier/imapd.rc start
    #        ;;
    #  esac
    #
    # The default setting is going to be NO, so you'll have to manually flip
    # it to yes.
    
    IMAPDSTART=YES
    
    ##NAME: MAILDIRPATH:0
    #
    # MAILDIRPATH - directory name of the maildir directory.
    #
    MAILDIRPATH=Maildir
    
    
    authdaemonrc:
    Code:
    ##VERSION: $Id: authdaemonrc.in,v 1.13 2005/10/05 00:07:32 mrsam Exp $
    #
    # Copyright 2000-2005 Double Precision, Inc.  See COPYING for
    # distribution information.
    #
    # authdaemonrc created from authdaemonrc.dist by sysconftool
    #
    # Do not alter lines that begin with ##, they are used when upgrading
    # this configuration.
    #
    # This file configures authdaemond, the resident authentication daemon.
    #
    # Comments in this file are ignored.  Although this file is intended to
    # be sourced as a shell script, authdaemond parses it manually, so
    # the acceptable syntax is a bit limited.  Multiline variable contents,
    # with the \ continuation character, are not allowed.  Everything must
    # fit on one line.  Do not use any additional whitespace for indentation,
    # or anything else.
    
    ##NAME: authmodulelist:2
    #
    # The authentication modules that are linked into authdaemond.  The
    # default list is installed.  You may selectively disable modules simply
    # by removing them from the following list.  The available modules you
    # can use are: authuserdb authpam authpgsql authldap authmysql authcustom authpipe
    
    authmodulelist="authmysql"
    
    ##NAME: authmodulelistorig:3
    #
    # This setting is used by Courier's webadmin module, and should be left
    # alone
    
    authmodulelistorig="authuserdb authpam authpgsql authldap authmysql authcustom authpipe"
    
    ##NAME: daemons:0
    #
    # The number of daemon processes that are started.  authdaemon is typically
    # installed where authentication modules are relatively expensive: such
    # as authldap, or authmysql, so it's better to have a number of them running.
    # PLEASE NOTE:  Some platforms may experience a problem if there's more than
    # one daemon.  Specifically, SystemV derived platforms that use TLI with
    # socket emulation.  I'm suspicious of TLI's ability to handle multiple
    # processes accepting connections on the same filesystem domain socket.
    #
    # You may need to increase daemons if as your system load increases.  Symptoms
    # include sporadic authentication failures.  If you start getting
    # authentication failures, increase daemons.  However, the default of 5
    # SHOULD be sufficient.  Bumping up daemon count is only a short-term
    # solution.  The permanent solution is to add more resources: RAM, faster
    # disks, faster CPUs...
    
    daemons=5
    
    ##NAME: authdaemonvar:2
    #
    # authdaemonvar is here, but is not used directly by authdaemond.  It's
    # used by various configuration and build scripts, so don't touch it!
    
    authdaemonvar=/var/run/courier/authdaemon
    
    ##NAME: DEBUG_LOGIN:0
    #
    # Dump additional diagnostics to syslog
    #
    # DEBUG_LOGIN=0   - turn off debugging
    # DEBUG_LOGIN=1   - turn on debugging
    # DEBUG_LOGIN=2   - turn on debugging + log passwords too
    #
    # ** YES ** - DEBUG_LOGIN=2 places passwords into syslog.
    #
    # Note that most information is sent to syslog at level 'debug', so
    # you may need to modify your /etc/syslog.conf to be able to see it.
    
    DEBUG_LOGIN=2
    
    ##NAME: DEFAULTOPTIONS:0
    #
    # A comma-separated list of option=value pairs. Each option is applied
    # to an account if the account does not have its own specific value for
    # that option. So for example, you can set
    #   DEFAULTOPTIONS="disablewebmail=1,disableimap=1"
    # and then enable webmail and/or imap on individual accounts by setting
    # disablewebmail=0 and/or disableimap=0 on the account.
    
    DEFAULTOPTIONS=""
    
    ##NAME: LOGGEROPTS:0
    #
    # courierlogger(1) options, e.g. to set syslog facility
    #
    
    LOGGEROPTS=""
    
    ##NAME: LDAP_TLS_OPTIONS:0
    #
    # Options documented in ldap.conf(5) can be set here, prefixed with 'LDAP'.
    # Examples:
    #
    #LDAPTLS_CACERT=/path/to/cacert.pem
    #LDAPTLS_REQCERT=demand
    #LDAPTLS_CERT=/path/to/clientcert.pem
    #LDAPTLS_KEY=/path/to/clientkey.pem
    
    
    authmysql:
    Code:
    ##VERSION: $Id: authmysqlrc,v 1.20 2007/10/07 02:50:45 mrsam Exp $
    #
    # Copyright 2000-2007 Double Precision, Inc.  See COPYING for
    # distribution information.
    #
    # Do not alter lines that begin with ##, they are used when upgrading
    # this configuration.
    #
    # authmysqlrc created from authmysqlrc.dist by sysconftool
    #
    # DO NOT INSTALL THIS FILE with world read permissions.  This file
    # might contain the MySQL admin password!
    #
    # Each line in this file must follow the following format:
    #
    # field[spaces|tabs]value
    #
    # That is, the name of the field, followed by spaces or tabs, followed by
    # field value.  Trailing spaces are prohibited.
    
    
    ##NAME: LOCATION:0
    #
    # The server name, userid, and password used to log in.
    
    MYSQL_SERVER		localhost
    MYSQL_USERNAME		postfix
    MYSQL_PASSWORD		********* <my password
    
    ##NAME: SSLINFO:0
    #
    # The SSL information.
    #
    # To use SSL-encrypted connections, define the following variables (available
    # in MySQL 4.0, or higher):
    #
    #
    # MYSQL_SSL_KEY        /path/to/file
    # MYSQL_SSL_CERT       /path/to/file
    # MYSQL_SSL_CACERT     /path/to/file
    # MYSQL_SSL_CAPATH     /path/to/file
    # MYSQL_SSL_CIPHERS    ALL:!DES
    
    ##NAME: MYSQL_SOCKET:0
    #
    # MYSQL_SOCKET can be used with MySQL version 3.22 or later, it specifies the
    # filesystem pipe used for the connection
    #
    # MYSQL_SOCKET		/var/run/mysqld/mysqld.sock
    
    ##NAME: MYSQL_PORT:0
    #
    # MYSQL_PORT can be used with MySQL version 3.22 or later to specify a port to
    # connect to.
    
    MYSQL_PORT		0
    
    ##NAME: MYSQL_OPT:0
    #
    # Leave MYSQL_OPT as 0, unless you know what you're doing.
    
    MYSQL_OPT		0
    
    ##NAME: MYSQL_DATABASE:0
    #
    # The name of the MySQL database we will open:
    
    MYSQL_DATABASE		postfix
    
    #NAME: MYSQL_CHARACTER_SET:0
    #
    # This is optional. MYSQL_CHARACTER_SET installs a character set. This option
    # can be used with  MySQL version 4.1 or later. MySQL supports 70+ collations
    # for 30+ character sets. See MySQL documentations for more detalis.
    #
    # MYSQL_CHARACTER_SET latin1
    
    ##NAME: MYSQL_USER_TABLE:0
    #
    # The name of the table containing your user data.  See README.authmysqlrc
    # for the required fields in this table. 
    
    MYSQL_USER_TABLE	mailbox
    
    ##NAME: MYSQL_CRYPT_PWFIELD:0
    #
    # Either MYSQL_CRYPT_PWFIELD or MYSQL_CLEAR_PWFIELD must be defined.  Both
    # are OK too. crypted passwords go into MYSQL_CRYPT_PWFIELD, cleartext
    # passwords go into MYSQL_CLEAR_PWFIELD.  Cleartext passwords allow
    # CRAM-MD5 authentication to be implemented.
    
    MYSQL_CRYPT_PWFIELD	password
    
    ##NAME: MYSQL_CLEAR_PWFIELD:0
    #
    #
    # MYSQL_CLEAR_PWFIELD	clear
    
    ##NAME: MYSQL_DEFAULT_DOMAIN:0
    #
    # If DEFAULT_DOMAIN is defined, and someone tries to log in as 'user',
    # we will look up 'user@DEFAULT_DOMAIN' instead.
    #
    #
    # DEFAULT_DOMAIN		example.com
    
    ##NAME: MYSQL_UID_FIELD:0
    #
    # Other fields in the mysql table:
    #
    # MYSQL_UID_FIELD - contains the numerical userid of the account
    #
    MYSQL_UID_FIELD		5000
    
    ##NAME: MYSQL_GID_FIELD:0
    #
    # Numerical groupid of the account
    
    MYSQL_GID_FIELD		5000
    
    ##NAME: MYSQL_LOGIN_FIELD:0
    #
    # The login id, default is id.  Basically the query is:
    #
    #  SELECT MYSQL_UID_FIELD, MYSQL_GID_FIELD, ... WHERE id='loginid'
    #
    
    MYSQL_LOGIN_FIELD	username
    
    ##NAME: MYSQL_HOME_FIELD:0
    #
    
    MYSQL_HOME_FIELD	'/home/vmail'
    
    ##NAME: MYSQL_NAME_FIELD:0
    #
    # The user's name (optional)
    
    MYSQL_NAME_FIELD	name
    
    ##NAME: MYSQL_MAILDIR_FIELD:0
    #
    # This is an optional field, and can be used to specify an arbitrary
    # location of the maildir for the account, which normally defaults to
    # $HOME/Maildir (where $HOME is read from MYSQL_HOME_FIELD).
    #
    # You still need to provide a MYSQL_HOME_FIELD, even if you uncomment this
    # out.
    #
    MYSQL_MAILDIR_FIELD	maildir
    
    ##NAME: MYSQL_DEFAULTDELIVERY:0
    #
    # Courier mail server only: optional field specifies custom mail delivery
    # instructions for this account (if defined) -- essentially overrides
    # DEFAULTDELIVERY from ${sysconfdir}/courierd
    #
    # MYSQL_DEFAULTDELIVERY defaultdelivery
    
    ##NAME: MYSQL_QUOTA_FIELD:0
    #
    # Define MYSQL_QUOTA_FIELD to be the name of the field that can optionally
    # specify a maildir quota.  See README.maildirquota for more information 
    #
    MYSQL_QUOTA_FIELD	concat(quota,'S'
    
    ##NAME: MYSQL_AUXOPTIONS:0
    #
    # Auxiliary options.  The MYSQL_AUXOPTIONS field should be a char field that
    # contains a single string consisting of comma-separated "ATTRIBUTE=NAME"
    # pairs.  These names are additional attributes that define various per-account
    # "options", as given in INSTALL's description of the "Account OPTIONS"
    # setting.
    #
    # MYSQL_AUXOPTIONS_FIELD	auxoptions
    #
    # You might want to try something like this, if you'd like to use a bunch
    # of individual fields, instead of a single text blob:
    #
    # MYSQL_AUXOPTIONS_FIELD	CONCAT("disableimap=",disableimap,",disablepop3=",disablepop3,",disablewebmail=",disablewebmail,",sharedgroup=",sharedgroup)
    #
    # This will let you define fields called "disableimap", etc, with the end result
    # being something that the OPTIONS parser understands.
    
    
    ##NAME: MYSQL_WHERE_CLAUSE:0
    #
    # This is optional, MYSQL_WHERE_CLAUSE can be basically set to an arbitrary
    # fixed string that is appended to the WHERE clause of our query
    #
    # MYSQL_WHERE_CLAUSE	server='mailhost.example.com'
    
    ##NAME: MYSQL_SELECT_CLAUSE:0
    #
    # (EXPERIMENTAL)
    # This is optional, MYSQL_SELECT_CLAUSE can be set when you have a database,
    # which is structuraly different from proposed. The fixed string will
    # be used to do a SELECT operation on database, which should return fields
    # in order specified bellow:
    #
    # username, cryptpw, clearpw, uid, gid, home, maildir, quota, fullname, options
    #
    # The username field should include the domain (see example below).
    #
    # Enabling this option causes ignorance of any other field-related
    # options, excluding default domain.
    #
    # There are two variables, which you can use. Substitution will be made
    # for them, so you can put entered username (local part) and domain name
    # in the right place of your query. These variables are:
    #	 	$(local_part), $(domain), $(service)
    #
    # If a $(domain) is empty (not given by the remote user) the default domain
    # name is used in its place.
    #
    # $(service) will expand out to the service being authenticated: imap, imaps,
    # pop3 or pop3s.  Courier mail server only: service will also expand out to
    # "courier", when searching for local mail account's location.  In this case,
    # if the "maildir" field is not empty it will be used in place of
    # DEFAULTDELIVERY.  Courier mail server will also use esmtp when doing
    # authenticated ESMTP.
    #
    # This example is a little bit modified adaptation of vmail-sql
    # database scheme:
    #
    # MYSQL_SELECT_CLAUSE	SELECT CONCAT(popbox.local_part, '@', popbox.domain_name),			\
    #			CONCAT('{MD5}', popbox.password_hash),		\
    #			popbox.clearpw,					\
    #			domain.uid,					\
    #			domain.gid,					\
    #			CONCAT(domain.path, '/', popbox.mbox_name),	\
    #			'',						\
    #			domain.quota,					\
    #			'',						\
    #			CONCAT("disableimap=",disableimap,",disablepop3=",    \
    #                              disablepop3,",disablewebmail=",disablewebmail, \
    #                              ",sharedgroup=",sharedgroup)             \
    #			FROM popbox, domain				\
    #			WHERE popbox.local_part = '$(local_part)'	\
    #			AND popbox.domain_name = '$(domain)'		\
    #			AND popbox.domain_name = domain.domain_name
    
    
    ##NAME: MYSQL_ENUMERATE_CLAUSE:1
    #
    # {EXPERIMENTAL}
    # Optional custom SQL query used to enumerate accounts for authenumerate,
    # in order to compile a list of accounts for shared folders.  The query
    # should return the following fields: name, uid, gid, homedir, maildir, options
    #
    # Example:
    # MYSQL_ENUMERATE_CLAUSE	SELECT CONCAT(popbox.local_part, '@', popbox.domain_name),			\
    #			domain.uid,					\
    #			domain.gid,					\
    #			CONCAT(domain.path, '/', popbox.mbox_name),	\
    #			'',						\
    #			CONCAT('sharedgroup=', sharedgroup)		\
    #			FROM popbox, domain				\
    #			WHERE popbox.local_part = '$(local_part)'	\
    #			AND popbox.domain_name = '$(domain)'		\
    #			AND popbox.domain_name = domain.domain_name
    
    
    
    ##NAME: MYSQL_CHPASS_CLAUSE:0
    #
    # (EXPERIMENTAL)
    # This is optional, MYSQL_CHPASS_CLAUSE can be set when you have a database,
    # which is structuraly different from proposed. The fixed string will
    # be used to do an UPDATE operation on database. In other words, it is
    # used, when changing password.
    #
    # There are four variables, which you can use. Substitution will be made
    # for them, so you can put entered username (local part) and domain name
    # in the right place of your query. There variables are:
    # 	$(local_part) , $(domain) , $(newpass) , $(newpass_crypt)
    #
    # If a $(domain) is empty (not given by the remote user) the default domain
    # name is used in its place.
    # $(newpass) contains plain password
    # $(newpass_crypt) contains its crypted form
    #
    # MYSQL_CHPASS_CLAUSE	UPDATE	popbox					\
    #			SET	clearpw='$(newpass)',			\
    #				password_hash='$(newpass_crypt)'	\
    #			WHERE	local_part='$(local_part)'		\
    #			AND	domain_name='$(domain)'
    #
    
    
    /etc/postfix/main.cf:
    Code:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    
    # Debian specific:  Specifying a file name will cause the first
    # line of that file to be used as the name.  The Debian default
    # is /etc/mailname.
    #myorigin = /etc/mailname
    
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    biff = no
    
    # appending .domain is the MUA's job.
    append_dot_mydomain = no
    
    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h
    
    readme_directory = no
    
    # TLS parameters
    smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
    smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
    smtpd_use_tls=yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    
    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.
    
    smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
    myhostname = localhost
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = 
    #matrixmail.ca, osiris, localhost.localdomain, localhost
    relayhost = 
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    home_mailbox = Maildir/
    # Virtual Mailbox Domain Settings
    
    virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
    virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
    virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
    virtual_mailbox_limit = 51200000
    virtual_minimum_uid = 5000
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    virtual_mailbox_base = /home/vmail
    virtual_transport = virtual
    
    # Additional for quota support
    
    virtual_create_maildirsize = yes
    virtual_mailbox_extended = yes
    virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
    virtual_mailbox_limit_override = yes
    virtual_maildir_limit_message = Sorry, the your maildir has overdrawn your diskspace quota, please free up some of spaces of your mailbox try again.
    virtual_overquota_bounce = yes
    
    squirrelmail conf.php:
    PHP:
    <?php

    /**
     * SquirrelMail Configuration File
     * Created using the configure script, conf.pl
     */

    global $version;
    $config_version '1.4.0';
    $config_use_color 1;

    $org_name      "orgname";
    $org_logo      SM_PATH 'images/sm_logo.png';
    $org_logo_width  '308';
    $org_logo_height '111';
    $org_title     "orgname";
    $signout_page  '';
    $frame_top     '_top';

    $provider_uri     'domain';

    $provider_name     'org name';

    $motd "";

    $squirrelmail_default_language 'en_US';
    $default_charset       'iso-8859-1';
    $lossy_encoding        false;

    $domain                 'localhost';
    $imapServerAddress      'localhost';
    $imapPort               1430;
    $useSendmail            false;
    $smtpServerAddress      'localhost';
    $smtpPort               25;
    $sendmail_path          '/usr/sbin/sendmail';
    $sendmail_args          '-i -t';
    $pop_before_smtp        false;
    $pop_before_smtp_host   '';
    $imap_server_type       'courier';
    $invert_time            false;
    $optional_delimiter     '.';
    $encode_header_key      '';

    $default_folder_prefix          'INBOX.';
    $trash_folder                   'Trash';
    $sent_folder                    'Sent';
    $draft_folder                   'Drafts';
    $default_move_to_trash          true;
    $default_move_to_sent           true;
    $default_save_as_draft          true;
    $show_prefix_option             false;
    $list_special_folders_first     true;
    $use_special_folder_color       true;
    $auto_expunge                   true;
    $default_sub_of_inbox           true;
    $show_contain_subfolders_option false;
    $default_unseen_notify          2;
    $default_unseen_type            1;
    $auto_create_special            true;
    $delete_folder                  true;
    $noselect_fix_enable            false;

    $data_dir                 '/var/lib/squirrelmail/data/';
    $attachment_dir           '/var/spool/squirrelmail/attach/';
    $dir_hash_level           0;
    $default_left_size        '150';
    $force_username_lowercase false;
    $default_use_priority     true;
    $hide_sm_attributions     false;
    $default_use_mdn          true;
    $edit_identity            true;
    $edit_name                true;
    $hide_auth_header         false;
    $allow_thread_sort        false;
    $allow_server_sort        false;
    $allow_charset_search     true;
    $uid_support              true;

    $plugins[0] = 'view_as_html';

    $theme_css '';
    $theme_default 0;
    $theme[0]['PATH'] = SM_PATH 'themes/default_theme.php';
    $theme[0]['NAME'] = 'Default';
    $theme[1]['PATH'] = SM_PATH 'themes/plain_blue_theme.php';
    $theme[1]['NAME'] = 'Plain Blue';
    $theme[2]['PATH'] = SM_PATH 'themes/sandstorm_theme.php';
    $theme[2]['NAME'] = 'Sand Storm';
    $theme[3]['PATH'] = SM_PATH 'themes/deepocean_theme.php';
    $theme[3]['NAME'] = 'Deep Ocean';
    $theme[4]['PATH'] = SM_PATH 'themes/slashdot_theme.php';
    $theme[4]['NAME'] = 'Slashdot';
    $theme[5]['PATH'] = SM_PATH 'themes/purple_theme.php';
    $theme[5]['NAME'] = 'Purple';
    $theme[6]['PATH'] = SM_PATH 'themes/forest_theme.php';
    $theme[6]['NAME'] = 'Forest';
    $theme[7]['PATH'] = SM_PATH 'themes/ice_theme.php';
    $theme[7]['NAME'] = 'Ice';
    $theme[8]['PATH'] = SM_PATH 'themes/seaspray_theme.php';
    $theme[8]['NAME'] = 'Sea Spray';
    $theme[9]['PATH'] = SM_PATH 'themes/bluesteel_theme.php';
    $theme[9]['NAME'] = 'Blue Steel';
    $theme[10]['PATH'] = SM_PATH 'themes/dark_grey_theme.php';
    $theme[10]['NAME'] = 'Dark Grey';
    $theme[11]['PATH'] = SM_PATH 'themes/high_contrast_theme.php';
    $theme[11]['NAME'] = 'High Contrast';
    $theme[12]['PATH'] = SM_PATH 'themes/black_bean_burrito_theme.php';
    $theme[12]['NAME'] = 'Black Bean Burrito';
    $theme[13]['PATH'] = SM_PATH 'themes/servery_theme.php';
    $theme[13]['NAME'] = 'Servery';
    $theme[14]['PATH'] = SM_PATH 'themes/maize_theme.php';
    $theme[14]['NAME'] = 'Maize';
    $theme[15]['PATH'] = SM_PATH 'themes/bluesnews_theme.php';
    $theme[15]['NAME'] = 'BluesNews';
    $theme[16]['PATH'] = SM_PATH 'themes/deepocean2_theme.php';
    $theme[16]['NAME'] = 'Deep Ocean 2';
    $theme[17]['PATH'] = SM_PATH 'themes/blue_grey_theme.php';
    $theme[17]['NAME'] = 'Blue Grey';
    $theme[18]['PATH'] = SM_PATH 'themes/dompie_theme.php';
    $theme[18]['NAME'] = 'Dompie';
    $theme[19]['PATH'] = SM_PATH 'themes/methodical_theme.php';
    $theme[19]['NAME'] = 'Methodical';
    $theme[20]['PATH'] = SM_PATH 'themes/greenhouse_effect.php';
    $theme[20]['NAME'] = 'Greenhouse Effect (Changes)';
    $theme[21]['PATH'] = SM_PATH 'themes/in_the_pink.php';
    $theme[21]['NAME'] = 'In The Pink (Changes)';
    $theme[22]['PATH'] = SM_PATH 'themes/kind_of_blue.php';
    $theme[22]['NAME'] = 'Kind of Blue (Changes)';
    $theme[23]['PATH'] = SM_PATH 'themes/monostochastic.php';
    $theme[23]['NAME'] = 'Monostochastic (Changes)';
    $theme[24]['PATH'] = SM_PATH 'themes/shades_of_grey.php';
    $theme[24]['NAME'] = 'Shades of Grey (Changes)';
    $theme[25]['PATH'] = SM_PATH 'themes/spice_of_life.php';
    $theme[25]['NAME'] = 'Spice of Life (Changes)';
    $theme[26]['PATH'] = SM_PATH 'themes/spice_of_life_lite.php';
    $theme[26]['NAME'] = 'Spice of Life - Lite (Changes)';
    $theme[27]['PATH'] = SM_PATH 'themes/spice_of_life_dark.php';
    $theme[27]['NAME'] = 'Spice of Life - Dark (Changes)';
    $theme[28]['PATH'] = SM_PATH 'themes/christmas.php';
    $theme[28]['NAME'] = 'Holiday - Christmas';
    $theme[29]['PATH'] = SM_PATH 'themes/darkness.php';
    $theme[29]['NAME'] = 'Darkness (Changes)';
    $theme[30]['PATH'] = SM_PATH 'themes/random.php';
    $theme[30]['NAME'] = 'Random (Changes every login)';
    $theme[31]['PATH'] = SM_PATH 'themes/midnight.php';
    $theme[31]['NAME'] = 'Midnight';
    $theme[32]['PATH'] = SM_PATH 'themes/alien_glow.php';
    $theme[32]['NAME'] = 'Alien Glow';
    $theme[33]['PATH'] = SM_PATH 'themes/dark_green.php';
    $theme[33]['NAME'] = 'Dark Green';
    $theme[34]['PATH'] = SM_PATH 'themes/penguin.php';
    $theme[34]['NAME'] = 'Penguin';
    $theme[35]['PATH'] = SM_PATH 'themes/minimal_bw.php';
    $theme[35]['NAME'] = 'Minimal BW';
    $theme[36]['PATH'] = SM_PATH 'themes/redmond.php';
    $theme[36]['NAME'] = 'Redmond';
    $theme[37]['PATH'] = SM_PATH 'themes/netstyle_theme.php';
    $theme[37]['NAME'] = 'Net Style';
    $theme[38]['PATH'] = SM_PATH 'themes/silver_steel_theme.php';
    $theme[38]['NAME'] = 'Silver Steel';
    $theme[39]['PATH'] = SM_PATH 'themes/simple_green_theme.php';
    $theme[39]['NAME'] = 'Simple Green';
    $theme[40]['PATH'] = SM_PATH 'themes/wood_theme.php';
    $theme[40]['NAME'] = 'Wood';
    $theme[41]['PATH'] = SM_PATH 'themes/bluesome.php';
    $theme[41]['NAME'] = 'Bluesome';
    $theme[42]['PATH'] = SM_PATH 'themes/simple_green2.php';
    $theme[42]['NAME'] = 'Simple Green 2';
    $theme[43]['PATH'] = SM_PATH 'themes/simple_purple.php';
    $theme[43]['NAME'] = 'Simple Purple';
    $theme[44]['PATH'] = SM_PATH 'themes/autumn.php';
    $theme[44]['NAME'] = 'Autumn';
    $theme[45]['PATH'] = SM_PATH 'themes/autumn2.php';
    $theme[45]['NAME'] = 'Autumn 2';
    $theme[46]['PATH'] = SM_PATH 'themes/blue_on_blue.php';
    $theme[46]['NAME'] = 'Blue on Blue';
    $theme[47]['PATH'] = SM_PATH 'themes/classic_blue.php';
    $theme[47]['NAME'] = 'Classic Blue';
    $theme[48]['PATH'] = SM_PATH 'themes/classic_blue2.php';
    $theme[48]['NAME'] = 'Classic Blue 2';
    $theme[49]['PATH'] = SM_PATH 'themes/powder_blue.php';
    $theme[49]['NAME'] = 'Powder Blue';
    $theme[50]['PATH'] = SM_PATH 'themes/techno_blue.php';
    $theme[50]['NAME'] = 'Techno Blue';
    $theme[51]['PATH'] = SM_PATH 'themes/turquoise.php';
    $theme[51]['NAME'] = 'Turquoise';

    $default_use_javascript_addr_book false;
    $abook_global_file '';
    $abook_global_file_writeable false;
    $abook_global_file_listing true;
    $abook_file_line_length 2048;

    $addrbook_dsn '';
    $addrbook_table 'address';

    $prefs_dsn '';
    $prefs_table 'userprefs';
    $prefs_user_field 'user';
    $prefs_key_field 'prefkey';
    $prefs_val_field 'prefval';
    $addrbook_global_dsn '';
    $addrbook_global_table 'global_abook';
    $addrbook_global_writeable false;
    $addrbook_global_listing false;

    $no_list_for_subscribe false;
    $smtp_auth_mech 'none';
    $imap_auth_mech 'login';
    $smtp_sitewide_user '';
    $smtp_sitewide_pass '';
    $use_imap_tls false;
    $use_smtp_tls false;
    $session_name 'SQMSESSID';
    $only_secure_cookies     true;
    $disable_security_tokens false;
    $check_referrer          '';
    $browser_rendering_mode  'quirks';

    $config_location_base    '';

    @include 
    SM_PATH 'config/config_local.php';


     
  2. srijan

    srijan New Member HowtoForge Supporter

    Hi

    Which guide you have used to install the server?

    Br//
    Srijan
     

Share This Page