How to configure Dovecot/Pigeonhole using MySQL authentication Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern) Come Celebrate our 10 Year Anniversary!LDAP based virtual domain set-up for DovecotThunderbird doesn't show folders on a new Dovecot installPostfix/Dovecot support multiple domainsRelay access denied when not send from server itselfvacation feature horde5, dovecot2, sieveDovecot Quotas are not recalculated nor is mail rejected if quota is exceededwarning: /usr/lib/postfix/smtpd: bad command startup — throttlingDovecot – Can send, not receive mail (visable in mail queue) Where is email?Postifx Dovecot lmtp, sieve not workingdovecot cannot lookup user in LDAP

How do I find out the mythology and history of my Fortress?

Why weren't discrete x86 CPUs ever used in game hardware?

How to install press fit bottom bracket into new frame

Why does it sometimes sound good to play a grace note as a lead in to a note in a melody?

Illegal assignment from sObject to Id

Question about debouncing - delay of state change

Why do we bend a book to keep it straight?

How to tell that you are a giant?

Amount of permutations on an NxNxN Rubik's Cube

Has negative voting ever been officially implemented in elections, or seriously proposed, or even studied?

Is there hard evidence that the grant peer review system performs significantly better than random?

How does light 'choose' between wave and particle behaviour?

When a candle burns, why does the top of wick glow if bottom of flame is hottest?

Sum letters are not two different

Why is the AVR GCC compiler using a full `CALL` even though I have set the `-mshort-calls` flag?

How can I reduce the gap between left and right of cdot with a macro?

How to react to hostile behavior from a senior developer?

Is there any word for a place full of confusion?

How do I use the new nonlinear finite element in Mathematica 12 for this equation?

Morning, Afternoon, Night Kanji

Do any jurisdictions seriously consider reclassifying social media websites as publishers?

How often does castling occur in grandmaster games?

What is this clumpy 20-30cm high yellow-flowered plant?

Most bit efficient text communication method?



How to configure Dovecot/Pigeonhole using MySQL authentication



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)
Come Celebrate our 10 Year Anniversary!LDAP based virtual domain set-up for DovecotThunderbird doesn't show folders on a new Dovecot installPostfix/Dovecot support multiple domainsRelay access denied when not send from server itselfvacation feature horde5, dovecot2, sieveDovecot Quotas are not recalculated nor is mail rejected if quota is exceededwarning: /usr/lib/postfix/smtpd: bad command startup — throttlingDovecot – Can send, not receive mail (visable in mail queue) Where is email?Postifx Dovecot lmtp, sieve not workingdovecot cannot lookup user in LDAP



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I have a working Dovecot server with Spamassassin. I can receive mail with Thunderbird and Bluemail clients. I use smtp2go to send mail out.



I want to configure Pigeonhole Sieve but find the configuration to be very daunting.



All mail is delivered to virtual mailboxes defined in the MySQL database. They go to /var/mail/vhosts. I am only hosting one domain right now.



So, what is the simplest way to set this up? All I basically want to do right now is have spam sent to the spam folder for each user.
Output of dovecot -n:



# 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21 (92477967)
# OS: Linux 4.15.0-47-generic x86_64 Ubuntu 18.04.2 LTS ext4
auth_mechanisms = plain login
log_path = /var/log/dovecot.log
mail_location = maildir:/var/mail/vhosts/%d/%n/
mail_privileged_group = mail
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
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
args = /etc/dovecot/deny-users
deny = yes
driver = passwd-file

passdb
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql

postmaster_address = dev@vietfeir.com
protocols = imap lmtp sieve
service auth-worker
user = vmail

service auth
unix_listener /var/spool/postfix/private/auth
group = postfix
mode = 0666
user = postfix

unix_listener auth-userdb
mode = 0600
user = vmail

user = dovecot

service imap-login
inet_listener imap
port = 0

inet_listener imaps
port = 993
ssl = yes


service lmtp
unix_listener /var/spool/postfix/private/dovecot-lmtp
group = postfix
mode = 0600
user = postfix


service pop3-login
inet_listener pop3
port = 0

