Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 19th September 2012, 21:57
blinky blinky is offline
Member
 
Join Date: Sep 2012
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default Postfix, Dovecot, MySQL on Ubuntu 12.04 - help needed

I'm relatively new to Linux (Ubuntu) but have manged, thus far, to get it installed on my former Windows machine when I purchased a new desktop.

A month or so ago, I cedided to install Apache and VSFTP on it which proved to be a reasonably trouble-free task though I'm sure there's lots I haven't even considered.

Two weeks ago, I decided to try my hand at installed a mail server. This, unfrortunately, has turned out to be a taxing process and I'm in way over my head.

The problem is further complicated by the fact that I have a severe visual impairment and use screen reading software to acess written material. As a consequence, I find myself editting configuration files on a Windows machine equipped with voice sythesis and then copying the files back over top. Not for the faint of heart.

There are a host of help guides out there many of which are somewhat dated so I was looking for something recent dealing specifically with Ubuntu 12.04 so that it would be relevant to my software.

I have used the guide at:
http://www.exratione.com/2012/05/a-m...dovecot-mysql/

but, of course, it doesn't work.

I'm not sure where the problem lay. It's likely several problems or several things that have to be addressed. And, not to overstate the fact, I am very new to linux.

I'm hoping I can find someone in here who can walk me thorugh the process, one step at a time, and help me sort out where I've gone wrong. I expect it's going to take some time to sort out and there'll be a bit of a learning curve on my part. (Patience on yours I hope.)

When I try to telnet into the localhost 25 it reports:

Trying 127.0.0.1...
Connected to mail.mydomainname.com.
Escape character is '^]'
Connection closed by foreign host.

The latest entry in /var/log/mail.err reads:

Sep 19 15:50:13 mail postfix/smtpd[26667]: fatal: no SASL authentication mechanims

Help and patience greatly appreciated.
Reply With Quote
Sponsored Links
  #2  
Old 20th September 2012, 11:34
pititis pititis is offline
Senior Member
 
Join Date: Dec 2010
Location: München
Posts: 364
Thanks: 38
Thanked 88 Times in 68 Posts
Default

Hello,

Can you post the output from?:

Code:
postconf |grep sasl
and

Code:
doveconf |grep auth
Cheers!
Reply With Quote
  #3  
Old 20th September 2012, 15:01
blinky blinky is offline
Member
 
Join Date: Sep 2012
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by pititis View Post
Hello,

Can you post the output from?:

Code:
postconf |grep sasl
and

Code:
doveconf |grep auth
Cheers!
Output from postconf |grep sasl as requested:
broken_sasl_auth_clients = yes
cyrus_sasl_config_path =
lmtp_sasl_auth_cache_name =
lmtp_sasl_auth_cache_time = 90d
lmtp_sasl_auth_enable = no
lmtp_sasl_auth_soft_bounce = yes
lmtp_sasl_mechanism_filter =
lmtp_sasl_password_maps =
lmtp_sasl_path =
lmtp_sasl_security_options = noplaintext, noanonymous
lmtp_sasl_tls_security_options = $lmtp_sasl_security_options
lmtp_sasl_tls_verified_security_options = $lmtp_sasl_tls_security_options
lmtp_sasl_type = cyrus
proxy_write_maps = $smtp_sasl_auth_cache_name $lmtp_sasl_auth_cache_name $address_verify_map $postscreen_cache_map
send_cyrus_sasl_authzid = no
smtp_sasl_auth_cache_name =
smtp_sasl_auth_cache_time = 90d
smtp_sasl_auth_enable = no
smtp_sasl_auth_soft_bounce = yes
smtp_sasl_mechanism_filter =
smtp_sasl_password_maps =
smtp_sasl_path =
smtp_sasl_security_options = noplaintext, noanonymous
smtp_sasl_tls_security_options = $smtp_sasl_security_options
smtp_sasl_tls_verified_security_options = $smtp_sasl_tls_security_options
smtp_sasl_type = cyrus
smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_destination, check_policy_service inet:127.0.0.1:10023, permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_exceptions_networks =
smtpd_sasl_local_domain =
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_tls_security_options = $smtpd_sasl_security_options
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, warn_if_reject reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_pipelining, permit

Output from doveconf |grep auth as requested:
I was unable to generate this file. The on-screen display reads:
doveconf: Fatal: open (/etc/dovecot/dovecot.conf) failed: Permission denied.

As I was not in a root terminal I issue the same command preceeded by sudo and the on-screen output is:
doveconf: Fatal: Error in configuration file /etc/dovecot/conf.d/10-master.conf
line 93: Unkown setting: service.

The line it is referring to in 10-mater.conf is the service auth-worker {:

service auth-worker {
# Auth worker process is run as root by default, so that it can access
# /etc/shadow. If this isn't necessary, the user should be changed to
# $default_internal_user.
user = root
}

Regards.
Reply With Quote
  #4  
Old 20th September 2012, 16:19
pititis pititis is offline
Senior Member
 
Join Date: Dec 2010
Location: München
Posts: 364
Thanks: 38
Thanked 88 Times in 68 Posts
Default

I think that you have a missing } or { in /etc/dovecot/conf.d/10-master.conf

Re-check the changes you did.
Reply With Quote
  #5  
Old 20th September 2012, 20:53
blinky blinky is offline
Member
 
Join Date: Sep 2012
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Good afternoon,

The changes I made are EXACTLY as indicated on the instructions at:
http://www.exratione.com/2012/05/a-m...dovecot-mysql/ as I verified them when I first say the error.

I did, however, add an exter } and the 10-master.conf now looks like this:
#default_process_limit = 100
#default_client_limit = 1000

# Default VSZ (virtual memory size) limit for service processes. This is mainly
# intended to catch and kill processes that leak memory before they eat up
# everything.
#default_vsz_limit = 256M

# Login user is internally used by login processes. This is the most untrusted
# user in Dovecot system. It shouldn't have access to anything at all.
#default_login_user = dovenull

# Internal user is used by unprivileged processes. It should be separate from
# login user, so that login processes can't disturb other processes.
#default_internal_user = dovecot

service imap-login {
inet_listener imap {
#port = 143
}
inet_listener imaps {
#port = 993
#ssl = yes
}

# Number of connections to handle before starting a new process. Typically
# the only useful values are 0 (unlimited) or 1. 1 is more secure, but 0
# is faster. <doc/wiki/LoginProcess.txt>
#service_count = 1

# Number of processes to always keep waiting for more connections.
#process_min_avail = 0

# If you set service_count=0, you probably need to grow this.
#vsz_limit = 64M
}

service pop3-login {
inet_listener pop3 {
#port = 110
}
inet_listener pop3s {
#port = 995
#ssl = yes
}
}

service lmtp {
unix_listener lmtp {
#mode = 0666
}

# Create inet listener only if you can't use the above UNIX socket
#inet_listener lmtp {
# Avoid making LMTP visible for the entire internet
#address =
#port =
#}
}

service imap {
# Most of the memory goes to mmap()ing files. You may need to increase this
# limit if you have huge mailboxes.
#vsz_limit = 256M

# Max. number of IMAP processes (connections)
#process_limit = 1024
}

service pop3 {
# Max. number of POP3 processes (connections)
#process_limit = 1024
}

service auth {
# auth_socket_path points to this userdb socket by default. It's typically
# used by dovecot-lda, doveadm, possibly imap process, etc. Its default
# permissions make it readable only by root, but you may need to relax these
# permissions. Users that have access to this socket are able to get a list
# of all usernames and get results of everyone's userdb lookups.
unix_listener auth-userdb {
mode = 0600
user = vmail
group = mail
}

unix_listener /var/spool/postfix/private/auth {
mode = 0660
user = postfix
group = postfix
}
}
# EXTRA } ABOVE ADDED

service auth-worker {
# Auth worker process is run as root by default, so that it can access
# /etc/shadow. If this isn't necessary, the user should be changed to
# $default_internal_user.
user = root
}

service dict {
# If dict proxy is used, mail processes should have access to its socket.
# For example: mode=0660, group=vmail and global mail_access_groups=vmail
unix_listener dict {
#mode = 0600
#user =
#group =
}
}

As requested, the contents of doveconf |grep auth are as follows:
auth_anonymous_username = anonymous
auth_cache_negative_ttl = 1 hours
auth_cache_size = 0
auth_cache_ttl = 1 hours
auth_debug = yes
auth_debug_passwords = yes
auth_default_realm =
auth_failure_delay = 2 secs
auth_first_valid_uid = 500
auth_gssapi_hostname =
auth_krb5_keytab =
auth_last_valid_uid = 0
auth_master_user_separator =
auth_mechanisms = plain login
auth_realms =
auth_socket_path = auth-userdb
auth_ssl_require_client_cert = no
auth_ssl_username_from_cert = no
auth_use_winbind = no
auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX YZ01234567890.-_@
auth_username_format =
auth_username_translation =
auth_verbose = yes
auth_verbose_passwords = plain
auth_winbind_helper_path = /usr/bin/ntlm_auth
auth_worker_max_count = 30
disable_plaintext_auth = yes
unix_listener anvil-auth-penalty {
service auth-worker {
executable = auth -w
unix_listener auth-worker {
service auth {
executable = auth
unix_listener /var/spool/postfix/private/auth {
unix_listener auth-client {
unix_listener auth-login {
unix_listener auth-master {
unix_listener auth-userdb {


The good news is that I am now able to telnet localhost 25

And it appears as though mail is created when I do so off the command line in terminal mode but it doesn't seem to go anywhere.

Stuck again... :-( ... but optimistic the knowledgeable folk in here will come to my rescue. :-)
Reply With Quote
  #6  
Old 20th September 2012, 22:16
pititis pititis is offline
Senior Member
 
Join Date: Dec 2010
Location: München
Posts: 364
Thanks: 38
Thanked 88 Times in 68 Posts
Default

ok

And now what is in mail.log?
Reply With Quote
  #7  
Old 20th September 2012, 22:38
blinky blinky is offline
Member
 
Join Date: Sep 2012
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

There is nothing in the mail log.

/var/log/mail.log is a 0 byte file.

There is, however, a message sitting in the mail queue which I just created. Output of "sudo mailq" as follows:

-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
D08DF520364 197 Thu Sep 20 16:29:20 blinky@localhost
(mail transport unavailable)
blinky@changedmyemaladdress.com

-- 0 Kbytes in 1 Request.
Reply With Quote
  #8  
Old 20th September 2012, 22:50
pititis pititis is offline
Senior Member
 
Join Date: Dec 2010
Location: München
Posts: 364
Thanks: 38
Thanked 88 Times in 68 Posts
Default

oh God,

I recommend to you follow a tutorial from howtoforge:

http://www.howtoforge.com/perfect-se...ot-ispconfig-3

With ispconfig you will have a full control panel for email (postfix+dovecot+amavis+clamav). The installation is a joke.

Cheers
Reply With Quote
  #9  
Old 21st September 2012, 04:23
blinky blinky is offline
Member
 
Join Date: Sep 2012
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'd really like to try to resolve this installation to determine where I went wrong. I expect I'll make lots of mistakes along the way.

The problem with /var/log/mail.log was entirely mine. I deleted it. Then I recreated it which is why it was a 0 byte file. Then I did some more research.

If I'm on the right path now I should have recreated it with:

touch /var/log/mail.log

But of course it's still empty.

You mention ISPConfig as an option. Will that involve a total reinstall? I'm just not sure the GUI interface will be as friendly to my screen reader as working directly off the command-line. (Rember, I have a severe visual impairment so am using a screen reader to read everything.)

You can't believe the time I've already put into this. Not that I mind... that's what it's all about. Just doing it because it seems like somethhing that is there to be done.

If you're unable to help any further understandable... perhaps someone else can jump in.

Thanking you again for any help you can give.
Reply With Quote
  #10  
Old 21st September 2012, 07:21
blinky blinky is offline
Member
 
Join Date: Sep 2012
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Once that single missing "}" was noticed in the dovecot config file it seemed to solve the first problem.

I was then able to [colour=blue]telnet localhost 25[/color] and send out mail. Unfortunately, it was stuck in the mail queue and not going anywhere.

After much time on Google I discovered someone else having a similar problem.

I commnented out the line:
content_filter=amavis:[127.0.0.1]:10024 in /etc/postfix/main.cf

ran the "postsuper -r ALL" to re-queue the mail and it was sent out just fine.

One step closer but that's it for this evening.... this is exhausting!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Email Working ISPConfig3 Squirrelmail and Courier etc Ian Wilson Installation/Configuration 17 19th June 2013 22:58
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail-Problema jz_ HOWTO-Related Questions 9 14th September 2011 13:31
MySQL Error Nolan Installation/Configuration 12 16th February 2011 02:15
Webmail problems with only one domain? compner Installation/Configuration 14 16th February 2010 16:59
Postfix can't received email from exterior astra2000 Server Operation 5 17th October 2009 23:26


All times are GMT +2. The time now is 19:57.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.