Re: Sieve login issue. Please help.

2016-09-22 Thread Müfit Eribol via Info-cyrus



On 22.09.2016 11:38, Michael Menge via Info-cyrus wrote:

Hi,


Quoting Müfit Eribol via Info-cyrus :


Hello,

I am a happy user of cyrus-imapd for years without any major problem 
for  small user base.


Currently, I am having login problem for sieve. I have been trying to 
find the problem for days.


Please find below information about my configuration:

1. Installed software: cyrus-imapd-2.4.17, postfix-2.10.1, 
cyrus-sasl-2.1.26, cyrus-sasl-plain-2.1.26, cyrus-sasl-lib-2.1.26 on 
CentOS 7.


2. Authentication is done through saslauthd, pam and mysql.

3. pwcheck_method: saslauthd, mech_list: plain login

4. There is no problem with login to imapd or smtpd.

5. cyrus.conf

SERVICES {
imaplocal cmd="imapd -C /etc/imapd-local.conf" 
listen="127.0.0.1:imap" prefork=0

  imaps cmd="imapd -s" listen="imaps" prefork=1
imapslocalcmd="imapd -C /etc/imapd-local.conf" 
listen="127.0.0.1:imaps" prefork=0

  sieve cmd="timsieved" listen="sieve" prefork=0


You did not define an ip address here, so sieve will use 0.0.0.0:sieve

sievelocal  cmd="timsieved -C /etc/imapd-local.conf" 
listen="127.0.0.1:sieve" prefork=0


this will likely fail, as the "sieve" service above will is already 
listening on 0.0.0.0

and blocking 127.0.0.1


  lmtpunix  cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1
}

6. imapd.conf

postmaster: postmaster
configdirectory: /var/lib/imap
partition-default: /var/spool/imap
#admins: cyrus
allowanonymouslogin: no
allowplaintext: no
#tls_require_cert: 1
sasl_minimum_layer: 128
servername: mail.x.com
autocreatequota: 20
maxmessagesize: 0
reject8bit: 0
munge8bit: 0
quotawarn: 90
timeout: 30
poptimeout: 10
dracinterval: 0
drachost: localhost
sasl_pwcheck_method: saslauthd
sasl_mech_list: PLAIN
sievedir: /var/lib/imap/sieve
sieve_maxscriptsize: 32
sieve_maxscripts: 5
sieve_allowplaintext: 1
sendmail: /usr/sbin/sendmail
tls_cert_file: /etc/pki/tls/certs/imap.pem
tls_key_file: /etc/pki/tls/certs/imap.pem
tls_ca_file: /etc/pki/tls/certs/imap.pem

7. imapd-local.conf

postmaster: postmaster
configdirectory: /var/lib/imap
partition-default: /var/spool/imap
admins: cyrus
allowanonymouslogin: no
allowplaintext: yes
servername: mail.xx.com
autocreatequota: 100
maxmessagesize: 0
reject8bit: no
quotawarn: 90
timeout: 30
poptimeout: 10
dracinterval: 0
drachost: localhost
sasl_pwcheck_method: saslauthd
sasl_mech_list: PLAIN
sievedir: /var/lib/imap/sieve
sieve_maxscriptsize: 32
sieve_maxscripts: 5
sendmail: /usr/sbin/sendmail

8. shell:

[root@server ~]#  sieveshell -u user1 -a user1 localhost
connecting to localhost
unable to connect to server at /usr/bin/sieveshell line 170.

maillog:

Sep 22 10:34:45 server sieve[15050]: Lost connection to client -- 
exiting


9. shell:

[root@server ~]# telnet localhost sieve
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
"IMPLEMENTATION" "Cyrus timsieved v2.4.17-Fedora-RPM-2.4.17-8.el7_1"
"SASL" ""
"SIEVE" "comparator-i;ascii-numeric fileinto reject vacation 
imapflags notify envelope relational regex subaddress copy"

"STARTTLS"
"UNAUTHENTICATE"
OK

10. When I try to login using smartsieve

maillog:

Sep 22 10:38:32 server sieve[16029]: STARTTLS failed: 
localhost[127.0.0.1]




you are not connecting to sievelocal but to sieve and therefore 
"allowplaintext: no" from
imapd.conf is preventing auth:login and auth:plain from showing 
without usage of startls


I don't understand why STARTTLS is being called when connecting from 
localhost? Is it normal? Obviously, I am doing something wrong.





I would appreciate any help. Thank you.



Cheers,

   Michael

 


M.MengeTel.: (49) 7071/29-70316
Universität Tübingen   Fax.: (49) 7071/29-5912
Zentrum für Datenverarbeitung  mail: 
michael.me...@zdv.uni-tuebingen.de

