Re: Dovecot with Maildir

2016-02-02 Thread John Williams
WOE HOE!  Worked!
So I changed 
mail_location = maildir:/var/mail/%u/Maildirtomail_location = 
maildir:/var/mail/%n
and now it all works!
Thanks much!

  From: Steffen Kaiser 
 To: John Williams  
Cc: "dovecot@dovecot.org" 
 Sent: Tuesday, February 2, 2016 2:34 AM
 Subject: Re: Dovecot with Maildir
   
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 2 Feb 2016, John Williams wrote:

> Dovecot logs as follows:
> Feb  1 19:36:34 speedy dovecot: imap-login: Login: user=, 
> method=PLAIN, rip=10.163.195.83, lip=10.163.195.82, mpid=7481, 
> session=
> Feb  1 19:36:37 speedy dovecot: imap-login: Login: user=, 
> method=PLAIN, rip=10.163.195.83, lip=10.163.195.82, mpid=7483, 
> session=
> Feb  1 19:36:37 speedy dovecot: imap(rsmith): Disconnected: Logged out in=95 
> out=440Feb  1 19:37:24 speedy dovecot: imap(rsmith): Connection closed in=275 
> out=995
> Feb  1 19:37:27 speedy dovecot: imap-login: Login: user=, 
> method=PLAIN, rip=10.163.195.83, lip=10.163.195.82, mpid=7485, 
> session=
> Feb  1 19:37:28 speedy dovecot: imap(rsmith): Disconnected: Logged out in=298 
> out=1130

please increase logging, see mail_debug at 
http://wiki2.dovecot.org/Logging
That will reveal, what mail location and inbox is used really.

> The maildir on my instance is located in /var/log/mail.

/var/__log__/mail ??

> The output of doveadm is as follows:
> root@speedy:/var/mail# doveadm user -u jsmithuserdb: jsmith  
> system_groups_user: jsmith  uid       : 1000  gid       : 1000  home      : 
> /home/jsmith
> If that home variable is suppose to be the maildir folder it is wrong.

That looks good. About home vs. mail location see 
http://wiki2.dovecot.org/VirtualUsers/Home (applies to all users)
and http://wiki2.dovecot.org/MailLocation

> It should be /var/mail/jsmith.  If that is the problem, where or how do

Is /var/mail/jsmith a directory or a file?

If it is a directory, use something like:

mail_location = maildir:/var/mail/%n
- -or-
mail_location = maildir:/var/mail/%n/Maildir

depending on how the content of the directory looks like.

If it is a file, use

mail_location = maildir:~/Maildir:INBOX=/var/mail/%n

===

How does the userdb section of doveconf -n looks like?

- -- 
Steffen Kaiser
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEVAwUBVrBb/Xz1H7kL/d9rAQJ3ewf9Hif5QHRuwTacc9vPEcRleE++OUpe9V21
nftpqOgDW0a+NX6FRXRABg/lBAP0fUzRN3RKgFmdBLL6N1ZCMyLYKPgyr+8Lcs39
oDJejNSZ+HSjGRIxzH4zbf2G8PDlxjpT02jybJKvmegKIMaPxV9Q4knYj5Zo2IQB
lRgL4j+2WnP1P7gKuvvjoX/TbVh7v9cREULDM5krXXkZJ+TtsTMT8v5uYAAbxWGl
gdfqVYOF+dLuHrGCe1KdVxvn1vDKuotSpKLFsgr4WluavOQwJx0Ws3/NaKvfj66d
7Xzkg2zR1VnQH9QsnsBeqWzHcm1hwJTlxLmdBwxF8KL/jdF8M1YLfw==
=sEW+
-END PGP SIGNATURE-





Re: Dovecot with Maildir

2016-02-01 Thread John Williams
Dovecot logs as follows:
Feb  1 19:36:34 speedy dovecot: imap-login: Login: user=, method=PLAIN, 
rip=10.163.195.83, lip=10.163.195.82, mpid=7481, session=Feb  
1 19:36:37 speedy dovecot: imap-login: Login: user=, method=PLAIN, 
rip=10.163.195.83, lip=10.163.195.82, mpid=7483, session=Feb  
1 19:36:37 speedy dovecot: imap(rsmith): Disconnected: Logged out in=95 
out=440Feb  1 19:37:24 speedy dovecot: imap(rsmith): Connection closed in=275 
out=995Feb  1 19:37:27 speedy dovecot: imap-login: Login: user=, 
method=PLAIN, rip=10.163.195.83, lip=10.163.195.82, mpid=7485, 
session=Feb  1 19:37:28 speedy dovecot: imap(rsmith): 
Disconnected: Logged out in=298 out=1130Feb  1 19:37:28 speedy dovecot: 
imap-login: Login: user=, method=PLAIN, rip=10.163.195.83, 
lip=10.163.195.82, mpid=7487, session=Feb  1 19:37:30 speedy 
dovecot: imap-login: Login: user=, method=PLAIN, rip=10.163.195.83, 
lip=10.163.195.82, mpid=7489, session=<5h3qtL4qTACto8NT>Feb  1 19:37:31 speedy 
dovecot: imap(rsmith): Disconnected: Logged out in=95 out=440
The maildir on my instance is located in /var/log/mail.
 The output of doveadm is as follows:
root@speedy:/var/mail# doveadm user -u jsmithuserdb: jsmith  
system_groups_user: jsmith  uid       : 1000  gid       : 1000  home      : 
/home/jsmith
If that home variable is suppose to be the maildir folder it is wrong.  It 
should be /var/mail/jsmith.  If that is the problem, where or how do I change 
it.
Thanks in advance!!
  From: Steffen Kaiser 
 To: John Williams  
Cc: "dovecot@dovecot.org" 
 Sent: Monday, February 1, 2016 3:43 AM
 Subject: Re: Dovecot with Maildir
   
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sat, 30 Jan 2016, John Williams wrote:

> I believe (not sure actually) the answer is in the mail_location variable for 
> Dovecot.  This is what I've tried so far:

> #mail_location = mbox:~/mail:INBOX=/var/mail/%u#mail_location = 
> maildir:/var/mail/%u/Maildir#mail_location = 
> maildir:~/Maildir:INDEX=/var/mail/%umail_location = 
> maildir:/var/mail/%u/Maildir

What does Dovecot log?Where are your Maildir directories located?
What does doveadm user -u username
print?

- -- 
Steffen Kaiser
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEVAwUBVq8alHz1H7kL/d9rAQIRYwgAtapJ2Br/zhYHrmze2k59G9wul8lT43Ga
oUdsRb2JYEXeR51z5iHTIZKHUN2+l79g0qouvXJmNarTEUnXetavyss91cDzYw8n
cGpzpb4M75BCLgVpPKiExnlPG5y7fFEHiOAMa2bwRsMlDEgtpbUQTBx+d9MuxniB
QzXMJuSuwm0UN8OEO4Ct4jsNCtkt7bRPVGej0yj0aRZFFOPcvzLH9Bi6sWjNtfcx
PU8UMlP4byyf7yBptcZ8FTnAZA4lcZdy8fnxrN91cHtqgSBbP1hfGORQcYcNS2Qu
pZgU2SYugArDoxU5X+LxCCFugk0/KYPcWS1sH3S8svKTTEvjddg4Kw==
=E6ey
-END PGP SIGNATURE-




Dovecot with Maildir

2016-01-30 Thread John Williams
Folks,
I'm trying to get dovecot to check a for mail in a maildir format on Ubuntu.  
Mail is being delivered to and from the system.  I can send and receive mail 
using Pine & Mutt.  But I cannot seem to get dovecot to work with the maildir.  
So I can't check for mail using Dovecot.

This is what I'm using for reference:
https://help.ubuntu.com/community/Dovecot

I believe (not sure actually) the answer is in the mail_location variable for 
Dovecot.  This is what I've tried so far:
#mail_location = mbox:~/mail:INBOX=/var/mail/%u#mail_location = 
maildir:/var/mail/%u/Maildir#mail_location = 
maildir:~/Maildir:INDEX=/var/mail/%umail_location = maildir:/var/mail/%u/Maildir
Mail is being delivered and I can send mail out with Postfix.  But Dovecot not 
working.
Any idea why?
Thanks in advance!


Re: [Dovecot] How to troubleshoot LDA or LMTP?

2013-08-09 Thread John Williams
Sam Flint  writes:

> Gnus supports IMAP natively, and even ManageSieve.  Use that, don't
> run a proxy, it's a lot easier.
I know.  I'm using dovecot because I'm getting mail from an extremely
slow connection, so Gnus blocks the Emacs UI for several seconds, making
Emacs unusable.  Using a local server eliminates that problem.