inet_listener pop3s
port = 995
ssl = yes


ssl = required
ssl_cert = </etc/letsencrypt/live/civicrm.vietfeir.com/fullchain.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_key = # hidden, use -P to show it
userdb
driver = passwd

userdb
args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
driver = static



Here is the current dovecot -n output:



# 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21 (92477967)
# OS: Linux 4.15.0-47-generic x86_64 Ubuntu 18.04.2 LTS ext4
auth_mechanisms = plain login
lda_mailbox_autocreate = yes
log_path = /var/log/dovecot.log
mail_location = maildir:/var/mail/vhosts/%d/%n/
mail_privileged_group = mail
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
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 Spam
auto = subscribe
special_use = Junk

mailbox Trash
special_use = Trash

prefix =

passdb
args = /etc/dovecot/deny-users
deny = yes
driver = passwd-file

passdb
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql

plugin
sieve_before = /var/mail/before.svbin
sieve_extensions = +fileinto
sieve_trace_dir = /var/log
sieve_trace_level = matching

postmaster_address = dev@vietfeir.com
protocols = imap lmtp
service auth-worker
user = vmail

service auth
unix_listener /var/spool/postfix/private/auth
group = postfix
mode = 0666
user = postfix

unix_listener auth-userdb
mode = 0600
user = vmail

user = dovecot

service imap-login
inet_listener imap
port = 0

inet_listener imaps
port = 993
ssl = yes


service lmtp
unix_listener /var/spool/postfix/private/dovecot-lmtp
group = postfix
mode = 0600
user = postfix


service pop3-login
inet_listener pop3
port = 0

inet_listener pop3s
port = 995
ssl = yes


ssl = required
ssl_cert = </etc/letsencrypt/live/civicrm.vietfeir.com/fullchain.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_key = # hidden, use -P to show it
userdb
driver = passwd

userdb
args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
driver = static



Note: I have tried referring to the before.sieve and before.svbin with no difference.



Here is the log:



 ## Started executing script 'before'
2: header test
2: starting `:contains' match with `i;ascii-casemap' comparator:
2: extracting `X-Spam-Level' headers from message
2: matching value `**************************************************'
2: with key `*****' => 1
2: finishing match with result: matched
2: jump if result is false
2: not jumping
3: fileinto action
3: store message in mailbox `Hormel'
4: stop command; end all script execution
## Finished executing script 'before'


It indicates that the message was stored in mailbox 'Hormel' but it did not create the mailbox.










share|improve this question
























  • You should probably specify how you intend to use ManageSieve and how the distribution-provided config was insufficient for your needs.

    – anx
    Apr 13 at 21:15











  • I hadn't started thinking about ManageSieve yet.

    – Vietyank
    Apr 13 at 23:48











  • In that case, start investigating how managesieve related configuration got in there.

    – anx
    Apr 14 at 0:27











  • Which specific specification?

    – Vietyank
    Apr 14 at 1:33











  • Okay...I see what your talking about under protocols

    – Vietyank
    Apr 14 at 1:43

















0















I have a working Dovecot server with Spamassassin. I can receive mail with Thunderbird and Bluemail clients. I use smtp2go to send mail out.



I want to configure Pigeonhole Sieve but find the configuration to be very daunting.



All mail is delivered to virtual mailboxes defined in the MySQL database. They go to /var/mail/vhosts. I am only hosting one domain right now.



So, what is the simplest way to set this up? All I basically want to do right now is have spam sent to the spam folder for each user.
Output of dovecot -n:



# 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21 (92477967)
# OS: Linux 4.15.0-47-generic x86_64 Ubuntu 18.04.2 LTS ext4
auth_mechanisms = plain login
log_path = /var/log/dovecot.log
mail_location = maildir:/var/mail/vhosts/%d/%n/
mail_privileged_group = mail
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
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
args = /etc/dovecot/deny-users
deny = yes
driver = passwd-file

passdb
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql

postmaster_address = dev@vietfeir.com
protocols = imap lmtp sieve
service auth-worker
user = vmail

