2

I'm a begginer in IMAP.

When i do cyradm --user cyrus localhost, i get:

[root@SRD-GrupoG-Server lib]# cyradm --user cyrus localhost
IMAP Password: 
          Login failed: generic failure at     /usr/lib64/perl5/vendor_perl/Cyrus/IMAP/Admin.pm line 120.
cyradm: cannot authenticate to server with  as cyrus

I also did saslpasswd2 -c cyrus to set the password.

My /var/imapd.conf file

configdirectory: /var/lib/imap
defaultpartition: default
partition-default: /var/spool/imap
partition-news: /var/spool/news
newsspool: /var/spool/news
altnamespace: no
unixhierarchysep: no
lmtp_downcase_rcpt: yes
admins: cyrus
allowanonymouslogin: no
popminpoll: 1
autocreatequota: 0
umask: 077
sendmail: /usr/sbin/sendmail
sieveusehomedir: false
sievedir: /var/spool/sieve 
hashimapspool: true
allowplaintext: yes 
sasl_mech_list: PLAIN LOGIN CRAM-MD5 DIGEST-MD5
sasl_pwcheck_method: auxprop
sasl_auxprop_plugin: sasldb
sasl_auto_transition: no
tls_cert_file: /etc/ssl/certs/ssl-cert-snakeoil.pem
tls_key_file: /etc/ssl/private/ssl-cert-snakeoil.key
tls_ca_path: /etc/ssl/cert
tls_session_timeout: 1440
tls_cipher_list: TLSv1+HIGH:!aNULL:@STRENGTH
lmtpsocket: /var/run/cyrus/socket/lmtp
idlemethod: poll
idlesocket: /var/run/cyrus/socket/idle
notifysocket: /var/run/cyrus/socket/notify
syslog_prefix: cyrus
CatCos
  • 51
  • 1
  • 2
  • 6

2 Answers2

2

To authenticate cyrus, you need to have a sasl daemon too. Actually, the whole thing is far from trivial, and isn't very well documented.

First, you had to track your commands with

strace -s 200 -f your command -args

Please extend your question with the relevant data and I will be here to help more.

Second, please check the logs of your system, too. Next to that, in cases of professional system administration questions, the ServerFault SE can you help a lot as well.

P.s. (sorry for the offtopic, but in your place I used dovecot which have much fewer problems.)

Milkman
  • 131
  • 3
  • I got this in var/log/messages when i do the cyradm Dec 21 19:45:33 SRD-GrupoG-Server cyrus/imap[9057]: unable to open Berkeley db /etc/sasldb2: Permission denied – CatCos Dec 21 '14 at 19:46
  • @CatCos They you localized the problem: your sasl isn't properly configured. The main problem with it is that it is nearly undocumented. Try to download some sasl binary tool, and check this config! But I warn you, it won't be simple. – Milkman Dec 21 '14 at 19:52
  • THe only thing i did was install the package cyrus-sasl and change the imapd.conf file. This is for a collegue work. I didn't do nothing in sasldb2 – CatCos Dec 21 '14 at 19:55
  • Ok for some reason, this is working now. I only uninstall the cyrus-saslpackage and install again and it started to work ... – CatCos Dec 21 '14 at 20:00
-3

chgrp mail /etc/sasldb2 is enough

  • Welcome to Super User. This answer is not very self-explanatory. Could you perhaps edit this answer to provide detail to what this command should solve? Then, I will remove my downvote. – Joseph Jan 02 '19 at 19:52