Results 1 to 9 of 9

Thread: mail server using postfix,dovecot and mysql

  1. #1
    Join Date
    Feb 2014
    Beans
    39

    mail server using postfix,dovecot and mysql

    I have set up a mialserver on my computer.when I test it, it shows the message below on the terminal
    telnet bab-laptop 25
    Trying 127.0.1.1...
    Connected to bab-laptop.
    Escape character is '^]'.
    220 babel-laptop ESMTP
    ehlo babel-laptop
    250-babel-laptop
    250-PIPELINING
    250-SIZE 10485760
    250-VRFY
    250-ETRN
    250-STARTTLS
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 DSN

    but when i check the connection to pop3, i get
    telnet babl-laptop pop3
    Trying 127.0.1.1...
    Connected to bab-laptop.
    Escape character is '^]'.
    +OK Dovecot ready.
    user aretab@bab-laptop.localhost
    +OK
    pass getinabcd
    -ERR [IN-USE] Temporary authentication failure.
    What is the problem here,what can i do to be able to send email,and check mail?
    Last edited by shad2; April 14th, 2014 at 02:57 PM. Reason: clarification,spelling check

  2. #2
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    9,147
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: mail server using postfix,dovecot and mysql

    You probably didn't enable plain-text passwords in dovecot.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Feb 2014
    Beans
    39

    Re: mail server using postfix,dovecot and mysql

    Thanks sensei
    I have followed this tutorial but now Iam getting
    telnet bab-laptop pop3
    Trying 127.0.1.1...
    Connected to bab-laptop.
    Escape character is '^]'.
    +OK Dovecot ready.
    user aretab@bab-laptop.localhost
    +OK
    pass getinabcd
    -ERR Authentication failed.

    Where is the problem now???

  4. #4
    Join Date
    Feb 2014
    Beans
    39

    Re: mail server using postfix,dovecot and mysql

    Thanks sensei
    I have followed this tutorial but now Iam getting
    telnet bab-laptop pop3
    Trying 127.0.1.1...
    Connected to bab-laptop.
    Escape character is '^]'.
    +OK Dovecot ready.
    user aretab@bab-laptop.localhost
    +OK
    pass getinabcd
    -ERR Authentication failed.
    Also why is it that Iam not able to send email locally from the terminal to another email?

    Where is the problem now???
    in etc.dovecot/dovecot-sql.conf ,I have:
    driver = mysql
    connect = host=127.0.0.1 dbname=mail user=areta_admin password=areta_kab
    default_pass_scheme = CRYPT
    password_query = SELECT email as user, password FROM users WHERE email='%u';
    Last edited by shad2; April 15th, 2014 at 01:07 PM. Reason: clarification

  5. #5
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    9,147
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: mail server using postfix,dovecot and mysql

    I was talking about the password exchange between the IMAP client and dovecot, not between dovecot and the back end authenticator, your MySQL database in this case. Did you read the section from the dovecot manual I linked to before?

    What is the value for "auth_mechanisms"?
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  6. #6
    Join Date
    Feb 2014
    Beans
    39

    Re: mail server using postfix,dovecot and mysql

    which is the imap client you are refferinf to?currently iam trying it out at the terminal.

  7. #7
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    9,147
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: mail server using postfix,dovecot and mysql

    Yes, and you're using telnet to accomplish the same task that a program like Thunderbird does. You are typing your password in plain text, so dovecot needs to have plain-text authentication enabled.

    Once again, what is the value for "auth_mechanisms"?
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  8. #8
    Join Date
    Feb 2014
    Beans
    39

    Re: mail server using postfix,dovecot and mysql

    this is my dovecot.conf:
    protocols = imap imaps pop3 pop3s
    log_timestamp = "%Y-%m-%d %H:%M:%S "
    mail_location = maildir:/home/bab/vmail/%d/%n/Maildir

    ssl_cert_file = /etc/ssl/certs/01.pem
    ssl_key_file = /etc/ssl/private/bab-laptopserver.key

    namespace private {
    separator = .
    prefix = INBOX.
    inbox = yes
    }

    protocol lda {
    log_path = /home/bab/vmail/dovecot-deliver.log
    auth_socket_path = /var/run/dovecot/auth-master
    postmaster_address = postmaster@babel-laptop
    mail_plugins = sieve
    global_script_path = /home/bab/vmail/globalsieverc
    }

    protocol pop3 {
    pop3_uidl_format = %08Xu%08Xv
    }

    auth default {
    user = root
    mechanisms = plain login cram-md5
    passdb sql {
    args = /etc/dovecot/dovecot-sql.conf
    }

    userdb static {
    args = uid=5000 gid=5000 home=/home/bab/vmail/%d/%n allow_all_users=yes
    }

    socket listen {
    master {
    path = /var/run/dovecot/auth-master
    mode = 0600
    user = babel
    }

    client {
    path = /var/spool/postfix/private/auth
    mode = 0660
    user = postfix
    group = postfix
    }
    }
    }

    Also i just found this in my pam.d/smtp file
    auth required pam_mysql.so user=mailadmin passwd=newpassword host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1
    account sufficient pam_mysql.so user=mailadmin passwd=newpassword host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1

    it also doesn't have to be encrypted iguess
    Last edited by shad2; April 16th, 2014 at 12:16 PM. Reason: clarity

  9. #9
    Join Date
    Oct 2007
    Location
    Cincinnati, Ohio
    Beans
    Hidden!
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: mail server using postfix,dovecot and mysql

    By far the easiest way I've found to get Mail plus other servers up and running is to install virtualmin on a fresh server setup...just thought I would pass this along for future reference.

    OS: Kubuntu 12.04 LTS|| CPU: AMD Athlon 64x2 || RAM: 3GB DDR2(PC-6400) || Display: NVIDIA GeForce 9400 GT 1024mb

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •