LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 09-09-2013, 02:04 AM   #1
hesisaboury
Member
 
Registered: Dec 2010
Location: iran
Posts: 199

Rep: Reputation: 0
Block User to login to mail server


Hello,
i used this link
http://wiki.dovecot.org/Authentication/RestrictAccess
and this part
passdb passwd-file {
args = /etc/dovecot/deny.imap
deny = yes
}

but now no one ca login. and i get this error
dovecot: auth: Error: Error in configuration file /etc/deny.imap line 1: Expecting '='

here is my dovecot config


auth_debug = yes
auth_debug_passwords = yes
auth_default_realm = testdomain.ir
auth_username_format = %Lu
auth_verbose = yes
disable_plaintext_auth = no
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
listen = *
mail_debug = yes
mail_gid = vmail
mail_location = maildir:~/Maildir
mail_plugins = " quota"
mail_uid = vmail
maildir_very_dirty_syncs = yes
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date
passdb {
args = /etc/deny.imap
deny = yes
driver = ldap
}
passdb {
args = /etc/dovecot/dovecot-ldap.conf
driver = ldap
}
plugin {
fts = squat
quota = maildir:User quota
quota_warning = storage=95%% quota-warning 95 %u
quota_warning2 = storage=80%% quota-warning 80 %u
sieve = ~/.dovecot.sieve
sieve_before = /mbox/Spam.sieve
sieve_dir = ~/sieve
sieve_extensions = +notify
}
postmaster_address = postmaster@ssmailer.ir
protocols = imap pop3 lmtp sieve
service auth {
unix_listener auth-userdb {
user = vmail
}
}
service imap-login {
inet_listener imap {
port = 143
}
inet_listener imaps {
port = 993
ssl = yes
}
process_min_avail = 20
service_count = 0
vsz_limit = 256 M
}
service lmtp {
inet_listener lmtp {
address = 10.0.0.2 127.0.0.1
port = 24
}
user = vmail
}
service managesieve-login {
inet_listener sieve {
port = 4190
}
}
service pop3-login {
inet_listener pop3 {
port = 110
}
inet_listener pop3s {
port = 995
ssl = yes
}
}
service quota-warning {
executable = script /usr/local/bin/quota-warning.sh
unix_listener quota-warning {
user = vmail
}
user = vmail
}
ssl_ca = </usr/local/PeykAsa/SSL/certs/pa-ca.crt
ssl_cert = </usr/local/PeykAsa/SSL/certs/mail.crt
ssl_key = </usr/local/PeykAsa/SSL/private/mail.key
userdb {
driver = prefetch
}
userdb {
args = /etc/dovecot/dovecot-ldap.conf.usr
driver = ldap
}
protocol lmtp {
mail_plugins = " quota sieve"
}
protocol lda {
mail_debug = yes
mail_plugins = " quota sieve"
}
protocol imap {
mail_plugins = " quota imap_quota fts fts_squat"
}
protocol pop3 {
pop3_no_flag_updates = yes
}
protocol sieve {
mail_max_userip_connections = 50
}
 
Old 09-09-2013, 02:09 AM   #2
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
dovecot: auth: Error: Error in configuration file /etc/deny.imap line 1: Expecting '='
Looks like the error is in your deny.imap not dovecot.conf
 
Old 09-09-2013, 03:22 AM   #3
hesisaboury
Member
 
Registered: Dec 2010
Location: iran
Posts: 199

Original Poster
Rep: Reputation: 0
according to this Link
http://wiki.dovecot.org/Authentication/RestrictAccess
deny.imap is just a file that contains username per line .
 
