Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using a webmin with virtualmin setup on a Ubuntu with Postfix and Dovecot for pop, I can recieve messages but not send them, it only works with local php driven mails, when I try to connect to the smtp server I get:

DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "***", port 25, isSSL false
220 *** ESMTP Postfix (Ubuntu)
DEBUG SMTP: connected to host "****", port: 25

EHLO localhost
250-****
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN DIGEST-MD5 CRAM-MD5 NTLM LOGIN
250-AUTH=PLAIN DIGEST-MD5 CRAM-MD5 NTLM LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "SIZE", arg "10240000"
DEBUG SMTP: Found extension "VRFY", arg ""
DEBUG SMTP: Found extension "ETRN", arg ""
DEBUG SMTP: Found extension "STARTTLS", arg ""
DEBUG SMTP: Found extension "AUTH", arg "PLAIN DIGEST-MD5 CRAM-MD5 NTLM LOGIN"
DEBUG SMTP: Found extension "AUTH=PLAIN", arg "DIGEST-MD5 CRAM-MD5 NTLM LOGIN"
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "DSN", arg ""
DEBUG SMTP: Attempt to authenticate
DEBUG SMTP: check mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM 

535 5.7.8 Error: authentication failed: authentication failure

Authentication Failed 

this is my postfix/main.cf

# 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_use_tls=no
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.

myhostname = ***
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = ***
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
virtual_alias_maps = hash:/etc/postfix/virtual
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_mynetworks reject_unauth_destination
smtpd_tls_security_level = none

I've been searching for over 7hours now and getting ready to shoot myself so any help is grealty appreciated :)

share|improve this question
    
Please post your Java client code, it may help. Also the postfix server log might have some info. Which AUTH mechanisms have you tried? –  totaam Jan 5 '12 at 14:18
    
I used this one: pingability.com/smtptest.jsp what do you mean with which AUTH mechanisms? –  Recyclerobot Jan 5 '12 at 14:46
    
Use your own code so you can tinker with it, then you can try each AUTH mechanism, ie: I would try PLAIN first. You should probably understand AUTH mechanisms first though.. –  totaam Jan 5 '12 at 14:57

1 Answer 1

up vote 0 down vote accepted

You didn't configure Postfix to use Dovecot as authentication type. Do it. See the documentation for more information. http://www.postfix.org/postconf.5.html#smtpd_sasl_type

Additional follow the Dovecot Wiki and Postfix manual.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.