LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 11-05-2011, 05:25 AM   #1
dikon123
LQ Newbie
 
Registered: Oct 2011
Posts: 10

Rep: Reputation: Disabled
Unhappy Problem with Thunderbird and mail server on Ubuntu server


Hi,

i have installed and configured Postfix, dovecot on my Ubuntu server. and in addition configured PostfixVirtualMailBoxClamSmtp , postfix sasl on my server.

everything works on ubuntu server via command line or Terminal.
receiving emails /sending emails is ok when working on command line on server.

when i use Thunderbird as my mail client , it connects to my mail server but can not receive/ send emails on Thunderbird , everytime get error that "authentication faild".

i am wondering why authentication is not failed when working and testing mailserver on server terminal ??!!


anybody can help me ?!
 
Old 11-05-2011, 05:45 AM   #2
vasile002
Member
 
Registered: Oct 2011
Posts: 51

Rep: Reputation: Disabled
Did you check the mail logs when the authentication fails? please post those
 
Old 11-05-2011, 09:00 AM   #3
tva
Member
 
Registered: Jul 2010
Location: Finland
Distribution: Open SUSE 11.x
Posts: 70

Rep: Reputation: 6
What is your SSL and Authentication configuration in Thunderbird? Have you tried different combinations?
 
Old 11-06-2011, 05:47 AM   #4
dikon123
LQ Newbie
 
Registered: Oct 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Hi,

Thank you for yours replies.

i have posted my mail server config files here:

-----------------------Dovecot---------------------------


base_dir = /var/run/dovecot/
protocols = imap imaps pop3
disable_plaintext_auth = no
shutdown_clients = yes
log_path = /var/log/dovecot
info_log_path = /var/log/dovecot.info
log_timestamp = "%Y-%m-%d %H:%M:%S "
ssl = yes


login_dir = /var/run/dovecot/login
login_chroot = yes
login_user = dovecot
login_greeting = Dovecot ready.
mail_location = maildir:/home/vmail/%d/%n
mmap_disable = no
valid_chroot_dirs = /var/spool/vmail
protocol imap {

login_executable = /usr/lib/dovecot/imap-login
mail_executable = /usr/lib/dovecot/imap

}
protocol pop3 {
login_executable = /usr/lib/dovecot/pop3-login
mail_executable = /usr/lib/dovecot/pop3
pop3_uidl_format = %08Xu%08Xv
}
auth_executable = /usr/lib/dovecot/dovecot-auth
auth_verbose = yes
auth default {
mechanisms = plain cram-md5
passdb passwd-file {
args = /etc/dovecot/passwd
}
userdb passwd-file {
args = /etc/dovecot/users
}
user = root
socket listen {
client {
path = /var/spool/postfix/private/auth-client
mode = 0660
user = postfix
group = postfix
}
}
}

-----------------------------------------Postfix main.cf----------------------------------------



smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu/GNU)
biff = no
append_dot_mydomain = no
content_filter = scan:127.0.0.1:10026
receive_override_options = no_address_mappings

mydomain = example.se
myhostname = mail.example.se
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases


myorigin = example.se
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
home_mailbox = Maildir/

virtual_mailbox_domains = /etc/postfix/vhosts
virtual_mailbox_base = /home/vmail
virtual_mailbox_maps = hash:/etc/postfix/vmaps
virtual_minimum_uid = 500
virtual_uid_maps = static:555
virtual_gid_maps = static:555
recipient_delimiter = +
inet_interfaces = all

smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
broken_sasl_auth_clients = yes

smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth-client
smtpd_tls_auth_only = no
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/ssl/private/smtpd.key
smtpd_tls_cert_file = /etc/ssl/certs/smtpd.crt
smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom


----------------------------/etc/postfix/sasl/smtpd.conf----------------------------

mech_list: plain login cram-md5


--------------------------------------/etc/hosts-----------------------------------

127.0.0.1 localhost.localdomain localhost
127.0.0.1 smtp.example.se smtp
xxx.xxx.1.100 example.se example
::1 localhost6.localdomain6 localhost6
xxx.xxx.1.100 mail.example.se mail


-------------------------telnet localhost 25 ---------------------------

# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
220 mail.example.se ESMTP Postfix (Ubuntu/GNU)
ehlo localhost
250-mail.example.se
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN CRAM-MD5
250-AUTH=PLAIN LOGIN CRAM-MD5
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN


-----------------------------------telnet localhost 110--------------------

# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
+OK Dovecot ready.
user test@example.se
+OK
pass xxxxxxx
+OK Logged in.


-------------------------------------------------------------------------------------------

Last edited by dikon123; 11-06-2011 at 06:03 AM.
 