service auth
unix_listener /var/spool/postfix/private/auth
group = postfix
mode = 0666
user = postfix

unix_listener auth-userdb
mode = 0600
user = vmail

user = dovecot

service imap-login
inet_listener imap
port = 0

inet_listener imaps
port = 993
ssl = yes


service lmtp
unix_listener /var/spool/postfix/private/dovecot-lmtp
group = postfix
mode = 0600
user = postfix


service pop3-login
inet_listener pop3
port = 0

inet_listener pop3s
port = 995
ssl = yes


ssl = required
ssl_cert = </etc/letsencrypt/live/civicrm.vietfeir.com/fullchain.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_key = # hidden, use -P to show it
userdb
driver = passwd

userdb
args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
driver = static



Here is the current dovecot -n output:



# 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21 (92477967)
# OS: Linux 4.15.0-47-generic x86_64 Ubuntu 18.04.2 LTS ext4
auth_mechanisms = plain login
lda_mailbox_autocreate = yes
log_path = /var/log/dovecot.log
mail_location = maildir:/var/mail/vhosts/%d/%n/
mail_privileged_group = mail
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
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 Spam
auto = subscribe
special_use = Junk

mailbox Trash
special_use = Trash

prefix =

passdb
args = /etc/dovecot/deny-users
deny = yes
driver = passwd-file

passdb
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql

plugin
sieve_before = /var/mail/before.svbin
sieve_extensions = +fileinto
sieve_trace_dir = /var/log
sieve_trace_level = matching

postmaster_address = dev@vietfeir.com
protocols = imap lmtp
service auth-worker
user = vmail

service auth
unix_listener /var/spool/postfix/private/auth
group = postfix
mode = 0666
user = postfix

unix_listener auth-userdb
mode = 0600
user = vmail

user = dovecot

service imap-login
inet_listener imap
port = 0

inet_listener imaps
port = 993
ssl = yes


service lmtp
unix_listener /var/spool/postfix/private/dovecot-lmtp
group = postfix
mode = 0600
user = postfix


service pop3-login
inet_listener pop3
port = 0

inet_listener pop3s
port = 995
ssl = yes


ssl = required
ssl_cert = </etc/letsencrypt/live/civicrm.vietfeir.com/fullchain.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_key = # hidden, use -P to show it
userdb
driver = passwd

userdb
args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
driver = static



Note: I have tried referring to the before.sieve and before.svbin with no difference.



Here is the log:



 ## Started executing script 'before'
2: header test
2: starting `:contains' match with `i;ascii-casemap' comparator:
2: extracting `X-Spam-Level' headers from message
2: matching value `**************************************************'
2: with key `*****' => 1
2: finishing match with result: matched
2: jump if result is false
2: not jumping
3: fileinto action
3: store message in mailbox `Hormel'
4: stop command; end all script execution
## Finished executing script 'before'


It indicates that the message was stored in mailbox 'Hormel' but it did not create the mailbox.










share|improve this question
























  • You should probably specify how you intend to use ManageSieve and how the distribution-provided config was insufficient for your needs.

    – anx
    Apr 13 at 21:15











  • I hadn't started thinking about ManageSieve yet.

    – Vietyank
    Apr 13 at 23:48











  • In that case, start investigating how managesieve related configuration got in there.

    – anx
    Apr 14 at 0:27











  • Which specific specification?

    – Vietyank
    Apr 14 at 1:33











  • Okay...I see what your talking about under protocols

    – Vietyank
    Apr 14 at 1:43













0












0








0








I have a working Dovecot server with Spamassassin. I can receive mail with Thunderbird and Bluemail clients. I use smtp2go to send mail out.



I want to configure Pigeonhole Sieve but find the configuration to be very daunting.



All mail is delivered to virtual mailboxes defined in the MySQL database. They go to /var/mail/vhosts. I am only hosting one domain right now.



So, what is the simplest way to set this up? All I basically want to do right now is have spam sent to the spam folder for each user.
Output of dovecot -n:



