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

Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company