smtp_auth problem

Discussion in 'Installation/Configuration' started by pedro_morgan, Aug 29, 2007.

  1. pedro_morgan

    pedro_morgan ISPConfig Developer ISPConfig Developer

    I got the 2.3.2 installed on Debian 4. the machine is being used primarily as a web server/database (no emailbox'es etc).

    I want to configure the machine to send smtp emals, but only after authorisation. I cant seem to be able to login with the smtp and keep getting the error. I have tried so many things it not true (most of this afternoon). If someone can please help !!
    PHP:
    535 5.7.0 Errorauthentication failedauthentication failure
    and the mail.log shows
    PHP:
    Aug 29 18:34:07 s15265245 postfix/smtpd[3731]: connect from 84-45-225-28.no-dns-yet.enta.net[84.45.225.28]
    Aug 29 18:34:07 s15265245 postfix/smtpd[3731]: warningSASL authentication problemunable to open Berkeley db /etc/sasldb2No such file or directory
    Aug 29 18
    :34:07 s15265245 postfix/smtpd[3731]: warningSASL authentication problemunable to open Berkeley db /etc/sasldb2No such file or directory
    Aug 29 18
    :34:07 s15265245 postfix/smtpd[3731]: warning84-45-225-28.no-dns-yet.enta.net[84.45.225.28]: SASL LOGIN authentication failedauthentication failure
    Aug 29 18
    :34:07 s15265245 postfix/smtpd[3731]: NOQUEUErejectRCPT from 84-45-225-28.no-dns-yet.enta.net[84.45.225.28]: 554 5.7.1 <pedromorgan@gmail.com>: Relay access deniedfrom=<pedromorgan@gmail.comto=<pedromorgan@gmail.comproto=ESMTP helo=<localhost.localdomain>
    Aug 29 18:34:07 s15265245 postfix/smtpd[3731]: lost connection after RSET from 84-45-225-28.no-dns-yet.enta.net[84.45.225.28]
    Aug 29 18:34:07 s15265245 postfix/smtpd[3731]: disconnect from 84-45-225-28.no-dns-yet.enta.net[84.45.225.28]

    That path led me to this little tutorial which I followed http://postfix.state-of-mind.de/patrick.koetter/smtpauth/smtp_auth_mailservers.html

    I have got the /etc/postfix/sasl_passwd file created with
    PHP:
    master.daffodil.uk.com shellUserName:secretPass
    The userName was an user created on the shell after ISPCOnfig was installed (ie not created by ISPCOnfig). The file has been
    PHP:
    postmap hash:/etc/postfix/sasl_passwd to create .db
    I started the sasl deamon

    The main.cf
    PHP:
    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

    # 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:${queue_directory}/smtpd_scache
    smtp_tls_session_cache_database 
    btree:${queue_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.

    #myhostname = s15265245.onlinehome-server.info
    myhostnamemaster.daffodil.uk.com

    alias_maps 
    hash:/etc/aliases
    alias_database 
    hash:/etc/aliases
    myorigin 
    = /etc/mailname
    #mydestination = s15265245.onlinehome-server.info, localhost.onlinehome-server.info, , localhost
    relayhost =
    mynetworks 127.0.0.0/8
    mailbox_size_limit 
    0
    recipient_delimiter 
    = +
    inet_interfaces all

    virtual_maps 
    hash:/etc/postfix/virtusertable

    mydestination 
    = /etc/postfix/local-host-names

    smtpd_sasl_auth_enable 
    yes
    smtpd_sasl_password_maps 
    = /etc/postfix/sasl_passwd
    smtpd_sasl_security_options 
    noanonymous
    With telent foo 25
    PHP:
    s15265245:/etc/postfix# telnet master.daffodil.uk.com 25
    Trying 87.106.142.161...
    Connected to master.daffodil.uk.com.
    Escape character is '^]'.
    220 master.daffodil.uk.com ESMTP Postfix (Debian/GNU)
    ehlo exa
    250
    -master.daffodil.uk.com
    250
    -PIPELINING
    250
    -SIZE 10240000
    250
    -VRFY
    250
    -ETRN
    250
    -STARTTLS
    250
    -AUTH DIGEST-MD5 NTLM CRAM-MD5 LOGIN PLAIN
    250
    -ENHANCEDSTATUSCODES
    250
    -8BITMIME
    250 DSN

    Help woul dbe greatly appreciated
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. pedro_morgan

    pedro_morgan ISPConfig Developer ISPConfig Developer

    It works, but can I add local user

    I followed the setup above and it works great (missed on bit), but only with an email/smtp user from within the "ISPConfig" system.

    I have created another user, with root acccess on the shell, in fact my "sudo" account, if there a way to add this user to the "smtp" authentication.

    Also my suddomain which is the "machine account", i have pointed to /var/www/sharedip, ie mymachine.domain.tld, is there an easy way to "import" or enter this into ISPConfig if or is necessary?"]

    hope you understand what I mean.

    Pete
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Sending with this user trough SMTP shall work, there is no configuration needed as long as the user is listed in /etc/passwd. Generally you will have to use users created in ISPConfig for sending and receiving emails as a manually created user will not work well.

    Just create a website for mymachine.domain.tld in ISPConfig.
     

Share This Page