LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 07-12-2011, 02:39 AM   #1
Larry James
Member
 
Registered: Jun 2000
Location: Buffalo, New York
Distribution: Ubuntu, Raspbian
Posts: 381

Rep: Reputation: 40
Postfix with authentication on the Ubuntu Server fails


Can someone advise me how to enable Postfix to use saslauthd.

I followed very carefully the instructions given at:

https://help.ubuntu.com/community/Po...Authentication

The telnet port 25 gives this result:

Code:
ljames@ubunserver:/etc/postfix/work$ telnet localhost 25 
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 ubunserver.apollo3.com ESMTP Postfix (Ubuntu)
EHLO localhost
250-ubunserver.apollo3.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH NTLM LOGIN CRAM-MD5 DIGEST-MD5 PLAIN
250-AUTH=NTLM LOGIN CRAM-MD5 DIGEST-MD5 PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
quit
221 2.0.0 Bye
Connection closed by foreign host.
When I use Evolutions or Outlook to try to send email I get the following in the log:

/var/log/mail.log:
Code:
Jul 12 03:15:32 ubunserver postfix/smtpd[9887]: connect from host-216-153-132-55.buf.choiceone.net[216.153.132.55]
Jul 12 03:15:32 ubunserver postfix/smtpd[9887]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Jul 12 03:15:32 ubunserver postfix/smtpd[9887]: warning: SASL authentication failure: no secret in database
Jul 12 03:15:32 ubunserver postfix/smtpd[9887]: warning: host-216-153-132-55.buf.choiceone.net[216.153.132.55]: SASL NTLM authentication failed: authentication failure
Jul 12 03:15:32 ubunserver postfix/smtpd[9887]: warning: SASL authentication failure: realm changed: authentication aborted
Jul 12 03:15:32 ubunserver postfix/smtpd[9887]: warning: host-216-153-132-55.buf.choiceone.net[216.153.132.55]: SASL DIGEST-MD5 authentication failed: authentication failure
Jul 12 03:15:32 ubunserver postfix/smtpd[9887]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Jul 12 03:15:32 ubunserver postfix/smtpd[9887]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Jul 12 03:15:32 ubunserver postfix/smtpd[9887]: warning: host-216-153-132-55.buf.choiceone.net[216.153.132.55]: SASL LOGIN authentication failed: authentication failure
Jul 12 03:15:32 ubunserver postfix/smtpd[9887]: lost connection after AUTH from host-216-153-132-55.buf.choiceone.net[216.153.132.55]
Jul 12 03:15:32 ubunserver postfix/smtpd[9887]: disconnect from host-216-153-132-55.buf.choiceone.net[216.153.132.55]
The saslauthd test passes with:
Code:
ljames@ubunserver:/var/log$ sudo testsaslauthd -u ljames -p [passwordhere]
0: OK "Success."
/etc/postfix/main.cf:
Code:
ljames@ubunserver:/etc/postfix$ cat 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_tls_cert_file = /etc/ssl/certs/smtpd.crt
smtpd_tls_key_file = /etc/ssl/private/smtpd.key
smtpd_use_tls=yes
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 = ubunserver.apollo3.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = ubunserver.apollo3.com, localhost.apollo3.com, , localhost
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = 
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
home_mailbox = Maildir/
smtpd_sasl_local_domain = 
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtpd_tls_auth_only = no
smtp_tls_note_starttls_offer = no
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
#lines added
smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated
I have spent a long time trying to figure out what to do next. My whole OS and all the applications installation is very clean. Everything is from the official repositories.

Thanks in advance for anyone who has any input or suggestions. I'll gladly run any test or provide any other information needed.

-- L. James

--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames
 
Old 07-12-2011, 03:39 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
so you have a log file absolutely littered with "warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory" but you've not even mentioned that... you probably want that file, no?
 
1 members found this post helpful.
Old 07-12-2011, 04:11 AM   #3
Larry James
Member
 
Registered: Jun 2000
Location: Buffalo, New York
Distribution: Ubuntu, Raspbian
Posts: 381

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by acid_kewpie View Post
so you have a log file absolutely littered with "warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory" but you've not even mentioned that... you probably want that file, no?
Because I followed so closely all the steps in the Ubuntu documents and have an all native Ubuntu install, I was sure that someone else using Ubuntu would have came to this same point and knew something obvious that was left out.

I spent nearly a week wrestling with it before posting my message, and yea, I should have made reference to the fact that there is an /etc/sasldb2 file.

Code:
ljames@ubunserver:/etc/postfix$ ls -ld /etc/sasldb2
-rw-rw---- 1 root sasl 12288 2011-07-10 10:02 /etc/sasldb2
I'm running Ubuntu Server 11.04.

Thanks for pointing out what I left out. Please let me know if I'm leaving something else out.

By the way I changed the mode (of the sasldb2 file) to "chmod go+wr" to see if that made a difference. When it didn't I changed the mode back to the way it was at the default installation (the way it is in the output above).

-- L. James

--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames
 
Old 07-12-2011, 04:17 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
A week?? 10 seconds after pasting that message into google says that it's probably something related to a default chroot jail...