Wächterstraße 76
72074 Tübingen


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Spot on. Thank you Michael. After defining the IP, it works perfectly.

Regards


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Sieve login issue. Please help.

2016-09-22 Thread Michael Menge via Info-cyrus

Hi,


Quoting Müfit Eribol via Info-cyrus :


Hello,

I am a happy user of cyrus-imapd for years without any major problem  
for  small user base.


Currently, I am having login problem for sieve. I have been trying  
to find the problem for days.


Please find below information about my configuration:

1. Installed software: cyrus-imapd-2.4.17, postfix-2.10.1,  
cyrus-sasl-2.1.26, cyrus-sasl-plain-2.1.26, cyrus-sasl-lib-2.1.26 on  
CentOS 7.


2. Authentication is done through saslauthd, pam and mysql.

3. pwcheck_method: saslauthd, mech_list: plain login

4. There is no problem with login to imapd or smtpd.

5. cyrus.conf

SERVICES {
imaplocal cmd="imapd -C /etc/imapd-local.conf"  
listen="127.0.0.1:imap" prefork=0

  imaps cmd="imapd -s" listen="imaps" prefork=1
imapslocalcmd="imapd -C /etc/imapd-local.conf"  
listen="127.0.0.1:imaps" prefork=0

  sieve cmd="timsieved" listen="sieve" prefork=0


You did not define an ip address here, so sieve will use 0.0.0.0:sieve

sievelocal  cmd="timsieved -C /etc/imapd-local.conf"  
listen="127.0.0.1:sieve" prefork=0


this will likely fail, as the "sieve" service above will is already  
listening on 0.0.0.0

and blocking 127.0.0.1


  lmtpunix  cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1
}

6. imapd.conf

postmaster: postmaster
configdirectory: /var/lib/imap
partition-default: /var/spool/imap
#admins: cyrus
allowanonymouslogin: no
allowplaintext: no
#tls_require_cert: 1
sasl_minimum_layer: 128
servername: mail.x.com
autocreatequota: 20
maxmessagesize: 0
reject8bit: 0
munge8bit: 0
quotawarn: 90
timeout: 30
poptimeout: 10
dracinterval: 0
drachost: localhost
sasl_pwcheck_method: saslauthd
sasl_mech_list: PLAIN
sievedir: /var/lib/imap/sieve
sieve_maxscriptsize: 32
sieve_maxscripts: 5
sieve_allowplaintext: 1
sendmail: /usr/sbin/sendmail
tls_cert_file: /etc/pki/tls/certs/imap.pem
tls_key_file: /etc/pki/tls/certs/imap.pem
tls_ca_file: /etc/pki/tls/certs/imap.pem

7. imapd-local.conf

postmaster: postmaster
configdirectory: /var/lib/imap
partition-default: /var/spool/imap
admins: cyrus
allowanonymouslogin: no
allowplaintext: yes
servername: mail.xx.com
autocreatequota: 100
maxmessagesize: 0
reject8bit: no
quotawarn: 90
timeout: 30
poptimeout: 10
dracinterval: 0
drachost: localhost
sasl_pwcheck_method: saslauthd
sasl_mech_list: PLAIN
sievedir: /var/lib/imap/sieve
sieve_maxscriptsize: 32
sieve_maxscripts: 5
sendmail: /usr/sbin/sendmail

8. shell:

[root@server ~]#  sieveshell -u user1 -a user1 localhost
connecting to localhost
unable to connect to server at /usr/bin/sieveshell line 170.

maillog:

Sep 22 10:34:45 server sieve[15050]: Lost connection to client -- exiting

9. shell:

[root@server ~]# telnet localhost sieve
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
"IMPLEMENTATION" "Cyrus timsieved v2.4.17-Fedora-RPM-2.4.17-8.el7_1"
"SASL" ""
"SIEVE" "comparator-i;ascii-numeric fileinto reject vacation  
imapflags notify envelope relational regex subaddress copy"

"STARTTLS"
"UNAUTHENTICATE"
OK

10. When I try to login using smartsieve

maillog:

Sep 22 10:38:32 server sieve[16029]: STARTTLS failed: localhost[127.0.0.1]



you are not connecting to sievelocal but to sieve and therefore  
"allowplaintext: no" from
imapd.conf is preventing auth:login and auth:plain from showing  
without usage of startls


I don't understand why STARTTLS is being called when connecting from  
localhost? Is it normal? Obviously, I am doing something wrong.





I would appreciate any help. Thank you.



Cheers,

   Michael


M.MengeTel.: (49) 7071/29-70316
Universität Tübingen   Fax.: (49) 7071/29-5912
Zentrum für Datenverarbeitung  mail:  
michael.me...@zdv.uni-tuebingen.de

Wächterstraße 76
72074 Tübingen


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus