LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-20-2010, 01:23 PM   #1
tomehb
LQ Newbie
 
Registered: Feb 2010
Posts: 11

Rep: Reputation: 0
Dovecot & Postfix SASL Issues


Hi guys,

I've just installed and configured Dovecot and Postfix.
When testing it from a client machine using outlook the connection is successful to IMAP using TLS, however when attempting to connect to the SMTP the connection is refused.
Quote:
Send test e-mail message: Outlook cannot connect to your outgoing (SMTP) e-mail server. If you continue to receive this message, contact your server administrator or Internet service provider (ISP).

Configuration file for Dovecot /etc/dovecot/dovecot.conf
Code:
## Dovecot configuration file
protocols = imaps
listen = *
shutdown_clients = yes
log_timestamp = "%Y-%m-%d %H:%M:%S "
ssl_disable = no
ssl_cert_file = /CA/tomehb.co.uk/certs/tomehb-servercrt.pem
ssl_key_file = /CA/tomehb.co.uk/private/tomehb-serverkey.pem
login_greeting = Dovecot ready.
mail_privileged_group = mail

protocol imap {

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

protocol lda {
	postmaster_address = postmaster@webmail.tomehb.co.uk
	log_path = /var/vmail/dovecot-deliver.log
	hostname = webmail.tomehb.co.uk
	auth_socket_path = /var/run/dovecot/auth-master
   	mail_plugins = cmusieve
	global_script_path = /var/vmail/globalsieverc
 }



#auth_verbose = no
#auth_debug = no

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

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

	#ssl_require_client_cert = no
	#ssl_username_from_cert = no

	socket listen {
		master {
			path = /var/run/dovecot/auth-master
        	   	mode = 0600
         		user = vmail # User running Dovecot LDA
			group = mail # Or alternatively mode 0660 + LDA user in this group
		}
		client {
			path = /var/spool/postfix/private/auth
			#path = /var/run/dovecot/auth-client
			mode = 0660
			user = postfix
			group = postfix
		}
	}
}



dict {

}

plugin {

}
After starting dovecot, I checked to see if the file had been created... which it had been..

Quote:
root@tomehb:/etc/dovecot# ls -l /var/spool/postfix/private/auth
srw-rw---- 1 postfix postfix 0 2010-03-20 17:01 /var/spool/postfix/private/auth


Configuration file for Postfix /etc/postfix/main.cf

Code:
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
queue_directory = /var/spool/postfix
# 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=/CA/tomehb.co.uk/certs/tomehb-servercrt.pem
smtpd_tls_key_file=/CA/tomehb.co.uk/private/tomehb-serverkey.pem
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

#vhost with mysql params
#virtual_alias_domains needs to be unset
virtual_alias_domains =

virtual_mailbox_domains = mysql:/etc/postfix/virtual/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/virtual/mysql-virtual-mailbox-maps.cf
virtual_alias_maps = mysql:/etc/postfix/virtual/mysql-virtual-alias-maps.cf, mysql:/etc/postfix/virtual/mysql-virtual-email2email.cf
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1


myhostname = webmail.tomehb.co.uk
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = $myhostname
mydestination = webmail.tomehb.co.uk, localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_sasl_security_options = noanonymous


I've checked a few logs and found nothing, what do you guys suggest I should do next? and can you spot any mistakes that I've made...


Cheers

Thomas
 
Old 03-20-2010, 01:36 PM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
Is port 25 open on the server ?
 
Old 03-20-2010, 01:57 PM   #3
tomehb
LQ Newbie
 
Registered: Feb 2010
Posts: 11

Original Poster
Rep: Reputation: 0
Smile

Quote:
Originally Posted by smoker View Post
Is port 25 open on the server ?
Indeed,

lsof -i tcp:25
Quote:
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
master 26172 root 11u IPv4 87707 TCP *:smtp (LISTEN)
netstat -lp
Quote:
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 *:smtp *:* LISTEN 26172/master
sending an email from the host, as its not restricted..)
Quote:
220 webmail.tomehb.co.uk ESMTP Postfix (Debian/GNU)
HELO localhost
250 webmail.tomehb.co.uk
MAIL FROM:<thomas@webmail.tomehb.co.uk>
250 2.1.0 Ok
RCPT TO:<tomehb@gmail.com>
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
Hello, this is a test email
.
250 2.0.0 Ok: queued as 75C60E2913

When I telneted, the warning log said the following....

Code:
Mar 20 19:16:05 tomehb.co.uk postfix/tlsmgr[29803]: warning: request to update table btree:/var/spool/postfix/smtpd_scache in non-postfix directory /var/spool/postfix
Mar 20 19:16:05 tomehb.co.uk postfix/tlsmgr[29803]: warning: redirecting the request to postfix-owned data_directory /var/lib/postfix
Mar 20 19:16:07 tomehb.co.uk postfix/tlsmgr[29803]: warning: request to update table btree:/var/spool/postfix/smtp_scache in non-postfix directory /var/spool/postfix
Mar 20 19:16:07 tomehb.co.uk postfix/tlsmgr[29803]: warning: redirecting the request to postfix-owned data_directory /var/lib/postfix
Would that be related to the issue?**** Now Fixed the above messages, but still can not use the SMTP server from anywhere other than localhost...



-------------- Another Update

When I receive emails I get the following warnings, again I believe this is unrelated (Email is delivered correctly)....

Quote:
Mar 20 20:03:07 tomehb.co.uk postfix/trivial-rewrite[4389]: warning: do not list domain webmail.tomehb.co.uk in BOTH virtual_mailbox_domains and relay_domains
Mar 20 20:03:28 tomehb.co.uk postfix/trivial-rewrite[4389]: warning: do not list domain webmail.tomehb.co.uk in BOTH virtual_mailbox_domains and relay_domains

Last edited by tomehb; 03-20-2010 at 03:29 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix, Dovecot, SASL - problem with authentication in Thunderbird / Outlook dlugasx Linux - Server 2 11-19-2009 02:31 AM
postfix, dovecot - setup for Thunderbird with SASL - how ? dlugasx Linux - Server 0 11-11-2009 06:46 AM
Prevent spoofing from authenticated dovecot+postfix+sasl+postgre kiswono Linux - Security 1 06-22-2009 08:12 PM
Postfix, Dovecot, MySQL users - issue with SASL silviap Linux - Server 2 06-17-2009 06:24 AM
postfix/dovecot - sasl authentication works no more ddaas Linux - Server 6 05-15-2009 04:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration