Re: store into mailbox 'Junk' aborted

2017-08-23 Thread Kenneth Topp


On August 22, 2017 9:37:05 AM EDT, Steffen Kaiser 
 wrote:
>On Tue, 22 Aug 2017, kenneth topp wrote:
>
>>>> Aug 21 19:43:59 lmtp(toppk): Debug: $MAILDIR/Junk: Mailbox opened
>>>> because:
>>>> lib-lda delivery
>
>>>> sieve: info: started log at Aug 21 19:43:59.
>>>> error: msgid=: failed to store into
>>>> mailbox '$MAILDIR/Junk': Mailbox doesn't exist: $MAILDIR/Junk.
>
>>> What is $MAILDIR and where do you use it?
>
>> $MAILDIR is /home/toppk/mail (for clarity, it was printing $MAILDIR)
>
>> Another thing I need to be clear on.  This sieve moves are working
>99% of
>> the time, just once in a while it fails.
>
>Are you sure?


Yes, I'm sure.


>
>> if header :matches "Subject" "*junktest*" {
>>fileinto "Junk";
>
>^^ No $MAILDIR
>> }
>>
>> #if header :matches "Subject" ["*money*","*Viagra*","Cialis"] {
>> #fileinto "Junk";
>
>^^ Neither
>
>> #}
>>
>> if header :contains "X-Spam-Flag" "YES" {
>>fileinto "Junk";
>
>^^ No $MAILDIR
>
>> }
>>
>>
>> if header :comparator "i;octet" :contains "X-Spam-Flag" "YES" {
>>fileinto "$MAILDIR/Junk";
>
>^^ Why here?? copy the fileinto of the other rules.

I've removed the duplicate rules and that seems to have sorted out the issue.  
Although it doesn't explain why the issue was only happening sporadically, I'll 
consider this solved.

Thanks for the help.

>
>> }
>
>-- 
>Steffen Kaiser

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


Re: LMTP and Postfix

2017-08-22 Thread kenneth topp
> I am setting up a new system that will be using Dovecot with Postifx. I am
> planning on using LMTP. I read the wiki and and found the
> settings I need to make in Dovecot and the Postfix main.cf file. However,
> I
> saw nothing about the Postfix master.cf file. Do I need to make and
> changes to
> it also?
>
> Thanks
>
> --
> Jerry
>


There are several ways of telling postfix to use lmtp to deliver to dovecot.
 I went with a method that was setting just the *_transport variable in
main.cf to a unix pipe, so I didn't need to setup a service in master.cf.

Here are two methods (for mailbox, not virtual mailbox), that show that
depending on what you put in main.cf, you may or may not need to update
master.cf

===
method 1
===
main.cf
-
mailbox_transport=dovecot
dovecot_destination_recipient_limit=1
-
master.cf
-
dovecot   unix  –   n   n   –   –   pipe
flags=DRhu user=mail:mail argv=/usr/lib/dovecot/dovecot-lda -f ${sender}
-d ${recipient}
-

===
method 2
===
main.cf
-
mailbox_transport = lmtp:unix:private/dovecot-lmtp
-


HTH,

Ken


Re: store into mailbox 'Junk' aborted

2017-08-22 Thread kenneth topp
>
>
> Am 22. August 2017 02:29:30 MESZ schrieb kenneth topp :
>>Hi,
>>
>>I've just switch from procmail to pigeonhole, and I'm seeing an issue
>>(twice in six hours).
>>
>>I have spamassisn running via postfix milter, and dropping off via
>>main.cf
>>"mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp"
>>
>>The issue is that I get a sequence of these log messages:
>>
>>
>>Aug 21 19:43:59 lmtp(toppk): Debug: Junk: Mailbox opened because:
>>lib-lda
>>delivery
>>Aug 21 19:43:59 lmtp(toppk): Debug: $MAILDIR/Junk: Mailbox opened
>>because:
>>lib-lda delivery
>>Aug 21 19:43:59 lmtp(toppk): Debug: Mailbox : Opened mail
>>UID=1
>>because: copying
>>Aug 21 19:43:59 lmtp(toppk): Debug: Mailbox : Opened mail
>>UID=1
>>because: virtual size (Cache file is unusable)
>>Aug 21 19:43:59 lmtp(toppk): Info: YK1SNj9wm1kMaQAAjC58EQ: sieve:
>>msgid=: store into mailbox 'Junk'
>>aborted
>>Aug 21 19:43:59 lmtp(toppk): Debug: INBOX: Mailbox opened because:
>>lib-lda
>>delivery
>>Aug 21 19:43:59 lmtp(toppk): Debug: Mailbox : Opened mail
>>UID=1
>>because: copying
>>Aug 21 19:43:59 lmtp(toppk): Info: YK1SNj9wm1kMaQAAjC58EQ: sieve:
>>msgid=: stored mail into mailbox
>>'INBOX'
>>Aug 21 19:43:59 lmtp(toppk): Info: YK1SNj9wm1kMaQAAjC58EQ: sieve:
>>Execution of script /home/toppk/.dovecot.sieve failed, but implicit
>>keep
>>was successful (user logfile /home/toppk/.dovecot.sieve.log may reveal
>>additional details)
>>
>>and in /home/toppk/.dovecot.sieve.log I get this:
>>
>>sieve: info: started log at Aug 21 19:43:59.
>>error: msgid=: failed to store into
>>mailbox '$MAILDIR/Junk': Mailbox doesn't exist: $MAILDIR/Junk.
> What is $MAILDIR and where do you use it?
> The error message says that the path can't be found.
> I suspect the problem is in your sieve script. You probably have to use
> the full path in there.
> Oil
> Please show the contents of your sieve script.

$MAILDIR is /home/toppk/mail (for clarity, it was printing $MAILDIR)

Another thing I need to be clear on.  This sieve moves are working 99% of
the time, just once in a while it fails.

here is my /home/toppk/.dovecot.sieve.  I notice that I have confusing
(overlapping) rules.  Could that be the issue?

Thanks for any response,

Ken



# Sieve Filter

require ["fileinto","regex","envelope","vacation","reject"];

if header :matches "Subject" "*rejecttest*" {
reject "rejecttest";
discard;
stop;
}

if header :matches "List-Id" "Dovecot Mailing List " {
fileinto "lists/dovecot";
}
if header :matches "Subject" "*junktest*" {
fileinto "Junk";
}

#if header :matches "Subject" ["*money*","*Viagra*","Cialis"] {
#fileinto "Junk";
#}

if header :contains "X-Spam-Flag" "YES" {
fileinto "Junk";
}


if header :comparator "i;octet" :contains "X-Spam-Flag" "YES" {
fileinto "$MAILDIR/Junk";
}



>
>>So instead of the email going into mbox /home/toppk/mail/Junk it goes
>>into
>>INBOX (/var/mail/toppk).
>>
>>I'm watching the Junk to see if is removed for even a split second and
>>I
>>don't see that.   I'm not sure how to further track this down, or if
>>there
>>is a more optimal configuration (i'd prefer to stay mbox if possible).
>>
>>I was thinking of turning on mailbox_list_index.
>>
>>Below is the full doveadm -n output.
>>
>>Any guidance or suggestions welcome.
>>
>>Ken
>>
>>
>># 2.2.31 (65cde28): /etc/dovecot/dovecot.conf
>># Pigeonhole version 0.4.19 (e5c7051)
>># OS: Linux 4.12.4-300.fc26.x86_64 x86_64 Fedora release 26 (Twenty
>>Six)
>>auth_debug = yes
>>auth_username_format = %Ln
>>log_path = /var/log/dovecot.log
>>mail_debug = 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 index
>>ihave
>>duplicate mime foreverypart extracttext
>>mbox_write_locks = fcntl
>>namespace inbox {
>>  inbox = yes
>>  location =
>>  mailbox Drafts {
>>special_use = \Drafts
>>  }
>>  mailbox Junk {
>>special_use =

store into mailbox 'Junk' aborted

2017-08-21 Thread kenneth topp
Hi,

I've just switch from procmail to pigeonhole, and I'm seeing an issue
(twice in six hours).

I have spamassisn running via postfix milter, and dropping off via main.cf
"mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp"

The issue is that I get a sequence of these log messages:


Aug 21 19:43:59 lmtp(toppk): Debug: Junk: Mailbox opened because: lib-lda
delivery
Aug 21 19:43:59 lmtp(toppk): Debug: $MAILDIR/Junk: Mailbox opened because:
lib-lda delivery
Aug 21 19:43:59 lmtp(toppk): Debug: Mailbox : Opened mail UID=1
because: copying
Aug 21 19:43:59 lmtp(toppk): Debug: Mailbox : Opened mail UID=1
because: virtual size (Cache file is unusable)
Aug 21 19:43:59 lmtp(toppk): Info: YK1SNj9wm1kMaQAAjC58EQ: sieve:
msgid=: store into mailbox 'Junk' aborted
Aug 21 19:43:59 lmtp(toppk): Debug: INBOX: Mailbox opened because: lib-lda
delivery
Aug 21 19:43:59 lmtp(toppk): Debug: Mailbox : Opened mail UID=1
because: copying
Aug 21 19:43:59 lmtp(toppk): Info: YK1SNj9wm1kMaQAAjC58EQ: sieve:
msgid=: stored mail into mailbox 'INBOX'
Aug 21 19:43:59 lmtp(toppk): Info: YK1SNj9wm1kMaQAAjC58EQ: sieve:
Execution of script /home/toppk/.dovecot.sieve failed, but implicit keep
was successful (user logfile /home/toppk/.dovecot.sieve.log may reveal
additional details)

and in /home/toppk/.dovecot.sieve.log I get this:

sieve: info: started log at Aug 21 19:43:59.
error: msgid=: failed to store into
mailbox '$MAILDIR/Junk': Mailbox doesn't exist: $MAILDIR/Junk.


So instead of the email going into mbox /home/toppk/mail/Junk it goes into
INBOX (/var/mail/toppk).

I'm watching the Junk to see if is removed for even a split second and I
don't see that.   I'm not sure how to further track this down, or if there
is a more optimal configuration (i'd prefer to stay mbox if possible).

I was thinking of turning on mailbox_list_index.

Below is the full doveadm -n output.

Any guidance or suggestions welcome.

Ken


# 2.2.31 (65cde28): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.19 (e5c7051)
# OS: Linux 4.12.4-300.fc26.x86_64 x86_64 Fedora release 26 (Twenty Six)
auth_debug = yes
auth_username_format = %Ln
log_path = /var/log/dovecot.log
mail_debug = 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 index ihave
duplicate mime foreverypart extracttext
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 = file:~/sieve;active=~/.dovecot.sieve
  sieve_default = /etc/dovecot/sieve/default.sieve
}
protocols = imap lmtp sieve
service auth {
  unix_listener auth-client {
group = postfix
mode = 0660
user = postfix
  }
  unix_listener auth-master {
group = mail
mode = 0660
user = mail
  }
  user = root
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
  }
}
service managesieve-login {
  inet_listener sieve {
port = 4190
  }
}
service managesieve {
  process_limit = 1024
}
ssl = required
ssl_cert =