I'm having problems with SASL and SSL on SMTP.

Here are my logs from a connection request

postfix/smtpd[2699]: connect from (outside host)
postfix/smtpd[2699]: setting up TLS connection from (outside host)
postfix/smtpd[2699]: SSL_accept error from (outside host_: -1
postfix/smtpd[2699]: lost connection after STARTTLS from (outside  host)
postfix/smtpd[2699]: disconnect from (outside host)
postfix/smtpd[2714]: warning: xsasl_cyrus_server_get_mechanism_list: no
applicable SASL mechanisms
postfix/smtpd[2714]: fatal: no SASL authentication mechanisms
postfix/master[1746]: warning: process /usr/lib/postfix/smtpd pid 2714 exit
status 1
postfix/master[1746]: warning: /usr/lib/postfix/smtpd: bad command startup
-- throttling

OK... and HERE is what happens when I don't use SSL

 postfix/master[2811]: warning: process /usr/lib/postfix/smtpd pid 2822 exit
status 1
 postfix/master[2811]: warning: /usr/lib/postfix/smtpd: bad command startup
-- throttling
 postfix/smtpd[2823]: fatal: unexpected command-line argument: reject
 postfix/master[2811]: warning: process /usr/lib/postfix/smtpd pid 2823 exit
status 1
 postfix/master[2811]: warning: /usr/lib/postfix/smtpd: bad command startup
-- throttling

postfix/smtpd[2838]: connect from (outside host)
postfix/smtpd[2838]: warning: SASL authentication failure: no secret in
database
postfix/smtpd[2838]: warning: (outside host): SASL CRAM-MD5 authentication
failed: authentication failure
imapd-ssl: LOGIN, [EMAIL PROTECTED], ip=[::ffff:(outside host)],
port=[49997], protocol=IMAP

IMAP is connecting fine (over ssl) and SMTP still won't connect at all
(using the same credentials on the same database)

here is my main.cf

# See /usr/share/postfix/main.cf.dist for a commented, more complete version
#ecific:  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
myorigin = /etc/mailname
#mydestination = domU-12-31-35-00-06-44.z-2.compute-1.internal,
localhost.z-2.compute-1.internal, , localhost
#relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
#inet_interfaces = all

#flurdy postfix guide settings

myhostname = ec2-75-101-148-70.compute-1.amazonaws.com
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
relayhost =
inet_interfaces = all
mynetworks_style = host
local_recipient_maps =
mydestination =

# how long if undelivered before sending warning update to sender
delay_warning_time = 4h
# will it be a permanent error or temporary
unknown_local_recipient_reject_code = 450
# how long to keep message on queue before return as failed.
# some have 3 days, I have 16 days as I am backup server for some people
# whom go on holiday with their server switched off.
maximal_queue_lifetime = 7d
# max and min time in seconds between retries if connection failed
minimal_backoff_time = 1000s
maximal_backoff_time = 8000s
# how long to wait when servers connect before receiving rest of data
smtp_helo_timeout = 60s
# how many address can be used in one message.
# effective stopper to mass spammers, accidental copy in whole address list
# but may restrict intentional mail shots.
smtpd_recipient_limit = 16
# how many error before back off.
smtpd_soft_error_limit = 3
# how many max errors before blocking it.
smtpd_hard_error_limit = 12

# Requirements for the HELO statement
smtpd_helo_restrictions = warn_if_reject reject_non_fqdn_hostname,
reject_invalid_hostname, permit


# Requirements for the sender details
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks,
warn_if_reject reject_non_fqdn_sender, reject_unknown_sender_domain,
reject_unauth_pipelining, permit
# Requirements for the connecting server
smtpd_client_restrictions = reject_rbl_client sbl.spamhaus.org,
reject_rbl_client blackholes.easynet.nl, reject_rbl_client dnsbl.njabl.org
# Requirement for the recipient address
smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks,
permit_sasl_authenticated, reject_non_fqdn_recipient,
reject_unknown_recipient_domain, reject_unauth_destination, c$
smtpd_data_restrictions = reject_unauth_pipelining

# require proper helo at connections
smtpd_helo_required = yes
# waste spammers time before rejecting them
smtpd_delay_reject = yes
disable_vrfy_command = yes

# not sure of the difference of the next two
# but they are needed for local aliasing
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases
# this specifies where the virtual mailbox folders will be located
virtual_mailbox_base = /mnt/spool/mail/virtual
# this is for the mailbox location for each user
virtual_mailbox_maps = mysql:/etc/postfix/mysql_mailbox.cf
# and their user id
virtual_uid_maps = mysql:/etc/postfix/mysql_uid.cf
# and group id
virtual_gid_maps = mysql:/etc/postfix/mysql_gid.cf
# and this is for aliases
virtual_alias_maps = mysql:/etc/postfix/mysql_alias.cf
# and this is for domain lookups

virtual_mailbox_domains = mysql:/etc/postfix/mysql_domains.cf
# this is how to connect to the domains (all virtual, but the option is
there)
# not used yet
# transport_maps = mysql:/etc/postfix/mysql_transport.cf

content_filter = amavis:[127.0.0.1]:10024

smtpd_sasl_auth_enable = yes
#broken_sasl_auth_clients = yes
#smtpd_sasl_path = /etc/postfix/sasl:/usr/lib/sasl2
smtpd_sasl_path = smtpd
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
smtpd_sasl_authenticated_header = yes

smtpd_use_tls=yes
smtpd_tls_security_level = may
smtpd_tls_auth_only = no
smtp_tls_note_starttls_offer = yes
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
smtpd_tls_cert_file=/etc/postfix/postfix.cert
smtpd_tls_key_file=/etc/postfix/postfix.key
#smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
#smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache


I was following the following guide from Flurdy
http://flurdy.com/docs/postfix/

Reply via email to