Old 09-09-2013, 05:11 AM   #4
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
Originally Posted by hesisaboury View Post
Code:
passdb {
args = /etc/dovecot/dovecot-ldap.conf
driver = ldap
Seems you missed a bit:
Code:
passdb passwd-file {
args = /etc/dovecot/deny.imap
deny = yes
}
 
Old 09-09-2013, 05:23 AM   #5
hesisaboury
Member
 
Registered: Dec 2010
Location: iran
Posts: 199

Original Poster
Rep: Reputation: 0
I tried it before ..no success

---------- Post added 09-09-13 at 02:54 PM ----------

I tried it before ..no success
passdb passwd-file {
args = /etc/dovecot/deny.imap
deny = yes
driver = ldap
}

passdb {
args = /etc/dovecot/dovecot-ldap.conf
driver = ldap
}
 
Old 09-09-2013, 05:37 AM   #6
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Sorry, I quoted the wrong part before - should have been this
Quote:
Originally Posted by hesisaboury View Post
Code:
passdb {
args = /etc/deny.imap
deny = yes
driver = ldap
}
You are using a file, but have missed the passwd-file directive and have also specified the ldap driver, which will not work.

Last edited by descendant_command; 09-09-2013 at 05:38 AM.
 
Old 09-09-2013, 06:58 AM   #7
hesisaboury
Member
 
Registered: Dec 2010
Location: iran
Posts: 199

Original Poster
Rep: Reputation: 0
changed to this :

passdb {
args = /etc/dovecot/deny.imap
deny = yes
driver = ldap
}
passdb {
args = /etc/dovecot/dovecot-ldap.conf
driver = ldap
}

no success,


==> mail.err <==
Sep 9 08:02:24 mail1 dovecot: auth: Error: Error in configuration file /etc/dovecot/deny.imap line 1: Expecting '='
Sep 9 08:02:24 mail1 dovecot: log: Error: service(auth): child 3630 returned error 89 (Fatal failure)
Sep 9 08:02:24 mail1 dovecot: master: Error: service(auth): command startup failed, throttling

==> mail.info <==
Sep 9 08:02:24 mail1 dovecot: auth: Error: Error in configuration file /etc/dovecot/deny.imap line 1: Expecting '='
Sep 9 08:02:24 mail1 dovecot: log: Error: service(auth): child 3630 returned error 89 (Fatal failure)
Sep 9 08:02:24 mail1 dovecot: master: Error: service(auth): command startup failed, throttling

==> mail.warn <==
Sep 9 08:02:24 mail1 dovecot: auth: Error: Error in configuration file /etc/dovecot/deny.imap line 1: Expecting '='
Sep 9 08:02:24 mail1 dovecot: log: Error: service(auth): child 3630 returned error 89 (Fatal failure)
Sep 9 08:02:24 mail1 dovecot: master: Error: service(auth): command startup failed, throttling

==> syslog <==
Sep 9 08:02:24 mail1 dovecot: auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth
Sep 9 08:02:24 mail1 dovecot: auth: Debug: Module loaded: /usr/lib/dovecot/modules/auth/libauthdb_ldap.so
Sep 9 08:02:24 mail1 dovecot: auth: Error: Error in configuration file /etc/dovecot/deny.imap line 1: Expecting '='
Sep 9 08:02:24 mail1 dovecot: log: Error: service(auth): child 3630 returned error 89 (Fatal failure)
Sep 9 08:02:24 mail1 dovecot: master: Error: service(auth): command startup failed, throttling

Last edited by hesisaboury; 09-09-2013 at 07:07 AM.
 
Old 09-09-2013, 02:31 PM   #8
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
Originally Posted by hesisaboury View Post
changed to this :

passdb {
args = /etc/dovecot/deny.imap
deny = yes
driver = ldap
}

no success,

==> mail.err <==
Sep 9 08:02:24 mail1 dovecot: auth: Error: Error in configuration file /etc/dovecot/deny.imap line 1: Expecting '='
Of course not.
You are telling it to expect an ldap-conf file, but feeding it a list of usernames!
 
Old 09-10-2013, 01:04 AM   #9
hesisaboury
Member
 
Registered: Dec 2010
Location: iran
Posts: 199

Original Poster
Rep: Reputation: 0
Thank u descendant_command
Solved ....(^-^)

passdb {
args = /etc/dovecot/deny.imap
driver = passwd-file
deny = yes
}

passdb {
args = /etc/dovecot/dovecot-ldap.conf
driver = ldap
}
 
  


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
How can Block a user not to login using ssh jsaravana87 Linux - Server 1 12-03-2011 01:05 AM
mail server naughtyness; mail from:user@server rcpt to:user@server on exim bicpen Linux - Server 1 01-27-2011 11:53 AM
Block Outlook user to send mail jjena Linux - Newbie 3 06-23-2010 12:59 AM
Need to block certain mail user on Fedora 2 mcsmit Linux - Software 4 03-24-2006 02:51 AM
How to Block User Login minil Linux - Security 6 12-19-2005 09:00 AM

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

All times are GMT -5. The time now is 10:00 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