# 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21 (92477967)
# OS: Linux 4.15.0-47-generic x86_64 Ubuntu 18.04.2 LTS ext4
auth_mechanisms = plain login
log_path = /var/log/dovecot.log
mail_location = maildir:/var/mail/vhosts/%d/%n/
mail_privileged_group = mail
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
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
args = /etc/dovecot/deny-users
deny = yes
driver = passwd-file

passdb
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql

postmaster_address = dev@vietfeir.com
protocols = imap lmtp sieve
service auth-worker
user = vmail

service auth
unix_listener /var/spool/postfix/private/auth
group = postfix
mode = 0666
user = postfix

unix_listener auth-userdb
mode = 0600
user = vmail

user = dovecot

service imap-login
inet_listener imap
port = 0

inet_listener imaps
port = 993
ssl = yes


service lmtp
unix_listener /var/spool/postfix/private/dovecot-lmtp
group = postfix
mode = 0600
user = postfix


service pop3-login
inet_listener pop3
port = 0

inet_listener pop3s
port = 995
ssl = yes


ssl = required
ssl_cert = </etc/letsencrypt/live/civicrm.vietfeir.com/fullchain.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_key = # hidden, use -P to show it
userdb
driver = passwd

userdb
args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
driver = static



Here is the current dovecot -n output:



# 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21 (92477967)
# OS: Linux 4.15.0-47-generic x86_64 Ubuntu 18.04.2 LTS ext4
auth_mechanisms = plain login
lda_mailbox_autocreate = yes
log_path = /var/log/dovecot.log
mail_location = maildir:/var/mail/vhosts/%d/%n/
mail_privileged_group = mail
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
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 Spam
auto = subscribe
special_use = Junk

mailbox Trash
special_use = Trash

prefix =

passdb
args = /etc/dovecot/deny-users
deny = yes
driver = passwd-file

passdb
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql

plugin
sieve_before = /var/mail/before.svbin
sieve_extensions = +fileinto
sieve_trace_dir = /var/log
sieve_trace_level = matching

postmaster_address = dev@vietfeir.com
protocols = imap lmtp
service auth-worker
user = vmail

service auth
unix_listener /var/spool/postfix/private/auth
group = postfix
mode = 0666
user = postfix

unix_listener auth-userdb
mode = 0600
user = vmail

user = dovecot

service imap-login
inet_listener imap
port = 0

inet_listener imaps
port = 993
ssl = yes


service lmtp
unix_listener /var/spool/postfix/private/dovecot-lmtp
group = postfix
mode = 0600
user = postfix


service pop3-login
inet_listener pop3
port = 0

inet_listener pop3s
port = 995
ssl = yes


ssl = required
ssl_cert = </etc/letsencrypt/live/civicrm.vietfeir.com/fullchain.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_key = # hidden, use -P to show it
userdb
driver = passwd

userdb
args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
driver = static



Note: I have tried referring to the before.sieve and before.svbin with no difference.



Here is the log:



 ## Started executing script 'before'
2: header test
2: starting `:contains' match with `i;ascii-casemap' comparator:
2: extracting `X-Spam-Level' headers from message
2: matching value `**************************************************'
2: with key `*****' => 1
2: finishing match with result: matched
2: jump if result is false
2: not jumping
3: fileinto action
3: store message in mailbox `Hormel'
4: stop command; end all script execution
## Finished executing script 'before'


It indicates that the message was stored in mailbox 'Hormel' but it did not create the mailbox.










share|improve this question
















I have a working Dovecot server with Spamassassin. I can receive mail with Thunderbird and Bluemail clients. I use smtp2go to send mail out.



I want to configure Pigeonhole Sieve but find the configuration to be very daunting.



All mail is delivered to virtual mailboxes defined in the MySQL database. They go to /var/mail/vhosts. I am only hosting one domain right now.



So, what is the simplest way to set this up? All I basically want to do right now is have spam sent to the spam folder for each user.
Output of dovecot -n:



# 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21 (92477967)
# OS: Linux 4.15.0-47-generic x86_64 Ubuntu 18.04.2 LTS ext4
auth_mechanisms = plain login
log_path = /var/log/dovecot.log
mail_location = maildir:/var/mail/vhosts/%d/%n/
mail_privileged_group = mail
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
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
args = /etc/dovecot/deny-users
deny = yes
driver = passwd-file

