Hi guys,

Thanks for your help so far. I have been able to get quite far with my SOGo 
installation. I have now reached the point where I’d like to get Sieve 
functionality going (filing certain messages automatically to a specific folder 
and vacation messages) and I need a bit of guidance.

Here is my setup:

I’m using Samba4 as an Active Directory domain controller for the domain 
RHYTHMIC.LAN. Users now simply login with their first name into the SOGo web 
interface. These users are able to check email from the domain RHYTHMIC.CA.

I don’t want to use Active Directory for the .CA domain so I created a .LAN 
just for authentication, however I want to send email through SOGo’s web UI 
(email is hosted at an external hosting company).

I’m not using OpenChange and for email I have Postfix and Dovecot. Everything 
is working just fine except I can’t get Sieve going. The error I get in the 
mail.log is:

team dovecot: managesieve-login: Disconnected (auth failed, 2 attempts in 12 
secs): user=<myu...@rhythmic.ca>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, 
secured, session=<wcJ6eB4xAgB/AAAB>

So I found a perl script that would generate authentication code for me to 
attempt a telnet login to managesieve.

Here is the first attempt:

root@linux:~# ./sieve-auth-command.pl myu...@rhythmic.ca MySup3rStr0ngPassw0rd
AUTHENTICATE "PLAIN" “YGF68W1vaXR3ZPJrCy5jKWF="

Ok got it. Now to test it.

root@linux:~# telnet localhost 4190
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
"IMPLEMENTATION" "Dovecot (Ubuntu) Pigeonhole"
"SIEVE" "fileinto reject envelope encoded-character vacation subaddress 
comparator-i;ascii-numeric relational regex imap4flags copy include variables 
body enotify environment mailbox date ihave"
"NOTIFY" "mailto"
"SASL" "PLAIN LOGIN"
"VERSION" "1.0"
OK "Dovecot (Ubuntu) ready."
AUTHENTICATE "PLAIN" "YGF68W1vaXR3ZPJrCy5jKWF="
NO "Authentication failed."
^]
telnet> 


I kind of expected that because I login to SOGo web interface with just the 
username not the full email address. So I tried the script with just the 
username part from usern...@rhythmic.ca. Here is the result:

root@linux:~# ./sieve-auth-command.pl myuser  MySup3rStr0ngPassw0rd
AUTHENTICATE "PLAIN" “MPS5LW9Armm9MRUzdHExLq7a”

Let’s try this one…

root@linux:~# telnet localhost 4190
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
"IMPLEMENTATION" "Dovecot (Ubuntu) Pigeonhole"
"SIEVE" "fileinto reject envelope encoded-character vacation subaddress 
comparator-i;ascii-numeric relational regex imap4flags copy include variables 
body enotify environment mailbox date ihave"
"NOTIFY" "mailto"
"SASL" "PLAIN LOGIN"
"VERSION" "1.0"
OK "Dovecot (Ubuntu) ready."
AUTHENTICATE "PLAIN" "MPS5LW9Armm9MRUzdHExLq7a"
OK "Logged in."
^]
telnet> 


Cool!

So my question is how can I make it so that I’m able to have SOGo (or whatever 
runs Sieve for SOGo) not to try and authenticate me with the full email address 
but rather just the username part from the email?

Here is the output of my dovecot configuration. Have I missed something?

root@linux:~# doveconf -n
# 2.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 4.2.0-27-generic x86_64 Ubuntu 14.04.4 LTS 
auth_mechanisms = plain login
disable_plaintext_auth = no
listen = *
mail_location = maildir:~/Maildir
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 ihave
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix = 
}
passdb {
  driver = pam
}
plugin {
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
protocols = imap pop3 lmtp imap lmtp sieve pop3
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0666
    user = postfix
  }
}
ssl = no
userdb {
  driver = passwd
}


Thanks guys!


-- 
users@sogo.nu
https://inverse.ca/sogo/lists

Reply via email to