Sieve 0.5.0/Dovecot 2.3.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Sieve 0.5.0/Dovecot 2.3.0

Larry Rosenman
Using 2.3.0/0.5 and the below scripts/config, why doesn’t a mail addressed to [hidden email] get the FreeBSD flag?
.dovecot.sieve points to master.sieve.
 
 
 
Scripts:
http://www.lerctr.org/~ler/sieve/
 
doveconf -n:
thebighonker.lerctr.org /home/ler/sieve $ doveconf -n
# 2.3.0 (c8b89eb): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.0 (d68c23a1)
# OS: FreeBSD 11.1-STABLE amd64
auth_mechanisms = plain login
auth_realms = lerctr.org thebighonker.lerctr.org tbh.lerctr.org thejonesonair.com thejonesonair.net
default_vsz_limit = 1 G
deliver_log_format = msgid=%m: %$ (subject=%s from=%f size=%w)
doveadm_password =  # hidden, use -P to show it
first_valid_gid = 0
first_valid_uid = 0
lda_mailbox_autocreate = yes
listen = 192.147.25.65, ::
lmtp_save_to_detail_mailbox = yes
login_access_sockets = tcpwrap
mail_attribute_dict = file:%h/mail/.imap/dovecot-mail-attributes
mail_location = mbox:~/mail:INBOX=~/mail/INBOX
mail_log_prefix = "%s(%u/%p): "
mail_plugins = " fts fts_solr notify virtual"
mail_privileged_group = mail
mail_server_admin = mailto:[hidden email]
mail_server_comment = LERCTR Mail Server
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 vacation-seconds editheader mboxmetadata servermetadata imapsieve vnd.dovecot.imapsieve
namespace archive {
  hidden = no
  list = no
  location = mbox:~/MAIL-ARCHIVE
  prefix = ARCHIVE/
  separator = /
}
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox INBOX {
    auto = create
  }
  mailbox SENT {
    special_use = \Sent
  }
  mailbox SPAM {
    special_use = \Junk
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  mailbox virtual/Flagged {
    special_use = \Flagged
  }
  mailbox virtual/all {
    special_use = \All
  }
  prefix =
  separator = /
}
namespace virtual {
  hidden = no
  list = yes
  location = virtual:~/MAIL-VIRTUAL:INDEX=MEMORY
  prefix = Virtual/
  separator = /
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
passdb {
  args = user=%Ln noauthenticate
  driver = static
  skip = authenticated
}
passdb {
  args = failure_show_msg=yes session=yes max_requests=20
  driver = pam
  skip = authenticated
}
plugin {
  fts = solr
  fts_autoindex = yes
  fts_solr = url=http://thebighonker.lerctr.org:8983/solr/dovecot/
  fts_tika = http://localhost:9998/tika/
  imapsieve_mailbox1_before = file:/usr/local/share/dovecot-pigeonhole/sieve/report-spam.sieve
  imapsieve_mailbox1_causes = COPY
  imapsieve_mailbox1_name = SPAM
  imapsieve_mailbox2_before = file:/usr/local/share/dovecot-pigeonhole/sieve/report-ham.sieve
  imapsieve_mailbox2_causes = COPY
  imapsieve_mailbox2_from = SPAM
  imapsieve_mailbox2_name = *
  imapsieve_url = sieve://thebighonker.lerctr.org
  mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename flag_change append
  mail_log_fields = uid box msgid size from subject vsize flags
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
  sieve_execute_bin_dir = /usr/local/share/dovecot-pigeonhole/sieve
  sieve_extensions = +editheader +vacation-seconds +mboxmetadata +servermetadata
  sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.execute
  sieve_pipe_bin_dir = /usr/local/share/dovecot-pigeonhole/sieve
  sieve_plugins = sieve_imapsieve sieve_extprograms
}
protocols = imap pop3 lmtp sieve
recipient_delimiter = +-_
service anvil {
  unix_listener anvil {
    group = mail
    mode = 0660
  }
}
service auth {
  unix_listener auth-client {
    mode = 0666
  }
  unix_listener auth-master {
    mode = 0666
  }
}
service doveadm {
  inet_listener http {
    port = 8080
    ssl = yes
  }
}
service indexer-worker {
  drop_priv_before_exec = yes
}
service lmtp {
  inet_listener lmtp {
    address = 127.0.0.1
    port = 24
  }
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
  inet_listener sieve_deprecated {
    port = 2000
  }
}
service stats {
  unix_listener stats-reader {
    group = mail
    mode = 0660
    user =
  }
  unix_listener stats-writer {
    group = mail
    mode = 0660
    user =
  }
}
service tcpwrap {
  unix_listener login/tcpwrap {
    group = $default_login_user
    mode = 0600
    user = $default_login_user
  }
}
ssl_cert = </home/ler/letsencrypt-home/lerctr.org/fullchain.cer
ssl_cipher_list = EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH+AESGCM:EECDH:EDH+AESGCM:EDH+aRSA:HIGH:!MEDIUM:!LOW:!aNULL:!eNULL:!LOW:!RC4:!MD5:!EXP:!PSK:!SRP:!DSS
ssl_dh =  # hidden, use -P to show it
ssl_key =  # hidden, use -P to show it
userdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
userdb {
  args = username_format=%Ln /etc/passwd
  driver = passwd-file
}
verbose_proctitle = yes
protocol lmtp {
  mail_plugins = " fts fts_solr notify virtual sieve mail_log"
}
protocol lda {
  mail_plugins = " fts fts_solr notify virtual sieve mail_log"
}
protocol pop3 {
  mail_plugins = " fts fts_solr notify virtual mail_log"
}
protocol !doveadm {
  mail_plugins = " fts fts_solr notify virtual mail_log"
}
protocol imap {
  imap_client_workarounds = tb-extra-mailbox-sep tb-lsub-flags
  imap_logout_format = in=%i out=%o fhc=%{fetch_hdr_count} fhb=%{fetch_hdr_bytes} fbc=%{fetch_body_count} fbb=%{fetch_body_bytes} del=%{deleted} exp=%{expunged} trash=%{trashed}
  imap_metadata = yes
  mail_max_userip_connections = 50
  mail_plugins = " fts fts_solr notify virtual mail_log imap_sieve"
}
thebighonker.lerctr.org /home/ler/sieve $
 
 

--
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 214-642-9640             E-Mail: [hidden email]
US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106
Reply | Threaded
Open this post in threaded view
|

Re: Sieve 0.5.0/Dovecot 2.3.0

Larry Rosenman
FTR, this is being delivered via LMTP from Exim using the recommended transport / director.

headers from one of my tests:
Return-Path: <[hidden email]>
Delivered-To: [hidden email]
Received: from thebighonker.lerctr.org
        by thebighonker.lerctr.org with LMTP
        id EW4ZBgV7QVoIDwAAu+mOrA
        (envelope-from <[hidden email]>)
        for <[hidden email]>; Mon, 25 Dec 2017 16:26:13 -0600
Received: from ler by thebighonker.lerctr.org with local (Exim 4.90 (FreeBSD))
        (envelope-from <[hidden email]>)
        id 1eTbCH-0000zy-08
        for [hidden email]; Mon, 25 Dec 2017 16:26:13 -0600
To: [hidden email]
Subject: test +
Message-Id: <[hidden email]>
From: Larry Rosenman <[hidden email]>
Date: Mon, 25 Dec 2017 16:26:13 -0600

logging:
master: line 6: info: DEBUG: user=ler  detail= userfull=[hidden email].
info: msgid=<[hidden email]>: stored mail into mailbox 'INBOX' (subject=test + from=[hidden email] size=648).

so, what am I missing?


On Mon, Dec 25, 2017 at 08:14:04AM -0600, Larry Rosenman wrote:

> Using 2.3.0/0.5 and the below scripts/config, why doesn’t a mail addressed to [hidden email] get the FreeBSD flag?
> .dovecot.sieve points to master.sieve.
>  
>  
>  
> Scripts:
> http://www.lerctr.org/~ler/sieve/
>  
> doveconf -n:
> thebighonker.lerctr.org /home/ler/sieve $ doveconf -n
> # 2.3.0 (c8b89eb): /usr/local/etc/dovecot/dovecot.conf
> # Pigeonhole version 0.5.0 (d68c23a1)
> # OS: FreeBSD 11.1-STABLE amd64
> auth_mechanisms = plain login
> auth_realms = lerctr.org thebighonker.lerctr.org tbh.lerctr.org thejonesonair.com thejonesonair.net
> default_vsz_limit = 1 G
> deliver_log_format = msgid=%m: %$ (subject=%s from=%f size=%w)
> doveadm_password =  # hidden, use -P to show it
> first_valid_gid = 0
> first_valid_uid = 0
> lda_mailbox_autocreate = yes
> listen = 192.147.25.65, ::
> lmtp_save_to_detail_mailbox = yes
> login_access_sockets = tcpwrap
> mail_attribute_dict = file:%h/mail/.imap/dovecot-mail-attributes
> mail_location = mbox:~/mail:INBOX=~/mail/INBOX
> mail_log_prefix = "%s(%u/%p): "
> mail_plugins = " fts fts_solr notify virtual"
> mail_privileged_group = mail
> mail_server_admin = mailto:[hidden email]
> mail_server_comment = LERCTR Mail Server
> 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 vacation-seconds editheader mboxmetadata servermetadata imapsieve vnd.dovecot.imapsieve
> namespace archive {
>   hidden = no
>   list = no
>   location = mbox:~/MAIL-ARCHIVE
>   prefix = ARCHIVE/
>   separator = /
> }
> namespace inbox {
>   inbox = yes
>   location =
>   mailbox Drafts {
>     special_use = \Drafts
>   }
>   mailbox INBOX {
>     auto = create
>   }
>   mailbox SENT {
>     special_use = \Sent
>   }
>   mailbox SPAM {
>     special_use = \Junk
>   }
>   mailbox "Sent Messages" {
>     special_use = \Sent
>   }
>   mailbox Trash {
>     special_use = \Trash
>   }
>   mailbox virtual/Flagged {
>     special_use = \Flagged
>   }
>   mailbox virtual/all {
>     special_use = \All
>   }
>   prefix =
>   separator = /
> }
> namespace virtual {
>   hidden = no
>   list = yes
>   location = virtual:~/MAIL-VIRTUAL:INDEX=MEMORY
>   prefix = Virtual/
>   separator = /
> }
> passdb {
>   args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
>   driver = sql
> }
> passdb {
>   args = user=%Ln noauthenticate
>   driver = static
>   skip = authenticated
> }
> passdb {
>   args = failure_show_msg=yes session=yes max_requests=20
>   driver = pam
>   skip = authenticated
> }
> plugin {
>   fts = solr
>   fts_autoindex = yes
>   fts_solr = url=http://thebighonker.lerctr.org:8983/solr/dovecot/
>   fts_tika = http://localhost:9998/tika/
>   imapsieve_mailbox1_before = file:/usr/local/share/dovecot-pigeonhole/sieve/report-spam.sieve
>   imapsieve_mailbox1_causes = COPY
>   imapsieve_mailbox1_name = SPAM
>   imapsieve_mailbox2_before = file:/usr/local/share/dovecot-pigeonhole/sieve/report-ham.sieve
>   imapsieve_mailbox2_causes = COPY
>   imapsieve_mailbox2_from = SPAM
>   imapsieve_mailbox2_name = *
>   imapsieve_url = sieve://thebighonker.lerctr.org
>   mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename flag_change append
>   mail_log_fields = uid box msgid size from subject vsize flags
>   sieve = ~/.dovecot.sieve
>   sieve_dir = ~/sieve
>   sieve_execute_bin_dir = /usr/local/share/dovecot-pigeonhole/sieve
>   sieve_extensions = +editheader +vacation-seconds +mboxmetadata +servermetadata
>   sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.execute
>   sieve_pipe_bin_dir = /usr/local/share/dovecot-pigeonhole/sieve
>   sieve_plugins = sieve_imapsieve sieve_extprograms
> }
> protocols = imap pop3 lmtp sieve
> recipient_delimiter = +-_
> service anvil {
>   unix_listener anvil {
>     group = mail
>     mode = 0660
>   }
> }
> service auth {
>   unix_listener auth-client {
>     mode = 0666
>   }
>   unix_listener auth-master {
>     mode = 0666
>   }
> }
> service doveadm {
>   inet_listener http {
>     port = 8080
>     ssl = yes
>   }
> }
> service indexer-worker {
>   drop_priv_before_exec = yes
> }
> service lmtp {
>   inet_listener lmtp {
>     address = 127.0.0.1
>     port = 24
>   }
> }
> service managesieve-login {
>   inet_listener sieve {
>     port = 4190
>   }
>   inet_listener sieve_deprecated {
>     port = 2000
>   }
> }
> service stats {
>   unix_listener stats-reader {
>     group = mail
>     mode = 0660
>     user =
>   }
>   unix_listener stats-writer {
>     group = mail
>     mode = 0660
>     user =
>   }
> }
> service tcpwrap {
>   unix_listener login/tcpwrap {
>     group = $default_login_user
>     mode = 0600
>     user = $default_login_user
>   }
> }
> ssl_cert = </home/ler/letsencrypt-home/lerctr.org/fullchain.cer
> ssl_cipher_list = EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH+AESGCM:EECDH:EDH+AESGCM:EDH+aRSA:HIGH:!MEDIUM:!LOW:!aNULL:!eNULL:!LOW:!RC4:!MD5:!EXP:!PSK:!SRP:!DSS
> ssl_dh =  # hidden, use -P to show it
> ssl_key =  # hidden, use -P to show it
> userdb {
>   args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
>   driver = sql
> }
> userdb {
>   args = username_format=%Ln /etc/passwd
>   driver = passwd-file
> }
> verbose_proctitle = yes
> protocol lmtp {
>   mail_plugins = " fts fts_solr notify virtual sieve mail_log"
> }
> protocol lda {
>   mail_plugins = " fts fts_solr notify virtual sieve mail_log"
> }
> protocol pop3 {
>   mail_plugins = " fts fts_solr notify virtual mail_log"
> }
> protocol !doveadm {
>   mail_plugins = " fts fts_solr notify virtual mail_log"
> }
> protocol imap {
>   imap_client_workarounds = tb-extra-mailbox-sep tb-lsub-flags
>   imap_logout_format = in=%i out=%o fhc=%{fetch_hdr_count} fhb=%{fetch_hdr_bytes} fbc=%{fetch_body_count} fbb=%{fetch_body_bytes} del=%{deleted} exp=%{expunged} trash=%{trashed}
>   imap_metadata = yes
>   mail_max_userip_connections = 50
>   mail_plugins = " fts fts_solr notify virtual mail_log imap_sieve"
> }
> thebighonker.lerctr.org /home/ler/sieve $
>  
>  
>
> --
> Larry Rosenman                     http://www.lerctr.org/~ler
> Phone: +1 214-642-9640             E-Mail: [hidden email]
> US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106

--
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 214-642-9640             E-Mail: [hidden email]
US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106
Reply | Threaded
Open this post in threaded view
|

Re: Sieve 0.5.0/Dovecot 2.3.0

Larry Rosenman
Updated (current) doveconf -n attached....

On Mon, Dec 25, 2017 at 04:33:16PM -0600, Larry Rosenman wrote:

> FTR, this is being delivered via LMTP from Exim using the recommended transport / director.
>
> headers from one of my tests:
> Return-Path: <[hidden email]>
> Delivered-To: [hidden email]
> Received: from thebighonker.lerctr.org
>         by thebighonker.lerctr.org with LMTP
>         id EW4ZBgV7QVoIDwAAu+mOrA
>         (envelope-from <[hidden email]>)
>         for <[hidden email]>; Mon, 25 Dec 2017 16:26:13 -0600
> Received: from ler by thebighonker.lerctr.org with local (Exim 4.90 (FreeBSD))
>         (envelope-from <[hidden email]>)
>         id 1eTbCH-0000zy-08
>         for [hidden email]; Mon, 25 Dec 2017 16:26:13 -0600
> To: [hidden email]
> Subject: test +
> Message-Id: <[hidden email]>
> From: Larry Rosenman <[hidden email]>
> Date: Mon, 25 Dec 2017 16:26:13 -0600
>
> logging:
> master: line 6: info: DEBUG: user=ler  detail= userfull=[hidden email].
> info: msgid=<[hidden email]>: stored mail into mailbox 'INBOX' (subject=test + from=[hidden email] size=648).
>
> so, what am I missing?
>
>
> On Mon, Dec 25, 2017 at 08:14:04AM -0600, Larry Rosenman wrote:
> > Using 2.3.0/0.5 and the below scripts/config, why doesn’t a mail addressed to [hidden email] get the FreeBSD flag?
> > .dovecot.sieve points to master.sieve.
> >  
> >  
> >  
> > Scripts:
> > http://www.lerctr.org/~ler/sieve/
> >  
> > doveconf -n:
> > thebighonker.lerctr.org /home/ler/sieve $ doveconf -n
> > # 2.3.0 (c8b89eb): /usr/local/etc/dovecot/dovecot.conf
> > # Pigeonhole version 0.5.0 (d68c23a1)
> > # OS: FreeBSD 11.1-STABLE amd64
> > auth_mechanisms = plain login
> > auth_realms = lerctr.org thebighonker.lerctr.org tbh.lerctr.org thejonesonair.com thejonesonair.net
> > default_vsz_limit = 1 G
> > deliver_log_format = msgid=%m: %$ (subject=%s from=%f size=%w)
> > doveadm_password =  # hidden, use -P to show it
> > first_valid_gid = 0
> > first_valid_uid = 0
> > lda_mailbox_autocreate = yes
> > listen = 192.147.25.65, ::
> > lmtp_save_to_detail_mailbox = yes
> > login_access_sockets = tcpwrap
> > mail_attribute_dict = file:%h/mail/.imap/dovecot-mail-attributes
> > mail_location = mbox:~/mail:INBOX=~/mail/INBOX
> > mail_log_prefix = "%s(%u/%p): "
> > mail_plugins = " fts fts_solr notify virtual"
> > mail_privileged_group = mail
> > mail_server_admin = mailto:[hidden email]
> > mail_server_comment = LERCTR Mail Server
> > 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 vacation-seconds editheader mboxmetadata servermetadata imapsieve vnd.dovecot.imapsieve
> > namespace archive {
> >   hidden = no
> >   list = no
> >   location = mbox:~/MAIL-ARCHIVE
> >   prefix = ARCHIVE/
> >   separator = /
> > }
> > namespace inbox {
> >   inbox = yes
> >   location =
> >   mailbox Drafts {
> >     special_use = \Drafts
> >   }
> >   mailbox INBOX {
> >     auto = create
> >   }
> >   mailbox SENT {
> >     special_use = \Sent
> >   }
> >   mailbox SPAM {
> >     special_use = \Junk
> >   }
> >   mailbox "Sent Messages" {
> >     special_use = \Sent
> >   }
> >   mailbox Trash {
> >     special_use = \Trash
> >   }
> >   mailbox virtual/Flagged {
> >     special_use = \Flagged
> >   }
> >   mailbox virtual/all {
> >     special_use = \All
> >   }
> >   prefix =
> >   separator = /
> > }
> > namespace virtual {
> >   hidden = no
> >   list = yes
> >   location = virtual:~/MAIL-VIRTUAL:INDEX=MEMORY
> >   prefix = Virtual/
> >   separator = /
> > }
> > passdb {
> >   args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
> >   driver = sql
> > }
> > passdb {
> >   args = user=%Ln noauthenticate
> >   driver = static
> >   skip = authenticated
> > }
> > passdb {
> >   args = failure_show_msg=yes session=yes max_requests=20
> >   driver = pam
> >   skip = authenticated
> > }
> > plugin {
> >   fts = solr
> >   fts_autoindex = yes
> >   fts_solr = url=http://thebighonker.lerctr.org:8983/solr/dovecot/
> >   fts_tika = http://localhost:9998/tika/
> >   imapsieve_mailbox1_before = file:/usr/local/share/dovecot-pigeonhole/sieve/report-spam.sieve
> >   imapsieve_mailbox1_causes = COPY
> >   imapsieve_mailbox1_name = SPAM
> >   imapsieve_mailbox2_before = file:/usr/local/share/dovecot-pigeonhole/sieve/report-ham.sieve
> >   imapsieve_mailbox2_causes = COPY
> >   imapsieve_mailbox2_from = SPAM
> >   imapsieve_mailbox2_name = *
> >   imapsieve_url = sieve://thebighonker.lerctr.org
> >   mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename flag_change append
> >   mail_log_fields = uid box msgid size from subject vsize flags
> >   sieve = ~/.dovecot.sieve
> >   sieve_dir = ~/sieve
> >   sieve_execute_bin_dir = /usr/local/share/dovecot-pigeonhole/sieve
> >   sieve_extensions = +editheader +vacation-seconds +mboxmetadata +servermetadata
> >   sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.execute
> >   sieve_pipe_bin_dir = /usr/local/share/dovecot-pigeonhole/sieve
> >   sieve_plugins = sieve_imapsieve sieve_extprograms
> > }
> > protocols = imap pop3 lmtp sieve
> > recipient_delimiter = +-_
> > service anvil {
> >   unix_listener anvil {
> >     group = mail
> >     mode = 0660
> >   }
> > }
> > service auth {
> >   unix_listener auth-client {
> >     mode = 0666
> >   }
> >   unix_listener auth-master {
> >     mode = 0666
> >   }
> > }
> > service doveadm {
> >   inet_listener http {
> >     port = 8080
> >     ssl = yes
> >   }
> > }
> > service indexer-worker {
> >   drop_priv_before_exec = yes
> > }
> > service lmtp {
> >   inet_listener lmtp {
> >     address = 127.0.0.1
> >     port = 24
> >   }
> > }
> > service managesieve-login {
> >   inet_listener sieve {
> >     port = 4190
> >   }
> >   inet_listener sieve_deprecated {
> >     port = 2000
> >   }
> > }
> > service stats {
> >   unix_listener stats-reader {
> >     group = mail
> >     mode = 0660
> >     user =
> >   }
> >   unix_listener stats-writer {
> >     group = mail
> >     mode = 0660
> >     user =
> >   }
> > }
> > service tcpwrap {
> >   unix_listener login/tcpwrap {
> >     group = $default_login_user
> >     mode = 0600
> >     user = $default_login_user
> >   }
> > }
> > ssl_cert = </home/ler/letsencrypt-home/lerctr.org/fullchain.cer
> > ssl_cipher_list = EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH+AESGCM:EECDH:EDH+AESGCM:EDH+aRSA:HIGH:!MEDIUM:!LOW:!aNULL:!eNULL:!LOW:!RC4:!MD5:!EXP:!PSK:!SRP:!DSS
> > ssl_dh =  # hidden, use -P to show it
> > ssl_key =  # hidden, use -P to show it
> > userdb {
> >   args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
> >   driver = sql
> > }
> > userdb {
> >   args = username_format=%Ln /etc/passwd
> >   driver = passwd-file
> > }
> > verbose_proctitle = yes
> > protocol lmtp {
> >   mail_plugins = " fts fts_solr notify virtual sieve mail_log"
> > }
> > protocol lda {
> >   mail_plugins = " fts fts_solr notify virtual sieve mail_log"
> > }
> > protocol pop3 {
> >   mail_plugins = " fts fts_solr notify virtual mail_log"
> > }
> > protocol !doveadm {
> >   mail_plugins = " fts fts_solr notify virtual mail_log"
> > }
> > protocol imap {
> >   imap_client_workarounds = tb-extra-mailbox-sep tb-lsub-flags
> >   imap_logout_format = in=%i out=%o fhc=%{fetch_hdr_count} fhb=%{fetch_hdr_bytes} fbc=%{fetch_body_count} fbb=%{fetch_body_bytes} del=%{deleted} exp=%{expunged} trash=%{trashed}
> >   imap_metadata = yes
> >   mail_max_userip_connections = 50
> >   mail_plugins = " fts fts_solr notify virtual mail_log imap_sieve"
> > }
> > thebighonker.lerctr.org /home/ler/sieve $
> >  
> >  
> >
> > --
> > Larry Rosenman                     http://www.lerctr.org/~ler
> > Phone: +1 214-642-9640             E-Mail: [hidden email]
> > US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106
>
> --
> Larry Rosenman                     http://www.lerctr.org/~ler
> Phone: +1 214-642-9640             E-Mail: [hidden email]
> US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106
--
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 214-642-9640             E-Mail: [hidden email]
US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106

doveconf.txt (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Sieve 0.5.0/Dovecot 2.3.0

Larry Rosenman
I found it in the Exim Doc:

------
rcpt_include_affixes Use: transports Type: boolean Default: false
When this option is false (the default), and an address that has had any affixes (prefixes or suffixes) removed from the local part is delivered by any form of SMTP or LMTP, the affixes are not included. For example, if a router that contains

local_part_prefix = *-
routes the address [hidden email] to an SMTP transport, the envelope is delivered with

RCPT TO:<[hidden email]>
This is also the case when an ACL-time callout is being used to verify a recipient address. However, if rcpt_include_affixes is set true, the whole local part is included in the RCPT command. This option applies to BSMTP deliveries by the appendfile and pipe transports as well as to the lmtp and smtp transports.

------
So once I added rcpt_include_affixes to my lmtp transport it all started working.

We may want to add that to the example LMTP stuff.


On Mon, Dec 25, 2017 at 04:37:11PM -0600, Larry Rosenman wrote:

> Updated (current) doveconf -n attached....
>
> On Mon, Dec 25, 2017 at 04:33:16PM -0600, Larry Rosenman wrote:
> > FTR, this is being delivered via LMTP from Exim using the recommended transport / director.
> >
> > headers from one of my tests:
> > Return-Path: <[hidden email]>
> > Delivered-To: [hidden email]
> > Received: from thebighonker.lerctr.org
> >         by thebighonker.lerctr.org with LMTP
> >         id EW4ZBgV7QVoIDwAAu+mOrA
> >         (envelope-from <[hidden email]>)
> >         for <[hidden email]>; Mon, 25 Dec 2017 16:26:13 -0600
> > Received: from ler by thebighonker.lerctr.org with local (Exim 4.90 (FreeBSD))
> >         (envelope-from <[hidden email]>)
> >         id 1eTbCH-0000zy-08
> >         for [hidden email]; Mon, 25 Dec 2017 16:26:13 -0600
> > To: [hidden email]
> > Subject: test +
> > Message-Id: <[hidden email]>
> > From: Larry Rosenman <[hidden email]>
> > Date: Mon, 25 Dec 2017 16:26:13 -0600
> >
> > logging:
> > master: line 6: info: DEBUG: user=ler  detail= userfull=[hidden email].
> > info: msgid=<[hidden email]>: stored mail into mailbox 'INBOX' (subject=test + from=[hidden email] size=648).
> >
> > so, what am I missing?
> >
> >
> > On Mon, Dec 25, 2017 at 08:14:04AM -0600, Larry Rosenman wrote:
> > > Using 2.3.0/0.5 and the below scripts/config, why doesn’t a mail addressed to [hidden email] get the FreeBSD flag?
> > > .dovecot.sieve points to master.sieve.
> > >  
> > >  
> > >  
> > > Scripts:
> > > http://www.lerctr.org/~ler/sieve/
> > >  
> > > doveconf -n:
> > > thebighonker.lerctr.org /home/ler/sieve $ doveconf -n
> > > # 2.3.0 (c8b89eb): /usr/local/etc/dovecot/dovecot.conf
> > > # Pigeonhole version 0.5.0 (d68c23a1)
> > > # OS: FreeBSD 11.1-STABLE amd64
> > > auth_mechanisms = plain login
> > > auth_realms = lerctr.org thebighonker.lerctr.org tbh.lerctr.org thejonesonair.com thejonesonair.net
> > > default_vsz_limit = 1 G
> > > deliver_log_format = msgid=%m: %$ (subject=%s from=%f size=%w)
> > > doveadm_password =  # hidden, use -P to show it
> > > first_valid_gid = 0
> > > first_valid_uid = 0
> > > lda_mailbox_autocreate = yes
> > > listen = 192.147.25.65, ::
> > > lmtp_save_to_detail_mailbox = yes
> > > login_access_sockets = tcpwrap
> > > mail_attribute_dict = file:%h/mail/.imap/dovecot-mail-attributes
> > > mail_location = mbox:~/mail:INBOX=~/mail/INBOX
> > > mail_log_prefix = "%s(%u/%p): "
> > > mail_plugins = " fts fts_solr notify virtual"
> > > mail_privileged_group = mail
> > > mail_server_admin = mailto:[hidden email]
> > > mail_server_comment = LERCTR Mail Server
> > > 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 vacation-seconds editheader mboxmetadata servermetadata imapsieve vnd.dovecot.imapsieve
> > > namespace archive {
> > >   hidden = no
> > >   list = no
> > >   location = mbox:~/MAIL-ARCHIVE
> > >   prefix = ARCHIVE/
> > >   separator = /
> > > }
> > > namespace inbox {
> > >   inbox = yes
> > >   location =
> > >   mailbox Drafts {
> > >     special_use = \Drafts
> > >   }
> > >   mailbox INBOX {
> > >     auto = create
> > >   }
> > >   mailbox SENT {
> > >     special_use = \Sent
> > >   }
> > >   mailbox SPAM {
> > >     special_use = \Junk
> > >   }
> > >   mailbox "Sent Messages" {
> > >     special_use = \Sent
> > >   }
> > >   mailbox Trash {
> > >     special_use = \Trash
> > >   }
> > >   mailbox virtual/Flagged {
> > >     special_use = \Flagged
> > >   }
> > >   mailbox virtual/all {
> > >     special_use = \All
> > >   }
> > >   prefix =
> > >   separator = /
> > > }
> > > namespace virtual {
> > >   hidden = no
> > >   list = yes
> > >   location = virtual:~/MAIL-VIRTUAL:INDEX=MEMORY
> > >   prefix = Virtual/
> > >   separator = /
> > > }
> > > passdb {
> > >   args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
> > >   driver = sql
> > > }
> > > passdb {
> > >   args = user=%Ln noauthenticate
> > >   driver = static
> > >   skip = authenticated
> > > }
> > > passdb {
> > >   args = failure_show_msg=yes session=yes max_requests=20
> > >   driver = pam
> > >   skip = authenticated
> > > }
> > > plugin {
> > >   fts = solr
> > >   fts_autoindex = yes
> > >   fts_solr = url=http://thebighonker.lerctr.org:8983/solr/dovecot/
> > >   fts_tika = http://localhost:9998/tika/
> > >   imapsieve_mailbox1_before = file:/usr/local/share/dovecot-pigeonhole/sieve/report-spam.sieve
> > >   imapsieve_mailbox1_causes = COPY
> > >   imapsieve_mailbox1_name = SPAM
> > >   imapsieve_mailbox2_before = file:/usr/local/share/dovecot-pigeonhole/sieve/report-ham.sieve
> > >   imapsieve_mailbox2_causes = COPY
> > >   imapsieve_mailbox2_from = SPAM
> > >   imapsieve_mailbox2_name = *
> > >   imapsieve_url = sieve://thebighonker.lerctr.org
> > >   mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename flag_change append
> > >   mail_log_fields = uid box msgid size from subject vsize flags
> > >   sieve = ~/.dovecot.sieve
> > >   sieve_dir = ~/sieve
> > >   sieve_execute_bin_dir = /usr/local/share/dovecot-pigeonhole/sieve
> > >   sieve_extensions = +editheader +vacation-seconds +mboxmetadata +servermetadata
> > >   sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.execute
> > >   sieve_pipe_bin_dir = /usr/local/share/dovecot-pigeonhole/sieve
> > >   sieve_plugins = sieve_imapsieve sieve_extprograms
> > > }
> > > protocols = imap pop3 lmtp sieve
> > > recipient_delimiter = +-_
> > > service anvil {
> > >   unix_listener anvil {
> > >     group = mail
> > >     mode = 0660
> > >   }
> > > }
> > > service auth {
> > >   unix_listener auth-client {
> > >     mode = 0666
> > >   }
> > >   unix_listener auth-master {
> > >     mode = 0666
> > >   }
> > > }
> > > service doveadm {
> > >   inet_listener http {
> > >     port = 8080
> > >     ssl = yes
> > >   }
> > > }
> > > service indexer-worker {
> > >   drop_priv_before_exec = yes
> > > }
> > > service lmtp {
> > >   inet_listener lmtp {
> > >     address = 127.0.0.1
> > >     port = 24
> > >   }
> > > }
> > > service managesieve-login {
> > >   inet_listener sieve {
> > >     port = 4190
> > >   }
> > >   inet_listener sieve_deprecated {
> > >     port = 2000
> > >   }
> > > }
> > > service stats {
> > >   unix_listener stats-reader {
> > >     group = mail
> > >     mode = 0660
> > >     user =
> > >   }
> > >   unix_listener stats-writer {
> > >     group = mail
> > >     mode = 0660
> > >     user =
> > >   }
> > > }
> > > service tcpwrap {
> > >   unix_listener login/tcpwrap {
> > >     group = $default_login_user
> > >     mode = 0600
> > >     user = $default_login_user
> > >   }
> > > }
> > > ssl_cert = </home/ler/letsencrypt-home/lerctr.org/fullchain.cer
> > > ssl_cipher_list = EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH+AESGCM:EECDH:EDH+AESGCM:EDH+aRSA:HIGH:!MEDIUM:!LOW:!aNULL:!eNULL:!LOW:!RC4:!MD5:!EXP:!PSK:!SRP:!DSS
> > > ssl_dh =  # hidden, use -P to show it
> > > ssl_key =  # hidden, use -P to show it
> > > userdb {
> > >   args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
> > >   driver = sql
> > > }
> > > userdb {
> > >   args = username_format=%Ln /etc/passwd
> > >   driver = passwd-file
> > > }
> > > verbose_proctitle = yes
> > > protocol lmtp {
> > >   mail_plugins = " fts fts_solr notify virtual sieve mail_log"
> > > }
> > > protocol lda {
> > >   mail_plugins = " fts fts_solr notify virtual sieve mail_log"
> > > }
> > > protocol pop3 {
> > >   mail_plugins = " fts fts_solr notify virtual mail_log"
> > > }
> > > protocol !doveadm {
> > >   mail_plugins = " fts fts_solr notify virtual mail_log"
> > > }
> > > protocol imap {
> > >   imap_client_workarounds = tb-extra-mailbox-sep tb-lsub-flags
> > >   imap_logout_format = in=%i out=%o fhc=%{fetch_hdr_count} fhb=%{fetch_hdr_bytes} fbc=%{fetch_body_count} fbb=%{fetch_body_bytes} del=%{deleted} exp=%{expunged} trash=%{trashed}
> > >   imap_metadata = yes
> > >   mail_max_userip_connections = 50
> > >   mail_plugins = " fts fts_solr notify virtual mail_log imap_sieve"
> > > }
> > > thebighonker.lerctr.org /home/ler/sieve $
> > >  
> > >  
> > >
> > > --
> > > Larry Rosenman                     http://www.lerctr.org/~ler
> > > Phone: +1 214-642-9640             E-Mail: [hidden email]
> > > US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106
> >
> > --
> > Larry Rosenman                     http://www.lerctr.org/~ler
> > Phone: +1 214-642-9640             E-Mail: [hidden email]
> > US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106
>
> --
> Larry Rosenman                     http://www.lerctr.org/~ler
> Phone: +1 214-642-9640             E-Mail: [hidden email]
> US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106

> # 2.3.0 (c8b89eb): /usr/local/etc/dovecot/dovecot.conf
> # Pigeonhole version 0.5.0 (d68c23a1)
> # OS: FreeBSD 11.1-STABLE amd64  
> auth_mechanisms = plain login
> auth_realms = lerctr.org thebighonker.lerctr.org tbh.lerctr.org thejonesonair.com thejonesonair.net
> default_vsz_limit = 1 G
> deliver_log_format = msgid=%m: %$ (subject=%s from=%f size=%w)
> doveadm_password =  # hidden, use -P to show it
> first_valid_gid = 0
> first_valid_uid = 0
> lda_mailbox_autocreate = yes
> listen = 192.147.25.65, ::
> lmtp_save_to_detail_mailbox = yes
> login_access_sockets = tcpwrap
> mail_attribute_dict = file:%h/mail/.imap/dovecot-mail-attributes
> mail_location = mbox:~/mail:INBOX=~/mail/INBOX
> mail_log_prefix = "%s(%u/%p): "
> mail_plugins = " fts fts_solr notify virtual"
> mail_privileged_group = mail
> mail_server_admin = mailto:[hidden email]
> mail_server_comment = LERCTR Mail Server
> 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 vacation-seconds editheader mboxmetadata servermetadata vnd.dovecot.debug imapsieve vnd.dovecot.imapsieve
> namespace archive {
>   hidden = no
>   list = no
>   location = mbox:~/MAIL-ARCHIVE
>   prefix = ARCHIVE/
>   separator = /
> }
> namespace inbox {
>   inbox = yes
>   location =
>   mailbox Drafts {
>     special_use = \Drafts
>   }
>   mailbox INBOX {
>     auto = create
>   }
>   mailbox SENT {
>     special_use = \Sent
>   }
>   mailbox SPAM {
>     special_use = \Junk
>   }
>   mailbox "Sent Messages" {
>     special_use = \Sent
>   }
>   mailbox Trash {
>     special_use = \Trash
>   }
>   mailbox virtual/Flagged {
>     special_use = \Flagged
>   }
>   mailbox virtual/all {
>     special_use = \All
>   }
>   prefix =
>   separator = /
> }
> namespace virtual {
>   hidden = no
>   list = yes
>   location = virtual:~/MAIL-VIRTUAL:INDEX=MEMORY
>   prefix = Virtual/
>   separator = /
> }
> passdb {
>   args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
>   driver = sql
> }
> passdb {
>   args = user=%Ln noauthenticate
>   driver = static
>   skip = authenticated
> }
> passdb {
>   args = failure_show_msg=yes session=yes max_requests=20
>   driver = pam
>   skip = authenticated
> }
> plugin {
>   fts = solr
>   fts_autoindex = yes
>   fts_solr = url=http://thebighonker.lerctr.org:8983/solr/dovecot/
>   fts_tika = http://localhost:9998/tika/
>   imapsieve_mailbox1_before = file:/usr/local/share/dovecot-pigeonhole/sieve/report-spam.sieve
>   imapsieve_mailbox1_causes = COPY
>   imapsieve_mailbox1_name = SPAM
>   imapsieve_mailbox2_before = file:/usr/local/share/dovecot-pigeonhole/sieve/report-ham.sieve
>   imapsieve_mailbox2_causes = COPY
>   imapsieve_mailbox2_from = SPAM
>   imapsieve_mailbox2_name = *
>   imapsieve_url = sieve://thebighonker.lerctr.org
>   mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename flag_change append
>   mail_log_fields = uid box msgid size from subject vsize flags
>   recipient_delimiter = +-_
>   sieve = ~/.dovecot.sieve
>   sieve_dir = ~/sieve
>   sieve_execute_bin_dir = /usr/local/share/dovecot-pigeonhole/sieve
>   sieve_extensions = +editheader +vacation-seconds +mboxmetadata +servermetadata +vnd.dovecot.debug
>   sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.execute
>   sieve_pipe_bin_dir = /usr/local/share/dovecot-pigeonhole/sieve
>   sieve_plugins = sieve_imapsieve sieve_extprograms
> }
> protocols = imap pop3 lmtp sieve
> recipient_delimiter = +-_
> service anvil {
>   unix_listener anvil {
>     group = mail
>     mode = 0660
>   }
> }
> service auth {
>   unix_listener auth-client {
>     mode = 0666
>   }
>   unix_listener auth-master {
>     mode = 0666
>   }
> }
> service doveadm {
>   inet_listener http {
>     port = 8080
>     ssl = yes
>   }
> }
> service indexer-worker {
>   drop_priv_before_exec = yes
> }
> service lmtp {
>   inet_listener lmtp {
>     address = 127.0.0.1
>     port = 24
>   }
> }
> service managesieve-login {
>   inet_listener sieve {
>     port = 4190
>   }
>   inet_listener sieve_deprecated {
>     port = 2000
>   }
> }
> service stats {
>   unix_listener stats-reader {
>     group = mail
>     mode = 0660
>     user =
>   }
>   unix_listener stats-writer {
>     group = mail
>     mode = 0660
>     user =
>   }
> }
> service tcpwrap {
>   unix_listener login/tcpwrap {
>     group = $default_login_user
>     mode = 0600
>     user = $default_login_user
>   }
> }
> ssl_cert = </home/ler/letsencrypt-home/lerctr.org/fullchain.cer
> ssl_cipher_list = EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH+AESGCM:EECDH:EDH+AESGCM:EDH+aRSA:HIGH:!MEDIUM:!LOW:!aNULL:!eNULL:!LOW:!RC4:!MD5:!EXP:!PSK:!SRP:!DSS
> ssl_dh =  # hidden, use -P to show it
> ssl_key =  # hidden, use -P to show it
> userdb {
>   args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
>   driver = sql
> }
> userdb {
>   args = username_format=%Ln /etc/passwd
>   driver = passwd-file
> }
> verbose_proctitle = yes
> protocol lmtp {
>   mail_plugins = " fts fts_solr notify virtual sieve mail_log"
> }
> protocol lda {
>   mail_plugins = " fts fts_solr notify virtual sieve mail_log"
> }
> protocol pop3 {
>   mail_plugins = " fts fts_solr notify virtual mail_log"
> }
> protocol !doveadm {
>   mail_plugins = " fts fts_solr notify virtual mail_log"
> }
> protocol imap {
>   imap_client_workarounds = tb-extra-mailbox-sep tb-lsub-flags
>   imap_logout_format = in=%i out=%o fhc=%{fetch_hdr_count} fhb=%{fetch_hdr_bytes} fbc=%{fetch_body_count} fbb=%{fetch_body_bytes} del=%{deleted} exp=%{expunged} trash=%{trashed}
>   imap_metadata = yes
>   mail_max_userip_connections = 50
>   mail_plugins = " fts fts_solr notify virtual mail_log imap_sieve"
> }


--
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 214-642-9640             E-Mail: [hidden email]
US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106
Reply | Threaded
Open this post in threaded view
|

Re: Sieve 0.5.0/Dovecot 2.3.0

Stephan Bosch-2
In reply to this post by Larry Rosenman


Op 25-12-2017 om 23:37 schreef Larry Rosenman:
> Updated (current) doveconf -n attached....

The delivered-to header tells me that the envelope has no detail part,
which is what you're checking for using the "envelope" test. So, it is
not strange that the test yields the empty string.

There is a detail part in the "To:" header, but that would need to be
tested using the "address" test.

Is the envelope supposed to have a detail part? If yes, could you
provide the (manual) protocol log of an LMTP session that in your
assessment should have worked correctly?

Regards,

Stephan.

> On Mon, Dec 25, 2017 at 04:33:16PM -0600, Larry Rosenman wrote:
>> FTR, this is being delivered via LMTP from Exim using the recommended transport / director.
>>
>> headers from one of my tests:
>> Return-Path: <[hidden email]>
>> Delivered-To: [hidden email]
>> Received: from thebighonker.lerctr.org
>>          by thebighonker.lerctr.org with LMTP
>>          id EW4ZBgV7QVoIDwAAu+mOrA
>>          (envelope-from <[hidden email]>)
>>          for <[hidden email]>; Mon, 25 Dec 2017 16:26:13 -0600
>> Received: from ler by thebighonker.lerctr.org with local (Exim 4.90 (FreeBSD))
>>          (envelope-from <[hidden email]>)
>>          id 1eTbCH-0000zy-08
>>          for [hidden email]; Mon, 25 Dec 2017 16:26:13 -0600
>> To: [hidden email]
>> Subject: test +
>> Message-Id: <[hidden email]>
>> From: Larry Rosenman <[hidden email]>
>> Date: Mon, 25 Dec 2017 16:26:13 -0600
>>
>> logging:
>> master: line 6: info: DEBUG: user=ler  detail= userfull=[hidden email].
>> info: msgid=<[hidden email]>: stored mail into mailbox 'INBOX' (subject=test + from=[hidden email] size=648).
>>
>> so, what am I missing?
>>
>>
>> On Mon, Dec 25, 2017 at 08:14:04AM -0600, Larry Rosenman wrote:
>>> Using 2.3.0/0.5 and the below scripts/config, why doesn’t a mail addressed to [hidden email] get the FreeBSD flag?
>>> .dovecot.sieve points to master.sieve.
>>>  
>>>  
>>>  
>>> Scripts:
>>> http://www.lerctr.org/~ler/sieve/
>>>  
>>> doveconf -n:
>>> thebighonker.lerctr.org /home/ler/sieve $ doveconf -n
>>> # 2.3.0 (c8b89eb): /usr/local/etc/dovecot/dovecot.conf
>>> # Pigeonhole version 0.5.0 (d68c23a1)
>>> # OS: FreeBSD 11.1-STABLE amd64
>>> auth_mechanisms = plain login
>>> auth_realms = lerctr.org thebighonker.lerctr.org tbh.lerctr.org thejonesonair.com thejonesonair.net
>>> default_vsz_limit = 1 G
>>> deliver_log_format = msgid=%m: %$ (subject=%s from=%f size=%w)
>>> doveadm_password =  # hidden, use -P to show it
>>> first_valid_gid = 0
>>> first_valid_uid = 0
>>> lda_mailbox_autocreate = yes
>>> listen = 192.147.25.65, ::
>>> lmtp_save_to_detail_mailbox = yes
>>> login_access_sockets = tcpwrap
>>> mail_attribute_dict = file:%h/mail/.imap/dovecot-mail-attributes
>>> mail_location = mbox:~/mail:INBOX=~/mail/INBOX
>>> mail_log_prefix = "%s(%u/%p): "
>>> mail_plugins = " fts fts_solr notify virtual"
>>> mail_privileged_group = mail
>>> mail_server_admin = mailto:[hidden email]
>>> mail_server_comment = LERCTR Mail Server
>>> 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 vacation-seconds editheader mboxmetadata servermetadata imapsieve vnd.dovecot.imapsieve
>>> namespace archive {
>>>    hidden = no
>>>    list = no
>>>    location = mbox:~/MAIL-ARCHIVE
>>>    prefix = ARCHIVE/
>>>    separator = /
>>> }
>>> namespace inbox {
>>>    inbox = yes
>>>    location =
>>>    mailbox Drafts {
>>>      special_use = \Drafts
>>>    }
>>>    mailbox INBOX {
>>>      auto = create
>>>    }
>>>    mailbox SENT {
>>>      special_use = \Sent
>>>    }
>>>    mailbox SPAM {
>>>      special_use = \Junk
>>>    }
>>>    mailbox "Sent Messages" {
>>>      special_use = \Sent
>>>    }
>>>    mailbox Trash {
>>>      special_use = \Trash
>>>    }
>>>    mailbox virtual/Flagged {
>>>      special_use = \Flagged
>>>    }
>>>    mailbox virtual/all {
>>>      special_use = \All
>>>    }
>>>    prefix =
>>>    separator = /
>>> }
>>> namespace virtual {
>>>    hidden = no
>>>    list = yes
>>>    location = virtual:~/MAIL-VIRTUAL:INDEX=MEMORY
>>>    prefix = Virtual/
>>>    separator = /
>>> }
>>> passdb {
>>>    args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
>>>    driver = sql
>>> }
>>> passdb {
>>>    args = user=%Ln noauthenticate
>>>    driver = static
>>>    skip = authenticated
>>> }
>>> passdb {
>>>    args = failure_show_msg=yes session=yes max_requests=20
>>>    driver = pam
>>>    skip = authenticated
>>> }
>>> plugin {
>>>    fts = solr
>>>    fts_autoindex = yes
>>>    fts_solr = url=http://thebighonker.lerctr.org:8983/solr/dovecot/
>>>    fts_tika = http://localhost:9998/tika/
>>>    imapsieve_mailbox1_before = file:/usr/local/share/dovecot-pigeonhole/sieve/report-spam.sieve
>>>    imapsieve_mailbox1_causes = COPY
>>>    imapsieve_mailbox1_name = SPAM
>>>    imapsieve_mailbox2_before = file:/usr/local/share/dovecot-pigeonhole/sieve/report-ham.sieve
>>>    imapsieve_mailbox2_causes = COPY
>>>    imapsieve_mailbox2_from = SPAM
>>>    imapsieve_mailbox2_name = *
>>>    imapsieve_url = sieve://thebighonker.lerctr.org
>>>    mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename flag_change append
>>>    mail_log_fields = uid box msgid size from subject vsize flags
>>>    sieve = ~/.dovecot.sieve
>>>    sieve_dir = ~/sieve
>>>    sieve_execute_bin_dir = /usr/local/share/dovecot-pigeonhole/sieve
>>>    sieve_extensions = +editheader +vacation-seconds +mboxmetadata +servermetadata
>>>    sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.execute
>>>    sieve_pipe_bin_dir = /usr/local/share/dovecot-pigeonhole/sieve
>>>    sieve_plugins = sieve_imapsieve sieve_extprograms
>>> }
>>> protocols = imap pop3 lmtp sieve
>>> recipient_delimiter = +-_
>>> service anvil {
>>>    unix_listener anvil {
>>>      group = mail
>>>      mode = 0660
>>>    }
>>> }
>>> service auth {
>>>    unix_listener auth-client {
>>>      mode = 0666
>>>    }
>>>    unix_listener auth-master {
>>>      mode = 0666
>>>    }
>>> }
>>> service doveadm {
>>>    inet_listener http {
>>>      port = 8080
>>>      ssl = yes
>>>    }
>>> }
>>> service indexer-worker {
>>>    drop_priv_before_exec = yes
>>> }
>>> service lmtp {
>>>    inet_listener lmtp {
>>>      address = 127.0.0.1
>>>      port = 24
>>>    }
>>> }
>>> service managesieve-login {
>>>    inet_listener sieve {
>>>      port = 4190
>>>    }
>>>    inet_listener sieve_deprecated {
>>>      port = 2000
>>>    }
>>> }
>>> service stats {
>>>    unix_listener stats-reader {
>>>      group = mail
>>>      mode = 0660
>>>      user =
>>>    }
>>>    unix_listener stats-writer {
>>>      group = mail
>>>      mode = 0660
>>>      user =
>>>    }
>>> }
>>> service tcpwrap {
>>>    unix_listener login/tcpwrap {
>>>      group = $default_login_user
>>>      mode = 0600
>>>      user = $default_login_user
>>>    }
>>> }
>>> ssl_cert = </home/ler/letsencrypt-home/lerctr.org/fullchain.cer
>>> ssl_cipher_list = EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH+AESGCM:EECDH:EDH+AESGCM:EDH+aRSA:HIGH:!MEDIUM:!LOW:!aNULL:!eNULL:!LOW:!RC4:!MD5:!EXP:!PSK:!SRP:!DSS
>>> ssl_dh =  # hidden, use -P to show it
>>> ssl_key =  # hidden, use -P to show it
>>> userdb {
>>>    args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
>>>    driver = sql
>>> }
>>> userdb {
>>>    args = username_format=%Ln /etc/passwd
>>>    driver = passwd-file
>>> }
>>> verbose_proctitle = yes
>>> protocol lmtp {
>>>    mail_plugins = " fts fts_solr notify virtual sieve mail_log"
>>> }
>>> protocol lda {
>>>    mail_plugins = " fts fts_solr notify virtual sieve mail_log"
>>> }
>>> protocol pop3 {
>>>    mail_plugins = " fts fts_solr notify virtual mail_log"
>>> }
>>> protocol !doveadm {
>>>    mail_plugins = " fts fts_solr notify virtual mail_log"
>>> }
>>> protocol imap {
>>>    imap_client_workarounds = tb-extra-mailbox-sep tb-lsub-flags
>>>    imap_logout_format = in=%i out=%o fhc=%{fetch_hdr_count} fhb=%{fetch_hdr_bytes} fbc=%{fetch_body_count} fbb=%{fetch_body_bytes} del=%{deleted} exp=%{expunged} trash=%{trashed}
>>>    imap_metadata = yes
>>>    mail_max_userip_connections = 50
>>>    mail_plugins = " fts fts_solr notify virtual mail_log imap_sieve"
>>> }
>>> thebighonker.lerctr.org /home/ler/sieve $
>>>  
>>>  
>>>
>>> --
>>> Larry Rosenman                     http://www.lerctr.org/~ler
>>> Phone: +1 214-642-9640             E-Mail: [hidden email]
>>> US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106
>> --
>> Larry Rosenman                     http://www.lerctr.org/~ler
>> Phone: +1 214-642-9640             E-Mail: [hidden email]
>> US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106

Reply | Threaded
Open this post in threaded view
|

Re: Sieve 0.5.0/Dovecot 2.3.0

Larry Rosenman
See my last message re: rcpt_include_affixes.  Once I put that in Exim it started working.

We probably should update the wiki about that with LMTP / LDA / Exim.


On Mon, Dec 25, 2017 at 11:59:29PM +0100, Stephan Bosch wrote:

>
>
> Op 25-12-2017 om 23:37 schreef Larry Rosenman:
> > Updated (current) doveconf -n attached....
>
> The delivered-to header tells me that the envelope has no detail part, which
> is what you're checking for using the "envelope" test. So, it is not strange
> that the test yields the empty string.
>
> There is a detail part in the "To:" header, but that would need to be tested
> using the "address" test.
>
> Is the envelope supposed to have a detail part? If yes, could you provide
> the (manual) protocol log of an LMTP session that in your assessment should
> have worked correctly?
>
> Regards,
>
> Stephan.
>
> > On Mon, Dec 25, 2017 at 04:33:16PM -0600, Larry Rosenman wrote:
> > > FTR, this is being delivered via LMTP from Exim using the recommended transport / director.
> > >
> > > headers from one of my tests:
> > > Return-Path: <[hidden email]>
> > > Delivered-To: [hidden email]
> > > Received: from thebighonker.lerctr.org
> > >          by thebighonker.lerctr.org with LMTP
> > >          id EW4ZBgV7QVoIDwAAu+mOrA
> > >          (envelope-from <[hidden email]>)
> > >          for <[hidden email]>; Mon, 25 Dec 2017 16:26:13 -0600
> > > Received: from ler by thebighonker.lerctr.org with local (Exim 4.90 (FreeBSD))
> > >          (envelope-from <[hidden email]>)
> > >          id 1eTbCH-0000zy-08
> > >          for [hidden email]; Mon, 25 Dec 2017 16:26:13 -0600
> > > To: [hidden email]
> > > Subject: test +
> > > Message-Id: <[hidden email]>
> > > From: Larry Rosenman <[hidden email]>
> > > Date: Mon, 25 Dec 2017 16:26:13 -0600
> > >
> > > logging:
> > > master: line 6: info: DEBUG: user=ler  detail= userfull=[hidden email].
> > > info: msgid=<[hidden email]>: stored mail into mailbox 'INBOX' (subject=test + from=[hidden email] size=648).
> > >
> > > so, what am I missing?
> > >
> > >
> > > On Mon, Dec 25, 2017 at 08:14:04AM -0600, Larry Rosenman wrote:
> > > > Using 2.3.0/0.5 and the below scripts/config, why doesn’t a mail addressed to [hidden email] get the FreeBSD flag?
> > > > .dovecot.sieve points to master.sieve.
> > > > Scripts:
> > > > http://www.lerctr.org/~ler/sieve/
> > > > doveconf -n:
> > > > thebighonker.lerctr.org /home/ler/sieve $ doveconf -n
> > > > # 2.3.0 (c8b89eb): /usr/local/etc/dovecot/dovecot.conf
> > > > # Pigeonhole version 0.5.0 (d68c23a1)
> > > > # OS: FreeBSD 11.1-STABLE amd64
> > > > auth_mechanisms = plain login
> > > > auth_realms = lerctr.org thebighonker.lerctr.org tbh.lerctr.org thejonesonair.com thejonesonair.net
> > > > default_vsz_limit = 1 G
> > > > deliver_log_format = msgid=%m: %$ (subject=%s from=%f size=%w)
> > > > doveadm_password =  # hidden, use -P to show it
> > > > first_valid_gid = 0
> > > > first_valid_uid = 0
> > > > lda_mailbox_autocreate = yes
> > > > listen = 192.147.25.65, ::
> > > > lmtp_save_to_detail_mailbox = yes
> > > > login_access_sockets = tcpwrap
> > > > mail_attribute_dict = file:%h/mail/.imap/dovecot-mail-attributes
> > > > mail_location = mbox:~/mail:INBOX=~/mail/INBOX
> > > > mail_log_prefix = "%s(%u/%p): "
> > > > mail_plugins = " fts fts_solr notify virtual"
> > > > mail_privileged_group = mail
> > > > mail_server_admin = mailto:[hidden email]
> > > > mail_server_comment = LERCTR Mail Server
> > > > 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 vacation-seconds editheader mboxmetadata servermetadata imapsieve vnd.dovecot.imapsieve
> > > > namespace archive {
> > > >    hidden = no
> > > >    list = no
> > > >    location = mbox:~/MAIL-ARCHIVE
> > > >    prefix = ARCHIVE/
> > > >    separator = /
> > > > }
> > > > namespace inbox {
> > > >    inbox = yes
> > > >    location =
> > > >    mailbox Drafts {
> > > >      special_use = \Drafts
> > > >    }
> > > >    mailbox INBOX {
> > > >      auto = create
> > > >    }
> > > >    mailbox SENT {
> > > >      special_use = \Sent
> > > >    }
> > > >    mailbox SPAM {
> > > >      special_use = \Junk
> > > >    }
> > > >    mailbox "Sent Messages" {
> > > >      special_use = \Sent
> > > >    }
> > > >    mailbox Trash {
> > > >      special_use = \Trash
> > > >    }
> > > >    mailbox virtual/Flagged {
> > > >      special_use = \Flagged
> > > >    }
> > > >    mailbox virtual/all {
> > > >      special_use = \All
> > > >    }
> > > >    prefix =
> > > >    separator = /
> > > > }
> > > > namespace virtual {
> > > >    hidden = no
> > > >    list = yes
> > > >    location = virtual:~/MAIL-VIRTUAL:INDEX=MEMORY
> > > >    prefix = Virtual/
> > > >    separator = /
> > > > }
> > > > passdb {
> > > >    args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
> > > >    driver = sql
> > > > }
> > > > passdb {
> > > >    args = user=%Ln noauthenticate
> > > >    driver = static
> > > >    skip = authenticated
> > > > }
> > > > passdb {
> > > >    args = failure_show_msg=yes session=yes max_requests=20
> > > >    driver = pam
> > > >    skip = authenticated
> > > > }
> > > > plugin {
> > > >    fts = solr
> > > >    fts_autoindex = yes
> > > >    fts_solr = url=http://thebighonker.lerctr.org:8983/solr/dovecot/
> > > >    fts_tika = http://localhost:9998/tika/
> > > >    imapsieve_mailbox1_before = file:/usr/local/share/dovecot-pigeonhole/sieve/report-spam.sieve
> > > >    imapsieve_mailbox1_causes = COPY
> > > >    imapsieve_mailbox1_name = SPAM
> > > >    imapsieve_mailbox2_before = file:/usr/local/share/dovecot-pigeonhole/sieve/report-ham.sieve
> > > >    imapsieve_mailbox2_causes = COPY
> > > >    imapsieve_mailbox2_from = SPAM
> > > >    imapsieve_mailbox2_name = *
> > > >    imapsieve_url = sieve://thebighonker.lerctr.org
> > > >    mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename flag_change append
> > > >    mail_log_fields = uid box msgid size from subject vsize flags
> > > >    sieve = ~/.dovecot.sieve
> > > >    sieve_dir = ~/sieve
> > > >    sieve_execute_bin_dir = /usr/local/share/dovecot-pigeonhole/sieve
> > > >    sieve_extensions = +editheader +vacation-seconds +mboxmetadata +servermetadata
> > > >    sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.execute
> > > >    sieve_pipe_bin_dir = /usr/local/share/dovecot-pigeonhole/sieve
> > > >    sieve_plugins = sieve_imapsieve sieve_extprograms
> > > > }
> > > > protocols = imap pop3 lmtp sieve
> > > > recipient_delimiter = +-_
> > > > service anvil {
> > > >    unix_listener anvil {
> > > >      group = mail
> > > >      mode = 0660
> > > >    }
> > > > }
> > > > service auth {
> > > >    unix_listener auth-client {
> > > >      mode = 0666
> > > >    }
> > > >    unix_listener auth-master {
> > > >      mode = 0666
> > > >    }
> > > > }
> > > > service doveadm {
> > > >    inet_listener http {
> > > >      port = 8080
> > > >      ssl = yes
> > > >    }
> > > > }
> > > > service indexer-worker {
> > > >    drop_priv_before_exec = yes
> > > > }
> > > > service lmtp {
> > > >    inet_listener lmtp {
> > > >      address = 127.0.0.1
> > > >      port = 24
> > > >    }
> > > > }
> > > > service managesieve-login {
> > > >    inet_listener sieve {
> > > >      port = 4190
> > > >    }
> > > >    inet_listener sieve_deprecated {
> > > >      port = 2000
> > > >    }
> > > > }
> > > > service stats {
> > > >    unix_listener stats-reader {
> > > >      group = mail
> > > >      mode = 0660
> > > >      user =
> > > >    }
> > > >    unix_listener stats-writer {
> > > >      group = mail
> > > >      mode = 0660
> > > >      user =
> > > >    }
> > > > }
> > > > service tcpwrap {
> > > >    unix_listener login/tcpwrap {
> > > >      group = $default_login_user
> > > >      mode = 0600
> > > >      user = $default_login_user
> > > >    }
> > > > }
> > > > ssl_cert = </home/ler/letsencrypt-home/lerctr.org/fullchain.cer
> > > > ssl_cipher_list = EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH+AESGCM:EECDH:EDH+AESGCM:EDH+aRSA:HIGH:!MEDIUM:!LOW:!aNULL:!eNULL:!LOW:!RC4:!MD5:!EXP:!PSK:!SRP:!DSS
> > > > ssl_dh =  # hidden, use -P to show it
> > > > ssl_key =  # hidden, use -P to show it
> > > > userdb {
> > > >    args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
> > > >    driver = sql
> > > > }
> > > > userdb {
> > > >    args = username_format=%Ln /etc/passwd
> > > >    driver = passwd-file
> > > > }
> > > > verbose_proctitle = yes
> > > > protocol lmtp {
> > > >    mail_plugins = " fts fts_solr notify virtual sieve mail_log"
> > > > }
> > > > protocol lda {
> > > >    mail_plugins = " fts fts_solr notify virtual sieve mail_log"
> > > > }
> > > > protocol pop3 {
> > > >    mail_plugins = " fts fts_solr notify virtual mail_log"
> > > > }
> > > > protocol !doveadm {
> > > >    mail_plugins = " fts fts_solr notify virtual mail_log"
> > > > }
> > > > protocol imap {
> > > >    imap_client_workarounds = tb-extra-mailbox-sep tb-lsub-flags
> > > >    imap_logout_format = in=%i out=%o fhc=%{fetch_hdr_count} fhb=%{fetch_hdr_bytes} fbc=%{fetch_body_count} fbb=%{fetch_body_bytes} del=%{deleted} exp=%{expunged} trash=%{trashed}
> > > >    imap_metadata = yes
> > > >    mail_max_userip_connections = 50
> > > >    mail_plugins = " fts fts_solr notify virtual mail_log imap_sieve"
> > > > }
> > > > thebighonker.lerctr.org /home/ler/sieve $
> > > >
> > > > --
> > > > Larry Rosenman                     http://www.lerctr.org/~ler
> > > > Phone: +1 214-642-9640             E-Mail: [hidden email]
> > > > US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106
> > > --
> > > Larry Rosenman                     http://www.lerctr.org/~ler
> > > Phone: +1 214-642-9640             E-Mail: [hidden email]
> > > US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106
>

--
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 214-642-9640             E-Mail: [hidden email]
US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106