passdb
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql

postmaster_address = dev@vietfeir.com
protocols = imap lmtp sieve
service auth-worker
user = vmail

service auth
unix_listener /var/spool/postfix/private/auth
group = postfix
mode = 0666
user = postfix

unix_listener auth-userdb
mode = 0600
user = vmail

user = dovecot

service imap-login
inet_listener imap
port = 0

inet_listener imaps
port = 993
ssl = yes


service lmtp
unix_listener /var/spool/postfix/private/dovecot-lmtp
group = postfix
mode = 0600
user = postfix


service pop3-login
inet_listener pop3
port = 0

inet_listener pop3s
port = 995
ssl = yes


ssl = required
ssl_cert = </etc/letsencrypt/live/civicrm.vietfeir.com/fullchain.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_key = # hidden, use -P to show it
userdb
driver = passwd

userdb
args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
driver = static



Here is the current dovecot -n output:



# 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21 (92477967)
# OS: Linux 4.15.0-47-generic x86_64 Ubuntu 18.04.2 LTS ext4
auth_mechanisms = plain login
lda_mailbox_autocreate = yes
log_path = /var/log/dovecot.log
mail_location = maildir:/var/mail/vhosts/%d/%n/
mail_privileged_group = mail
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
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 Spam
auto = subscribe
special_use = Junk

mailbox Trash
special_use = Trash

prefix =

passdb
args = /etc/dovecot/deny-users
deny = yes
driver = passwd-file

passdb
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql

plugin
sieve_before = /var/mail/before.svbin
sieve_extensions = +fileinto
sieve_trace_dir = /var/log
sieve_trace_level = matching

postmaster_address = dev@vietfeir.com
protocols = imap lmtp
service auth-worker
user = vmail

service auth
unix_listener /var/spool/postfix/private/auth
group = postfix
mode = 0666
user = postfix

unix_listener auth-userdb
mode = 0600
user = vmail

user = dovecot

service imap-login
inet_listener imap
port = 0

inet_listener imaps
port = 993
ssl = yes


service lmtp
unix_listener /var/spool/postfix/private/dovecot-lmtp
group = postfix
mode = 0600
user = postfix


service pop3-login
inet_listener pop3
port = 0

inet_listener pop3s
port = 995
ssl = yes


ssl = required
ssl_cert = </etc/letsencrypt/live/civicrm.vietfeir.com/fullchain.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_key = # hidden, use -P to show it
userdb
driver = passwd

userdb
args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
driver = static



Note: I have tried referring to the before.sieve and before.svbin with no difference.



Here is the log:



 ## Started executing script 'before'
2: header test
2: starting `:contains' match with `i;ascii-casemap' comparator:
2: extracting `X-Spam-Level' headers from message
2: matching value `**************************************************'
2: with key `*****' => 1
2: finishing match with result: matched
2: jump if result is false
2: not jumping
3: fileinto action
3: store message in mailbox `Hormel'
4: stop command; end all script execution
## Finished executing script 'before'


It indicates that the message was stored in mailbox 'Hormel' but it did not create the mailbox.







dovecot sieve






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 14 at 4:07







Vietyank

















asked Apr 13 at 7:10









VietyankVietyank

1035




1035












  • You should probably specify how you intend to use ManageSieve and how the distribution-provided config was insufficient for your needs.

    – anx
    Apr 13 at 21:15











  • I hadn't started thinking about ManageSieve yet.

    – Vietyank
    Apr 13 at 23:48











  • In that case, start investigating how managesieve related configuration got in there.

    – anx
    Apr 14 at 0:27











  • Which specific specification?

    – Vietyank
    Apr 14 at 1:33











  • Okay...I see what your talking about under protocols

    – Vietyank
    Apr 14 at 1:43

















  • You should probably specify how you intend to use ManageSieve and how the distribution-provided config was insufficient for your needs.

    – anx
    Apr 13 at 21:15











  • I hadn't started thinking about ManageSieve yet.

    – Vietyank
    Apr 13 at 23:48











  • In that case, start investigating how managesieve related configuration got in there.

    – anx
    Apr 14 at 0:27











  • Which specific specification?

    – Vietyank
    Apr 14 at 1:33











  • Okay...I see what your talking about under protocols

    – Vietyank
    Apr 14 at 1:43
