http://www.kloopy.com/344_Postfix__S...en_Berkeley_db
 
1 members found this post helpful.
Old 07-12-2011, 04:31 AM   #5
Larry James
Member
 
Registered: Jun 2000
Location: Buffalo, New York
Distribution: Ubuntu, Raspbian
Posts: 381

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by acid_kewpie View Post
A week?? 10 seconds after pasting that message into google says that it's probably something related to a default chroot jail...

http://www.kloopy.com/344_Postfix__S...en_Berkeley_db
I've been giving support for many years. I often find situations where people spend months trying to resolve issues that aren't issues to me. But again, I've spent a lot of time on various issues that aren't issues to other experienced computer users. I spent the time because I know once I learn how to resolve this issue it'll turn out to be something very simple. But so far I can't figure it out.

I appreciate your hints. I'm still stuck. Hopefully once I get it figured out others someone will take a moment and update the documentation.

I used to not have these type of problems in the past. Up until last year I only used tarballs, compiled my kernels and compiled everything that I installed on my computers. So all the locations where where I specified in my compilation. However, a little more than a year ago I tested a full installation and found some convenience in using the prebuilt (at that time rpm's but now deb files), and at this time the distro repo.

Now I'm trying to participate in the community by using the repo much to the design and testing of the developers and giving feedback. So, maybe there is some chroot component left out of the documentation. I'm looking for how I can effect this, and anything else.

Thanks again. If you know of something specific that I can actually test to facilitate in this capacity, please nudge!

-- L. James

--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames
 
Old 07-12-2011, 04:37 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
I don't understand your logic here in the slightest. You are refusing to help yourself in any way and insisting on only using specific "community" support channels?? You have a problem which may or may not be related to a chroot jail config. So now you're just going to wait and see if someone who already knows this issue first hand when there are plenty of leads you can follow to work it out and then actually be able to provide back MORE to the community??
 
1 members found this post helpful.
Old 07-12-2011, 05:01 AM   #7
Larry James
Member
 
Registered: Jun 2000
Location: Buffalo, New York
Distribution: Ubuntu, Raspbian
Posts: 381

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by acid_kewpie View Post
I don't understand your logic here in the slightest. You are refusing to help yourself in any way and insisting on only using specific "community" support channels?? You have a problem which may or may not be related to a chroot jail config. So now you're just going to wait and see if someone who already knows this issue first hand when there are plenty of leads you can follow to work it out and then actually be able to provide back MORE to the community??
No. I haven't refused to help myself. I've already mentioned to you that I spend a week researching before posting my message. I'm also sure that since I'm using the defaults that are provided by the developers there is something simple that may not be clear that is in the docs and someone might part.

I understand that you might not see the logic, but there is logic.

I'm still helping myself. I'm not waiting. I didn't post a message and stop performing research and various test. In fact I know that if I moved away from the postfix as provided by the distro and started anew with the tarball from the postfix site I could get it up and running. But I'm participating in a particular logic, which I' understand that you're immediately missing, of supporting the effort of the community by sharing the problem with the distribution and participating in what can become an official resolution.

I'm not dependent on the current server that I'm building, though I hope to soon replace my old server with the new one.

If I find a way to resolve the issue with the distro distribution I'll bring it back to the community.

I'm in no way waiting. I'm working and also contributing.

Thanks for the input.

-- L. James

--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames
 
Old 07-12-2011, 05:10 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
If you have a problem with something you work out what it is and fix it. you need to get to the end result. Then you can look at how you got there and then possibly turn that into a bug report or something which helps the community. You said you have spent weeks "researching" what I may have found in *literally* under a minute. No community is ever helped by people ignoring good advice, wherever it is from. Sharing a problem is a hell of a lot less useful than sharing a solution.
 
Old 07-12-2011, 05:25 AM   #9
Larry James
Member
 
Registered: Jun 2000
Location: Buffalo, New York
Distribution: Ubuntu, Raspbian
Posts: 381

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by acid_kewpie View Post
If you have a problem with something you work out what it is and fix it. you need to get to the end result. Then you can look at how you got there and then possibly turn that into a bug report or something which helps the community. You said you have spent weeks "researching" what I may have found in *literally* under a minute. No community is ever helped by people ignoring good advice, wherever it is from. Sharing a problem is a hell of a lot less useful than sharing a solution.
It's very obvious to me that you haven't tested the application in this particular case. I have tested it and it doesn't work. I'm sure if you tested it and it didn't work you'd have a clue as to why.

Of course you can get posting points by boasting at how you found a solution in minutes that doesn't work in this case and bashing the OP for not being as smart as you, and possibly doing something wrong as far as not being able to figure out something you boast that you figured out.

And yes, the community will be able to benefit from what I eventually learn.

By the way, in absent of attempting the authentication method, all other components of postfix works. To me that would someone eliminate your whim about a chroot issue.

I can do what you did to this post in every post on the forum and it might look like I know something. But boasting that I found something to test in minutes might not be as big a deal as you're making it out to be. I came up with many things in seconds when I first started the project. I'm sure lots of which you might miss and possibly take weeks to come up with, or maybe just give up and never spend a week trying to resolve the issue.

Spending time working on a problem isn't necessarily a sign of ignorance. The extremely high proficient developers of the distro spends 6 months fixing issues before publishing a release, and there are still issues.

If I use Evolutions or Microsoft Outlook without the authentication option it works flawlessly. It uses the postfix configuration files and all the other files from the /etc directory... not from a special chroot directory.

I believe your bashing of my effort is taken into concern. I appreciate if you want to contribute to the solution. But you don't have to continue following up with more bashing.

I'm working on the solution. I appreciate your comments and suggestions. I'm sure I'll get it figured out and mark the topic solved for others wanting to use Postfix authentication on Ubuntu, just as I have done with most of the topics I've started.

Have a nice day!

-- L. James

--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames
 
Old 07-12-2011, 05:26 AM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Good luck, you clearly need it.
 
1 members found this post helpful.
Old 07-12-2011, 05:40 AM   #11
Larry James
Member
 
Registered: Jun 2000
Location: Buffalo, New York
Distribution: Ubuntu, Raspbian
Posts: 381

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by acid_kewpie View Post
Good luck, you clearly need it.
Thanks. But I've always had success in the past. I will in this case. The end results won't really be luck. It'll be using a mature perspective that comes with wisdom. Something that many elder people as myself develop over time.

And again, I'll bring the solution back to the community so that this configuration effort will be easier for the next person.

Oh yea, I intentionally posted this (network/server) issue in the Ubuntu forum because of the philosophy of the Ubuntu community in trying to make the operation as easy and seamless as possible. This effort has changed a number of components from it's normal defaults. I understand it's possible that another Ubuntu user haven't tested this configuration yet.

Have a nice day!

-- L. James

--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames
 
Old 07-14-2011, 04:05 PM   #12
Larry James
Member
 
Registered: Jun 2000
Location: Buffalo, New York
Distribution: Ubuntu, Raspbian
Posts: 381

Original Poster
Rep: Reputation: 40
How are you doing, Chris. When I removed the system from the chroot jail I continued to have problems. The system was trying to use a saslauth2 that wasn't configured on my system, and of which I didn't want. That was some of the intentions of my description. What was the purpose of that file, even if it found it, which, of course it eventually did?

I did a few things including installing and configuring Devecot. I'll continue to study all the different components of Postfix and start to understand Devecot. I don't know if that makes a difference. The installation and configuration of it didn't resolve the issue.

I was just about to uninstall everything that I thought was pertaining to Postfix (and my effort to install it), then reinstall it or test Sendmail, then try Postfix again.

Just before uninstalling it, I reviewed the documentation page again ( https://help.ubuntu.com/community/Postfix ). It really appeared (as from the beginning) to be very simple and cut and dry. Revisiting it, it appeared that the provided steps would initiate the system, or should I say, reconfigure it as if a fresh install.

When in went to edit the “smtpd.conf file it didn't exist. I was wondering why. I looked and notice that during the first install I had mistakenly edited/created the file by the wrong name (smtp.conf). I created the file and didn't go any further than that point. I tested the server and it worked flawlessly the way I was trying to get it to work. It used the /etc/shadow file.

I gave this detailed description to help anyone else that might have problems setting up and configuring Postfix for authentication using the /etc/shadow file. The question is asked many times on the Internet and described as a nightmare to make it work. Some of that might have contributed to my having such difficulty (expecting difficulty).

I guess I left a few important componets out of my original post. I thought my reference to authentication would indicate to the people reading that I was trying to use the /etc/shadow option. I thought I had posted my /etc/default/saslauthd, which has that option set. I should have posted my /etc/smptd.conf file. Had I done that I'm sure someone would have quickly noticed that error (probably even me).

Anyway, the steps on the documentation page appear to work as published.

Thanks again, Chris for the input. Keep up the good work you're doing on the forum. I especially think you for tolerating my method of trying to get things done. In this case I didn't describe the objective and steps taken clear enough. Again, your response opened up the saslauth2 database method, which wouldn't work in my case because I don't have a saslauth2 database of users. I have a /etc/passwd system of users.

I have already replaced my outgoing server with the new one. It’s working great. I'm glad to retire the Redhat/Fedora Core 6 from this job. It still has other jobs that I'll soon be replacing by my other machines.

My next step is to configure the new mail server as a delivery machine. But that's for a new thread after I've spend some time working with it.

-- L. James

--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames
 
  


Reply



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
Forcing SMTP Authentication with Postfix 2.5.1/Ubuntu 8.04 elorc Linux - Server 7 08-09-2010 03:02 AM
Ubuntu 9.04 outgoing postfix authentication radcom123 Linux - Server 0 11-07-2009 04:00 PM
Outgoing Smtp authentication for Postfix on ubuntu 9.04 radcom123 Linux - Software 0 11-07-2009 11:17 AM
SMTP authentication error and server could not connected in postfix server Ravinder Singh Thakur Linux - Server 1 11-02-2009 10:22 AM
Postfix + SASL Authentication problem on Ubuntu Server 8.04 beusekom Linux - Server 3 11-14-2008 04:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 11:37 AM.

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