> On Thu, Aug 8, 2013 at 4:19 AM, Steffen Kaiser
>  wrote:
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> On Thu, 8 Aug 2013, John Williams wrote:
>>
>>>> in order to not filter the same message twice or re-filter messages,
>>>> you've moved around manually?
>>>
>>> That is not a problem.  The filtering process works perfectly when I
>>> manually invoke dovecot-lda.  My problem is that I have followed the
>>> instructions here:
>>>
>>> http://wiki2.dovecot.org/LDA/
>>>
>>> and here:
>>>
>>> http://wiki2.dovecot.org/LDA/Sendmail
>>>
>>> and here:
>>>
>>> http://wiki2.dovecot.org/LMTP
>>>
>>> but neither dovecot-lda nor LMTP seem to be triggered whenever I send
>>> email from my MUA (Gnus).  At least, I *think* I have followed the
>>> instructions correctly.  Would you like me to post my dovecot config
>>> again, and the relevant portion of sendmail.cf?
>>>
>>> Thank you very much for your help, I truly appreciate it.
>>
>>
>> As Stan already pointed out: a local delivery takes place only, when the
>> mail arrives via a MTA. offlineimap synchronizes two IMAP folders, there is
>> no local delivery at your side at all. Hence, neither LDA nor LMTP is
>> invoked.
>>
>> So I see two ways:
>>
>> 1) keep offlineimap to resync your local store back to the server and keep
>> both in-sync.
>>
>> Then you can:
>> 1a) run offlineimap to get new messages from the upstream server and sync
>> current local messages.
>> 1b) remove the new ones from the local store and feed them _manually_ to the
>> LDA or LMTP. Now the filtering takes place and they are re-added to the mail
>> storage.
>> 1c) maybe: re-run the process until no new messages got downloaded, in order
>> to keep the server in-sync
>>
>> 2) no need for server messages in-sync with local message store
>>
>> 2a) setup a local MTA that accepts your domain and drops messages via
>> Dovecot LDA or LMTP. Then get the new messages via fetchmail on a regular
>> basis and hand the messages over to the local MTA.
>>
>> 2b) use fetchmail in combination with Dovecot LDA/LMTP. No local MTA
>> necessary.
>>
>> fetchmail will see only messages in INBOX as far as I know. So no filtering
>> on the server must take place.
>>
>>
>> - -- Steffen Kaiser
>> -BEGIN PGP SIGNATURE-
>> Version: GnuPG v1.4.11 (GNU/Linux)
>>
>> iQEVAwUBUgNiqV3r2wJMiz2NAQISSAgAnSWnyf4kzNrbEd/+UcZGvmeegCWp4QY3
>> TWAIh8V8vbo+FyKyYomvRLt1mmq5CKJNwOUdz+A3u5R6XT25JZKxA5yYhUKlLNEU
>> n05zIsmWvKV6DWahdTv7GL84kmyETqp7zYo5pBWRf9SqwGFH8+KcBGh1U3MTaKhQ
>> QfzIj3eYk7a1DQld7u3ZaLSiKCBadWCakgNscY2mX+gzoN4EXt+X1zMO52uaZpJ3
>> QkJyd2AHrnpYgBbmr2maneYox3+67IyQChnzZ0t2c9uPodT4ukEkZFYjrucEGlfv
>> JEUaOaVnuzx/Wi7gxSUL/agSiaksLaEkT/KMWS6wQMSI0NxUaGIHjQ==
>> =f/Uy
>> -END PGP SIGNATURE-

-- 
Lecturer
Department of Marketing
University of Otago
Dunedin, New Zealand



Re: [Dovecot] How to troubleshoot LDA or LMTP?

2013-08-07 Thread John Williams
Steffen Kaiser  writes:

> On Tue, 6 Aug 2013, John Williams wrote:
>
>>> dovecot-lda -c config-file -d user < mailfile
>> Aha!  Piping a message to the process was the step I was not aware of.
>
> does offlineimap provides logs to get to know what mails are newly 
> arriving to your local mail storage,
Yes.

> in order to not filter the same message twice or re-filter messages,
> you've moved around manually?
That is not a problem.  The filtering process works perfectly when I
manually invoke dovecot-lda.  My problem is that I have followed the
instructions here:

http://wiki2.dovecot.org/LDA/

and here:

http://wiki2.dovecot.org/LDA/Sendmail

and here:

http://wiki2.dovecot.org/LMTP

but neither dovecot-lda nor LMTP seem to be triggered whenever I send
email from my MUA (Gnus).  At least, I *think* I have followed the
instructions correctly.  Would you like me to post my dovecot config
again, and the relevant portion of sendmail.cf?

Thank you very much for your help, I truly appreciate it.



Re: [Dovecot] How to troubleshoot LDA or LMTP?

2013-08-05 Thread John Williams
Joseph Tam  writes:

> John Williams writes:
>
>> *What doesn't work*  I thought the next step would be to execute
>> dovecot-lda manually (as is suggested on the wiki and in numerous
>> newsgroup posts), but I can't figure out how to do this. When I execute
>> it as root and provide my non-root username via the -u option, it
>> hangs.  I can see that it spawns a child process that executes as the
>> non-root user (specified with the -u option).  So, could someone tell
>> how to execute dovecot-lda manually please?
>
> Maybe use "-d"?
D'oh!  I meant -d.  *hangs head in shame*
>
> I had no trouble invoking
>
>   dovecot-lda -c config-file -d user < mailfile
Aha!  Piping a message to the process was the step I was not aware of.
Thanks Joseph!




[Dovecot] How to troubleshoot LDA or LMTP?

2013-08-05 Thread John Williams

Please forgive me if these are silly questions.  I am a normal user, not
a system administrator.  I am using Dovecot as a kind of IMAP caching
proxy, i.e. reading IMAP mail via Gnus + Dovecot + Offlineimap.  I am
trying to enable sieve functionality.

*Desired behaviour* When Gnus (or whatever MUA) asks for new mail from
 Dovecot, that before Dovecot returns and answer, the sieve rules are
 executed. Please tell me if I completely misunderstand how the mail
 system works in this instance.

*Actual behaviour*  As far as I can tell, not only are the sieve rules
 not executed, but also neither LDA or LMTP is invoked.

*What works* Running the scripts manually via `sieve-filter` works
 fine.  The next time I read from my local dovecot server the mail is
 all in the desired place.

 Also, the LMTP service is running, listening on port 24.

*What doesn't work*  I thought the next step would be to execute
 dovecot-lda manually (as is suggested on the wiki and in numerous
 newsgroup posts), but I can't figure out how to do this. When I execute
 it as root and provide my non-root username via the -u option, it
 hangs.  I can see that it spawns a child process that executes as the
 non-root user (specified with the -u option).  So, could someone tell
 how to execute dovecot-lda manually please?

 Also, when does LMTP process messages?  When sending mail via SMTP, or
 when reading mail via IMAP?  I would prefer to use LMTP rather than
 LDA.


*My environment* Fedora 19 & sendmail.  Is any other information
 relevant, apart from the dovecot configuration?

Thank you,

John

.2.4: /etc/dovecot/dovecot.conf
# OS: Linux 3.10.4-300.fc19.x86_64 x86_64 Fedora release 19 (Schrödinger’s Cat) 
auth_socket_path = /var/run/dovecot/auth-userdb
debug_log_path = /var/log/dovecot-debug.log
disable_plaintext_auth = no
hostname = falcon.novoalexandrovsk.ru
info_log_path = /var/log/dovecot-info.log
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
login_greeting = Dovecot ready, folks!
mail_access_groups = mail
mail_debug = yes
mail_location = 
mbox:~/mail/mailboxes:DIRNAME=mBoX-MeSsAgEs:INDEX=~/mail/index:CONTROL=~/mail/control:INBOX=/var/spool/mail/%u
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
mbox_write_locks = fcntl
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
  sieve_global_dir = /var/lib/dovecot/sieve/global/
  sieve_global_path = /var/lib/dovecot/sieve/default.sieve
}
postmaster_address = johnfrombl...@gmail.com
protocols = imap lmtp sieve
service auth {
  unix_listener auth-userdb {
mode = 0600
user = mail
  }
}
service lmtp {
  executable = lmtp -L
  inet_listener lmtp {
address = 192.168.0.101 127.0.0.1 ::1
port = 24
  }
  user = mail
}
service managesieve-login {
  inet_listener sieve {
port = 4190
  }
  process_min_avail = 1
  service_count = 1
  vsz_limit = 64 M
}
service managesieve {
  process_limit = 10
}
ssl = required
ssl_cert =