You should probably specify how you intend to use ManageSieve and how the distribution-provided config was insufficient for your needs.

– anx
Apr 13 at 21:15





You should probably specify how you intend to use ManageSieve and how the distribution-provided config was insufficient for your needs.

– anx
Apr 13 at 21:15













I hadn't started thinking about ManageSieve yet.

– Vietyank
Apr 13 at 23:48





I hadn't started thinking about ManageSieve yet.

– Vietyank
Apr 13 at 23:48













In that case, start investigating how managesieve related configuration got in there.

– anx
Apr 14 at 0:27





In that case, start investigating how managesieve related configuration got in there.

– anx
Apr 14 at 0:27













Which specific specification?

– Vietyank
Apr 14 at 1:33





Which specific specification?

– Vietyank
Apr 14 at 1:33













Okay...I see what your talking about under protocols

– Vietyank
Apr 14 at 1:43





Okay...I see what your talking about under protocols

– Vietyank
Apr 14 at 1:43










1 Answer
1






active

oldest

votes


















1














I do not see anything in your current config that would prevent you from simply adding another sieve file in front of any user-configured ones:



protocol lmtp 
mail_plugins = $mail_plugins sieve

plugin
sieve_before = /var/mail/before.sieve
sieve_extensions = +fileinto +mailbox



This gives you a /var/mail/before.sieve file to be executed before any other sieve script. You could move mails based on some header you know your spam filtering adds for you:



 require ["fileinto", "mailbox"];
if header :contains "X-Spam-Level" "*****"
fileinto :create "Junk";
stop;



This file does not need to be writable as long as you manually compile it using sievec /var/mail/before.sieve (creating /var/mail/before.svbin)



Before you implement something like this, please check whether this is really useful to all your users - maybe they want to filter their mail differently, then sieve_default might be more appropriate.






share|improve this answer

























  • Actually, I am the only user currently. If I add others, I'll move on from here.

    – Vietyank
    Apr 13 at 23:49











  • I get an error when I try to compile your example. before: line 3: error: unknown tagged argument ':create' for the fileinto command (reported only once at first occurrence). I'm still searching but haven't found an answer

    – Vietyank
    Apr 14 at 0:28












  • My mistake, :create is actually part of another sieve extensions, afair its "mailbox". Check my edit.

    – anx
    Apr 14 at 0:31











  • It compiled okay but spam is not being moved into the folder specified. I've tried checking for another string, if header :contains "X-Spam-Flag" "YES" , but no luck there either.

    – Vietyank
    Apr 14 at 0:59






  • 1





    I discovered that it actually creates a folder but does not subscribe to it. This answer got me started and, with a bit of perseverance, I got this "simple" requirement working. Many thanks.

    – Vietyank
    Apr 14 at 9:18











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f962890%2fhow-to-configure-dovecot-pigeonhole-using-mysql-authentication%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














I do not see anything in your current config that would prevent you from simply adding another sieve file in front of any user-configured ones:



protocol lmtp 
mail_plugins = $mail_plugins sieve

plugin
sieve_before = /var/mail/before.sieve
sieve_extensions = +fileinto +mailbox



This gives you a /var/mail/before.sieve file to be executed before any other sieve script. You could move mails based on some header you know your spam filtering adds for you:



 require ["fileinto", "mailbox"];
if header :contains "X-Spam-Level" "*****"
fileinto :create "Junk";
stop;



This file does not need to be writable as long as you manually compile it using sievec /var/mail/before.sieve (creating /var/mail/before.svbin)



Before you implement something like this, please check whether this is really useful to all your users - maybe they want to filter their mail differently, then sieve_default might be more appropriate.






share|improve this answer

























  • Actually, I am the only user currently. If I add others, I'll move on from here.

    – Vietyank
    Apr 13 at 23:49











  • I get an error when I try to compile your example. before: line 3: error: unknown tagged argument ':create' for the fileinto command (reported only once at first occurrence). I'm still searching but haven't found an answer

    – Vietyank
    Apr 14 at 0:28












  • My mistake, :create is actually part of another sieve extensions, afair its "mailbox". Check my edit.

    – anx
    Apr 14 at 0:31











  • It compiled okay but spam is not being moved into the folder specified. I've tried checking for another string, if header :contains "X-Spam-Flag" "YES" , but no luck there either.

    – Vietyank
    Apr 14 at 0:59






  • 1





    I discovered that it actually creates a folder but does not subscribe to it. This answer got me started and, with a bit of perseverance, I got this "simple" requirement working. Many thanks.

    – Vietyank
    Apr 14 at 9:18















1














I do not see anything in your current config that would prevent you from simply adding another sieve file in front of any user-configured ones:



protocol lmtp 
mail_plugins = $mail_plugins sieve

plugin
sieve_before = /var/mail/before.sieve
sieve_extensions = +fileinto +mailbox



This gives you a /var/mail/before.sieve file to be executed before any other sieve script. You could move mails based on some header you know your spam filtering adds for you:



 require ["fileinto", "mailbox"];
if header :contains "X-Spam-Level" "*****"
fileinto :create "Junk";
stop;



This file does not need to be writable as long as you manually compile it using sievec /var/mail/before.sieve (creating /var/mail/before.svbin)



Before you implement something like this, please check whether this is really useful to all your users - maybe they want to filter their mail differently, then sieve_default might be more appropriate.






share|improve this answer

























  • Actually, I am the only user currently. If I add others, I'll move on from here.

    – Vietyank
    Apr 13 at 23:49











  • I get an error when I try to compile your example. before: line 3: error: unknown tagged argument ':create' for the fileinto command (reported only once at first occurrence). I'm still searching but haven't found an answer

    – Vietyank
    Apr 14 at 0:28












  • My mistake, :create is actually part of another sieve extensions, afair its "mailbox". Check my edit.

    – anx
    Apr 14 at 0:31











  • It compiled okay but spam is not being moved into the folder specified. I've tried checking for another string, if header :contains "X-Spam-Flag" "YES" , but no luck there either.

    – Vietyank
    Apr 14 at 0:59






  • 1





    I discovered that it actually creates a folder but does not subscribe to it. This answer got me started and, with a bit of perseverance, I got this "simple" requirement working. Many thanks.

    – Vietyank
    Apr 14 at 9:18













1












1








1







I do not see anything in your current config that would prevent you from simply adding another sieve file in front of any user-configured ones:



protocol lmtp 
mail_plugins = $mail_plugins sieve

plugin
sieve_before = /var/mail/before.sieve
sieve_extensions = +fileinto +mailbox



This gives you a /var/mail/before.sieve file to be executed before any other sieve script. You could move mails based on some header you know your spam filtering adds for you:



 require ["fileinto", "mailbox"];
if header :contains "X-Spam-Level" "*****"
fileinto :create "Junk";
stop;



This file does not need to be writable as long as you manually compile it using sievec /var/mail/before.sieve (creating /var/mail/before.svbin)



Before you implement something like this, please check whether this is really useful to all your users - maybe they want to filter their mail differently, then sieve_default might be more appropriate.






share|improve this answer















I do not see anything in your current config that would prevent you from simply adding another sieve file in front of any user-configured ones:



protocol lmtp 
mail_plugins = $mail_plugins sieve

plugin
sieve_before = /var/mail/before.sieve
sieve_extensions = +fileinto +mailbox



This gives you a /var/mail/before.sieve file to be executed before any other sieve script. You could move mails based on some header you know your spam filtering adds for you:



 require ["fileinto", "mailbox"];
if header :contains "X-Spam-Level" "*****"
fileinto :create "Junk";
stop;



This file does not need to be writable as long as you manually compile it using sievec /var/mail/before.sieve (creating /var/mail/before.svbin)