Old 11-07-2011, 12:20 AM   #5
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,188
Blog Entries: 4

Rep: Reputation: 219Reputation: 219Reputation: 219
Quote:
Originally Posted by dikon123 View Post
Hi,

i have installed and configured Postfix, dovecot on my Ubuntu server. and in addition configured PostfixVirtualMailBoxClamSmtp , postfix sasl on my server.

everything works on ubuntu server via command line or Terminal.
receiving emails /sending emails is ok when working on command line on server.

when i use Thunderbird as my mail client , it connects to my mail server but can not receive/ send emails on Thunderbird , everytime get error that "authentication faild".

i am wondering why authentication is not failed when working and testing mailserver on server terminal ??!!


anybody can help me ?!
I believe you should recheck the configuration of thunderbird
If everything is working fine on your server then the probability of not working goes to Thunderbird.
recheck the port no., smtp and imap server which you are using.

Code:
if you are using ssl then you should use 995 for pop3 and 465 for smtp
check for your saslauthd
Code:
#saslauthd status
 
Old 11-07-2011, 02:48 PM   #6
dikon123
LQ Newbie
 
Registered: Oct 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
i changed the "ssl=no" to test if it works and i checked the status of saslauthd:

#saslauthd status
saslauthd[19649] :main : no authentication mechanism specified
usage: saslauthd [options]

option information:
-a <authmech> Selects the authentication mechanism to use.
-c Enable credential caching.
-d Debugging (don't detach from tty, implies -V)
-r Combine the realm with the login before passing to authentication mechanism
Ex. login: "foo" realm: "bar" will get passed as login: "foo@bar"
The realm name is passed untouched.
-O <option> Optional argument to pass to the authentication
mechanism.
-l Disable accept() locking. Increases performance, but
may not be compatible with some operating systems.
-m <path> Alternate path for the saslauthd working directory,
must be absolute.
-n <procs> Number of worker processes to create.
-s <kilobytes> Size of the credential cache (in kilobytes)
-t <seconds> Timeout for items in the credential cache (in seconds)
-v Display version information and available mechs
-V Enable verbose logging
-h Display this message.

saslauthd 2.1.23
authentication mechanisms: sasldb getpwent kerberos5 pam rimap shadow ldap



but still not working: i get this error on thunderbird

"sending of password did not succeed, Mail server mail.example.se respound: authentication failed."

Last edited by dikon123; 11-07-2011 at 02:54 PM.
 
Old 11-07-2011, 10:03 PM   #7
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,188
Blog Entries: 4

Rep: Reputation: 219Reputation: 219Reputation: 219
Simply changing the ssl to "no" in thunderbird won't work

You are mapping the thunderbird mail client with your mail server on linux

So check the port no. and ssl on smtp server and pop3 or imap server in your linux machine which should be same

and if you want to enable or disable you will have to do it on server as well as client.
 
Old 11-08-2011, 02:44 PM   #8
dikon123
LQ Newbie
 
Registered: Oct 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Question

I checked my open ports on my Linux server and the result:


# netstat -l | grep "LISTEN"
tcp 0 0 localhost.localdo:10025 *:* LISTEN
tcp 0 0 localhost.localdo:10026 *:* LISTEN
tcp 0 0 localhost.localdo:mysql *:* LISTEN
tcp 0 0 *op3 *:* LISTEN
tcp 0 0 *:imap2 *:* LISTEN
tcp 0 0 *:www *:* LISTEN
tcp 0 0 *:ssh *:* LISTEN
tcp 0 0 localhost.localdoma:ipp *:* LISTEN
tcp 0 0 *:smtp *:* LISTEN
tcp 0 0 *:imaps *:* LISTEN
tcp 0 0 *op3s *:* LISTEN
tcp6 0 0 [::]:ssh [::]:* LISTEN
tcp6 0 0 localhost6.localdom:ipp [::]:* LISTEN

# netstat -an | grep "LISTEN"
tcp 0 0 127.0.0.1:10025 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:10026 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 ::1:631 :::* LISTEN


and the Thunderbird looks like :
Attached Images
File Type: png Capture2.PNG (9.7 KB, 5 views)
File Type: png Capture.PNG (23.3 KB, 2 views)
 
Old 11-08-2011, 11:09 PM   #9
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,188
Blog Entries: 4

Rep: Reputation: 219Reputation: 219Reputation: 219
sorry initially I made a mistake

you need to check
Code:
#service saslauthd status
Code:
#service saslauthd restart
change the smtp port no. to 587 and give a try

these lines are missing ?
Code:
#vi /etc/dovecot.conf
ssl = no

protocols imap pop3

protocol imap {
listen = *:143
}
protocol pop {
listen = *:110
}
Code:
#vi /etc/xinetd.d/imap

#
# imap - Plaintext IMAP mail daemon
#
service imap
{
socket_type = stream
wait = no
user = root
server = /etc/rc.d/init.d/imapd
log_on_success += HOST DURATION
log_on_failure += HOST
disable = no -------->check this line
}
Code:
#service xinetd restart
check the username and password you are using
Quote:
as I think you should include the domain name in your username since I saw username "test" in the attached image.
 
Old 11-09-2011, 10:42 AM   #10
vasile002
Member
 
Registered: Oct 2011
Posts: 51

Rep: Reputation: Disabled
can you please enable debugging in saslauthd and tell us what you get in the mail logs when the authentication fails?
 
Old 11-10-2011, 04:02 PM   #11
dikon123
LQ Newbie
 
Registered: Oct 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
i changed these lines in my dovecot config-file.

#vi /etc/dovecot.conf
ssl = no

protocols imap pop3

protocol imap {
listen = *:143
}
protocol pop {
listen = *:110
}

but couldn't find #vi /etc/xinetd.d/imap in Ubuntu.

and i changed some server setting in my Thunderbird as below image:

but something strange as result:

*** I can send e-mails from Thunderbird but only to my linux server account ,, i mean for example from test1@example.se to test2@example.se , but could check emails only on Linux server not on Thunderbird.

i tried to send emails to may gmail account but it gives me this error:

relay access is denied to myaccount@gmail.com.

*** I couldn't receive any e-mails on my thunderbird accounts:

i mean my test@example.se inbox in thunderbird is empty and it displays :
0 read emails, since i have emails in my inbox when checking them on linux server.
Attached Images
File Type: png Capture.PNG (9.7 KB, 2 views)

Last edited by dikon123; 11-10-2011 at 04:17 PM.
 
Old 11-10-2011, 11:48 PM   #12
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,188
Blog Entries: 4

Rep: Reputation: 219Reputation: 219Reputation: 219
If there is no imap file then you can create one and copy the file which i had posted in my last post and restart xinetd
Code:
#service xinetd restart
I asked you to change the port no. from 995 to 587

the reason behind this is

port no 995 and 465 are used when you are using ssl connection for smtp and imap but in this case if you have done ssl=no

so use 587 as smtp and 110 for pop3 and 143 for imap

Well as far as your inbox issue is concerned I am looking for a solution because when i got connected to thunderbird all the earlier emails were missing but the new mails which i receive are stored there.
 
Old 11-11-2011, 01:49 PM   #13
dikon123
LQ Newbie
 
Registered: Oct 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Hi agian,


I installed xinetd and created "imap" file in /etc/xinetd.d,

I copied the your content to #imap" file,and checked for imapd "server = /etc/rc.d/init.d/imapd" .
the only place i found "imapd" was in : /usr/share/logwatch/scripts/services/imapd , there is no "imapd" in my entire / .

another thing that i checked was my open ports,,, i don't see port 587 or 995 in the list below.


#netstat -nl | grep "LISTEN"
tcp 0 0 127.0.0.1:10025 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:10026 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 ::1:631 :::* LISTEN


any way Thunderbird still not works. and after changing smtp port from 25 to 587 i cann't send e-mails even to my linux mail server accounts as it worked before.!!

:-)

Last edited by dikon123; 11-11-2011 at 01:53 PM.
 
Old 11-14-2011, 05:55 AM   #14
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,188
Blog Entries: 4

Rep: Reputation: 219Reputation: 219Reputation: 219
So while using port 25 are you able send mails to any hotmail account via ubuntu terminal?
 
Old 11-14-2011, 01:08 PM   #15
dikon123
LQ Newbie
 
Registered: Oct 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Unhappy

Not to hotmail accounts, but it sends emails to gmail accounts and accounts on my ubuntu server.

And i don't recieve e-mails from Hotmail accounts.

Last edited by dikon123; 11-14-2011 at 01:14 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
Problems with Thunderbird connecting correctly to the mail server coss_cat Linux - Software 1 01-25-2011 03:18 PM
Thunderbird - won't send mail via Exchange Server nbcohen Linux - Desktop 2 09-13-2010 10:36 AM
thunderbird: unable to connect to mail server Hewson Linux - Software 1 03-13-2008 01:33 PM
Shared Thunderbird mbox or mail server? pljvaldez Linux - Server 5 03-09-2007 06:51 PM
How can I configure Thunderbird to work with my Mail Server HGeneAnthony Linux - Software 5 11-04-2006 06:36 PM


All times are GMT -5. The time now is 01:31 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration