Reinstall of postfix, need config of ISPConfig

Discussion in 'Installation/Configuration' started by jake, Oct 16, 2006.

  1. jake

    jake New Member

    Hello Everybody,

    First off, thank you for a wonderfull piece of software that made my life much easier. I've some questions however.
    Because i already had some server running prior to the ispconfig install my server wasn't entirly confirm the ISPConfig setup. However i managed to get most working (at least apache, mysql etc).
    In my pursuit to a good server i'm now trying to get postfix to interact with ISP Config. Because i reinstalled Postfix after the Postfix install i need to do some manual changes. Mainly the connection to the datbase i believe.

    My question now is: is there anyone who can send me their main.cf and the files needed to connect to the mysql server. (don't forget to remove your own info, for your sake ;). Also, do i need to make some additional changes elsewhere?

    Thank you already!

    Ps. if i remove ISPConfig would i leave my running apache server intact? Perhaps i could try to remove ISPconfig, BIND, Postfix, Proftpd, because they are not in use by a production site. However Apache2 is...
     
  2. jake

    jake New Member

    I'm sorry to bump but help is greatly needed!
    No one has any advice of config files availble?

    Thank you in advance

    Also i don't dare to reinstall ispconfig risking the lose of my site!
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    In a ISPConfig setup, postfix is not connected to the database. It is a file based setup.

    1) Follow the configuration steps described in the perfect setup guide for your installation. The Guides are linked in the documentation page on the ISPConfig website.

    2) add these two lines at the end of your main.cf file and restart postfix:

     
  4. jake

    jake New Member

    Thank you man,

    I already found this on the forum, and postfix now recieves mail for me.
    However when i try to fetch the mail via webmail it say the user cannot be found. I'll post my main.cf if you will have a look it? Somehow the password field in the isp_isp_user database appears to be empty? (no encrypted password)
    Code:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    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
    
    myhostname = broomhilda.hyperactief.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    #mydestination = broomhilda.hyperactief.com, localhost.broomhilda.hyperactief.com, localhost, vds.hyperactief.com
    relayhost = 
    mynetworks = 127.0.0.0/8
    mailbox_command = 
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    smtpd_sasl_local_domain = 
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtpd_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom
    home_mailbox = Maildir/
    virtual_maps = hash:/etc/postfix/virtusertable
    mydestination = /etc/postfix/local-host-names
    

    Also do you know i removing ispconfig will mess up my pre-existing apache2 install? Perhaps it is easier to start over again, as long as i know that 1 current site stays up. (because i probally need to do some purging for a clean install)

    Again, your help is really appreciated!
     
  5. jake

    jake New Member

    I'm not really sure this has anything to do with it, but this is the auth config of courier:

    Authdemonrc:
    Code:
    authmodulelist="authmysql"
    
    ##NAME: authmodulelistorig:1
    #
    # This setting is used by Courier's webadmin module, and should be left
    # alone
    
    authmodulelistorig="authcustom authcram authuserdb authldap authpgsql authmysql authpam"
    
    ##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: version:0
    #
    # When you have multiple versions of authdaemond.* installed, authdaemond
    # just picks the first one it finds.  Set "version" to override that.
    # For example:  version=authdaemond.plain
    
    version=""
    
    ##NAME: authdaemonvar:0
    #
    # 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
    
    And mysqldameonrc
    Code:
    MYSQL_SERVER localhost
    MYSQL_USERNAME provider_admin
    MYSQL_PASSWORD ...
    MYSQL_PORT 0
    MYSQL_DATABASE provider
    MYSQL_USER_TABLE users
    #MYSQL_CRYPT_PWFIELD (comment this out)
    MYSQL_CLEAR_PWFIELD password
    MYSQL_UID_FIELD 5000
    MYSQL_GID_FIELD 5000
    MYSQL_LOGIN_FIELD email
    MYSQL_HOME_FIELD "/home/vmail"
    MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
    #MYSQL_NAME_FIELD (comment this out)
    It this correct?
     
  6. falko

    falko Super Moderator ISPConfig Developer

    Put
    Code:
    authmodulelist="authpam"
    into authdaemonrc instead of
    Code:
    authmodulelist="authmysql"
    Restart Courier afterwards.

    That's normal. ISPConfig doesn't store system user passwords in its database for security reasons. The passwords are in /etc/shadow.
     
  7. jake

    jake New Member

    Thanks man,

    Everything is working now, except for one thing:
    I can't login into webmail. Courier is adapted like you said. I've also enabled maildir in ispconfig, but i can't seem to find the mail dir on my server. The mail is send to me, but can't locate it on the system.
    Its not mentioned in my mail.log either.

    My main.cf now looks like:
    Code:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    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
    
    myhostname = broomhilda.hyperactief.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    #mydestination = broomhilda.hyperactief.com, localhost.hyperactief.com, , localhost
    relayhost = 
    mynetworks = 127.0.0.0/8
    mailbox_command = 
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    smtpd_sasl_local_domain = 
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtpd_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom
    home_mailbox = Maildir/
    
    virtual_maps = hash:/etc/postfix/virtusertable
    
    mydestination = /etc/postfix/local-host-names
    
    Authdeamonrc:
    Code:
    ##VERSION: $Id: authdaemonrc.in,v 1.8 2001/10/07 02:16:22 mrsam Exp $
    #
    # Copyright 2000-2001 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:0
    #
    # 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: authcustom authcram authuserdb authldap authpgsql authmysql authpam
    
    authmodulelist="authpam"
    
    ##NAME: authmodulelistorig:1
    #
    # This setting is used by Courier's webadmin module, and should be left
    # alone
    
    authmodulelistorig="authcustom authcram authuserdb authldap authpgsql authmysql authpam"
    
    ##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: version:0
    #
    # When you have multiple versions of authdaemond.* installed, authdaemond
    # just picks the first one it finds.  Set "version" to override that.
    # For example:  version=authdaemond.plain
    
    version=""
    
    ##NAME: authdaemonvar:0
    #
    # 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
    
    And rebooted the services as well of course? Is there something i missed? Thank you again!
     
    Last edited: Oct 18, 2006
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    You must use the email address of the user to login to webmail and not the username.
     
  9. jake

    jake New Member

  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, if your pop3 login does not work, webmail can never work :)
     
  11. nakalskit

    nakalskit New Member

    webmail login ok, mail client login failed.

    hi,

    after migrating to a new server, all user can not send email out, email client will always prompt for password.:(. i can log in to webmail with no problem.

    please help.
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Please check that postfix and sasl are installed and configured as described in the perfect setup guide.
     

Share This Page