Before you implement something like this, please check whether this is really useful to all your users - maybe they want to filter their mail differently, then sieve_default might be more appropriate.







share|improve this answer














share|improve this answer



share|improve this answer








edited Apr 14 at 1:29

























answered Apr 13 at 20:31









anxanx

1,9701822




1,9701822












  • Actually, I am the only user currently. If I add others, I'll move on from here.

    – Vietyank
    Apr 13 at 23:49











  • I get an error when I try to compile your example. before: line 3: error: unknown tagged argument ':create' for the fileinto command (reported only once at first occurrence). I'm still searching but haven't found an answer

    – Vietyank
    Apr 14 at 0:28












  • My mistake, :create is actually part of another sieve extensions, afair its "mailbox". Check my edit.

    – anx
    Apr 14 at 0:31











  • It compiled okay but spam is not being moved into the folder specified. I've tried checking for another string, if header :contains "X-Spam-Flag" "YES" , but no luck there either.

    – Vietyank
    Apr 14 at 0:59






  • 1





    I discovered that it actually creates a folder but does not subscribe to it. This answer got me started and, with a bit of perseverance, I got this "simple" requirement working. Many thanks.

    – Vietyank
    Apr 14 at 9:18

















  • Actually, I am the only user currently. If I add others, I'll move on from here.

    – Vietyank
    Apr 13 at 23:49











  • I get an error when I try to compile your example. before: line 3: error: unknown tagged argument ':create' for the fileinto command (reported only once at first occurrence). I'm still searching but haven't found an answer

    – Vietyank
    Apr 14 at 0:28












  • My mistake, :create is actually part of another sieve extensions, afair its "mailbox". Check my edit.

    – anx
    Apr 14 at 0:31











  • It compiled okay but spam is not being moved into the folder specified. I've tried checking for another string, if header :contains "X-Spam-Flag" "YES" , but no luck there either.

    – Vietyank
    Apr 14 at 0:59






  • 1





    I discovered that it actually creates a folder but does not subscribe to it. This answer got me started and, with a bit of perseverance, I got this "simple" requirement working. Many thanks.

    – Vietyank
    Apr 14 at 9:18
















Actually, I am the only user currently. If I add others, I'll move on from here.

– Vietyank
Apr 13 at 23:49





Actually, I am the only user currently. If I add others, I'll move on from here.

– Vietyank
Apr 13 at 23:49













I get an error when I try to compile your example. before: line 3: error: unknown tagged argument ':create' for the fileinto command (reported only once at first occurrence). I'm still searching but haven't found an answer

– Vietyank
Apr 14 at 0:28






I get an error when I try to compile your example. before: line 3: error: unknown tagged argument ':create' for the fileinto command (reported only once at first occurrence). I'm still searching but haven't found an answer

– Vietyank
Apr 14 at 0:28














My mistake, :create is actually part of another sieve extensions, afair its "mailbox". Check my edit.

– anx
Apr 14 at 0:31





My mistake, :create is actually part of another sieve extensions, afair its "mailbox". Check my edit.

– anx
Apr 14 at 0:31













It compiled okay but spam is not being moved into the folder specified. I've tried checking for another string, if header :contains "X-Spam-Flag" "YES" , but no luck there either.

– Vietyank
Apr 14 at 0:59





It compiled okay but spam is not being moved into the folder specified. I've tried checking for another string, if header :contains "X-Spam-Flag" "YES" , but no luck there either.

– Vietyank
Apr 14 at 0:59




1




1





I discovered that it actually creates a folder but does not subscribe to it. This answer got me started and, with a bit of perseverance, I got this "simple" requirement working. Many thanks.

– Vietyank
Apr 14 at 9:18





I discovered that it actually creates a folder but does not subscribe to it. This answer got me started and, with a bit of perseverance, I got this "simple" requirement working. Many thanks.

– Vietyank
Apr 14 at 9:18

















draft saved

draft discarded
















































Thanks for contributing an answer to Server Fault!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f962890%2fhow-to-configure-dovecot-pigeonhole-using-mysql-authentication%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020