Re: [Dovecot] Move messages marked as Spam
On Thu, 2009-10-08 at 14:46 +0200, Steffen Kaiser wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Thu, 8 Oct 2009, mic...@casa.co.cu wrote: > > > if header :contains "X-Bogosity" "Spam" { > > fileinto "Spam"; > > stop; > > } > > > > server log > > > > mailserver deliver(mic...@casa.co.cu): > > msgid=<1255000600.4acdca18a3...@webmail.sld.cu>: saved mail to Spam > > > > > > I dont know why move all messages , when in the script is only for messages > > marked as "Spam". > > > > I checked the message headers are right > > > > X-Bogosity: Ham, tests=bogofilter, spamicity=0.00, version=1.2.1 > ^ > > There is the word "Spam" you search for. > > Look at RFC 3028 sec. 2.7.3, I think you need > > if header :contains :comparator "i;octet" > > to have a case-sensitive match. > > I thought there is a ":begin" match type, but the RFC does not list it. > > Or use > > if header :contains "X-Bogosity" "Spam, " { > > Note the ", " . > > Bye, > > - -- > Steffen Kaiser > -BEGIN PGP SIGNATURE- the problem was in the script. All messages were moved to the Spam folder because spamicity word. Thanks
Re: [Dovecot] Move messages marked as Spam
On Wed, 2009-10-07 at 18:39 +0200, Thomas Leuxner wrote: > Am 07.10.2009 um 18:29 schrieb mic...@casa.co.cu: > >> There is an option of deliver to control this -n: > >> http://wiki.dovecot.org/LDA > >> > >> Bye, > > > > > > no desire to control or limit the script > > > > wondered whether the script to run and find some header message > > marked as spam, is able to create for itself a folder called spam so > > to move the message to her. > > That's what the option -n is for, as Steffen stated... > I made some corrections to my script, with the intention of moving those messages marked as spam into a folder called spam. continue to enter the inbox folder but not move. this is my dovecot config: # 1.1.18: /etc/dovecot.conf # OS: Linux 2.6.18-164.el5 x86_64 CentOS release 5.3 (Final) ext3 listen: * login_dir: /var/run/dovecot/login login_executable(default): /usr/libexec/dovecot/imap-login login_executable(imap): /usr/libexec/dovecot/imap-login login_executable(pop3): /usr/libexec/dovecot/pop3-login mail_uid: 501 mail_gid: 501 mail_location: maildir:/var/spool/virtualmail/%d/%n mail_debug: yes mail_executable(default): /usr/libexec/dovecot/imap mail_executable(imap): /usr/libexec/dovecot/imap mail_executable(pop3): /usr/libexec/dovecot/pop3 mail_plugins(default): quota imap_quota mail_plugins(imap): quota imap_quota mail_plugins(pop3): quota mail_plugin_dir(default): /usr/lib64/dovecot/imap mail_plugin_dir(imap): /usr/lib64/dovecot/imap mail_plugin_dir(pop3): /usr/lib64/dovecot/pop3 lda: postmaster_address: postmas...@home.com mail_plugins: cmusieve quota auth default: passdb: driver: ldap args: /etc/dovecot-ldap.conf userdb: driver: prefetch userdb: driver: ldap args: /etc/dovecot-ldap-userdb.conf socket: type: listen master: path: /var/run/dovecot/auth-master mode: 384 user: vmail plugin: quota_warning: storage=95%% /usr/local/bin/quota-warning.sh 95 quota: maildir quota_rule: *:storage=40M sieve_global_path: /etc/dovecot/sieve sieve_global_dir: /etc/dovecot/sieve/global-default.script global-default.script # require ["include"]; include :global "global-spam.script"; global-spam.script ### require "fileinto"; if header :contains "X-Bogosity" "Spam" { fileinto "Spam"; stop; } Message header: X-Bogosity: Spam, tests=bogofilter, spamicity=1.00, version=1.2.1 Postfix - Master.cf ### dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient} -n And i still seeing this in my logs: mailserver deliver(mic...@casa.co.cu): Per-user script path is unknown. See http://wiki.dovecot.org/LDA/Sieve#location there may be something that is not seeing or ignoring me this Greetings Michel
Re: [Dovecot] Move messages marked as Spam
On Wed, 2009-10-07 at 14:16 +0200, Steffen Kaiser wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Tue, 6 Oct 2009, mic...@casa.co.cu wrote: > > > my question is: where I put this: > > It depends on your Sieve version: > > cmusieve needs the script in /.dovecot.sieve or you configure > one script for all users. > > libsieve uses /.dovecot.sieve, too, and you can configure pre- > and post- sieve scripts. > > > require "fileinto"; > > > > if header :contains "X-Bogosity" "Spam" { > > fileinto "Spam"; > > add > > stop; > > here > > > } > > > > so that all messages that come to my users go into the spam folder? > > > > > > > > and how i handle messages that are marked as "Unsure" > > > > X-Bogosity: Unsure > > Well, the same? File it into SPAM_Unsure? > > Bye, > > - -- I use dovecot-1.1.18 for which I am using dovecot-sieve-1.1.7 I would define a single script for all my users, according to documentation is declared using the variable sieve_global_path = /etc/dovecot.sieve my script: require "fileinto"; if header: contains "X-Bogosity" "spam" ( fileinto "Spam"; stop; ) my config: mail_plugins = cmusieve quota sieve_global_path = /etc/dovecot.sieve saving changes, the saved messages as spam not moved to the spam folder. when I check in the logs I see this message: Per-user script path is unknown. See http://wiki.dovecot.org/LDA/Sieve # location defining the same path as the previous script in the plugin section, all incoming messages for spam moves, all marked as spam and ham. Plugin { sieve = /etc/dovecot.sieve } mx1 deliver (mic...@casa.co.cu): msgid = <1254916568.4acc81d82712a @ home.com>: saved mail to spam a question, after the script run for each incoming message, once the filter matches any message marked as spam, the script create the folder in the mailbox of my users and or i have create manually? thanks
[Dovecot] Move messages marked as Spam
Hello I have implemented recently in my work bogofilter utility to mark messages as Spam or Ham, currently is working perfectly, but I want to move those messages marked as spam to a folder called spam. I installed dovecot-sieve with the intention of using fileinto to accomplish this. my question is: where I put this: require "fileinto"; if header :contains "X-Bogosity" "Spam" { fileinto "Spam"; } so that all messages that come to my users go into the spam folder? and how i handle messages that are marked as "Unsure" X-Bogosity: Unsure Thanks Michel
[Dovecot] Failover authentication Ldap
Hi List I use dovecot with LDA deliver, have quotas for my users use postfix as MTA server. as it could limit or refuse delivery of mail once the user has exceeded the limit of the quota? As in my configuration could define multiple LDAP servers? I have two servers with Active Directory, a PDC and a BDC, but I would specify both in the same configuration. for when the ldap server 1 has problems, authenticating against Ldap 2 . Thanks Michel
[Dovecot] Dovecot Proxy
Hello I have installed Dovecot as a POP3 server, IMAP on my internal network, the authentication against Windows Active Directory. I would like to know how to setup a second server dovecot as my proxy server for external users outside the network, in another segment of different IP addresses, or at least define which mailboxes will be stored on another server to be accessible to both servers. I have reviewed the document on the wiki site, but I said that is only possible with mysql authentication, but as I said the road where the messages are stored, it is possible for NFS? Thanks Michel
[Dovecot] Quota Override - Solved
Timo I have solved the problem thanks to your help Thanks again Or actually.. On Fri, 2008-02-01 at 13:40 -0500, Michel Bulgado wrote: ldap([EMAIL PROTECTED],127.0.0.1): result: mail(user)[EMAIL PROTECTED] quota(quota= maildir:storage)=30240 This is a reply to passdb lookup. quota shouldn't be in here, it just gets ignored. Feb 1 12:12:26 gandalf dovecot: auth(default): master out: USER 1 [EMAIL PROTECTED] uid=503 gid=503 home=/var/storage/virtualmail/home.com/ This is a userdb lookup. Here's where the quota should be in. passdb: driver: ldap args: /etc/dovecot-ldap.conf userdb: driver: static args: uid=virtualmail gid=virtualmail home=/var/storage/virtualmail/%d/ You can't use static userdb, because you want a per-user quota. First try to get it working by removing it and letting Dovecot use userdb ldap. userdb: driver: ldap args: /etc/dovecot-ldap.conf userdb: driver: prefetch Once it works, move this prefetch before userdb ldap so it actually gets used, and set all userdb_* fields properly in pass_attrs so it works. This message was sent using IMP, the Internet Messaging Program.
[Dovecot] Quota Override
Hi People I use the dovecot version 1.0.10 , in my config I have set a global quota value = 10 MB but I want to override for some users this value , getting from my ldap other value like = 30 MB. Dovecot obtain this value from ldap: (Feb 1 12:12:26 gandalf dovecot: auth(default): client out: OK 1 [EMAIL PROTECTED] quota= maildir:storage=30240) Feb 1 12:12:26 gandalf dovecot: auth(default): ldap([EMAIL PROTECTED],127.0.0.1): result: mail(user)[EMAIL PROTECTED] quota(quota= maildir:storage)=30240 Feb 1 12:12:26 gandalf dovecot: auth(default): ldap([EMAIL PROTECTED],127.0.0.1): bind: dn=CN=Usuario Michel,OU=Computacion,OU=Home,DC=home,DC=com Feb 1 12:12:26 gandalf dovecot: auth(default): client out: OK 1 [EMAIL PROTECTED] quota= maildir:storage=30240 Feb 1 12:12:26 gandalf dovecot: auth(default): master in: REQUEST 1 27697 1 Feb 1 12:12:26 gandalf dovecot: pop3-login: Login: user=<[EMAIL PROTECTED]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured Feb 1 12:12:26 gandalf dovecot: auth(default): master out: USER 1 [EMAIL PROTECTED] uid=503 gid=503 home=/var/storage/virtualmail/home.com/ Feb 1 12:12:26 gandalf dovecot: POP3([EMAIL PROTECTED]): Loading modules from directory: /usr/lib64/dovecot/pop3 Feb 1 12:12:26 gandalf dovecot: POP3([EMAIL PROTECTED]): Module loaded: /usr/lib64/dovecot/pop3/lib10_quota_plugin.so Feb 1 12:12:26 gandalf dovecot: POP3([EMAIL PROTECTED]): Effective uid=503, gid=503 Feb 1 12:12:26 gandalf dovecot: POP3([EMAIL PROTECTED]): maildir: data=/var/storage/virtualmail/home.com/michel Feb 1 12:12:26 gandalf dovecot: POP3([EMAIL PROTECTED]): maildir: root=/var/storage/virtualmail/home.com/michel, index=/var/storage/virtualmail/home.com/michel, control=, inbox= but not override the global quota set in dovecot.conf = 10 MB my dovecot.conf # 1.0.10: /etc/dovecot.conf listen: * login_dir: /var/run/dovecot/login login_executable(default): /usr/libexec/dovecot/imap-login login_executable(imap): /usr/libexec/dovecot/imap-login login_executable(pop3): /usr/libexec/dovecot/pop3-login mail_location: maildir:/var/storage/virtualmail/%d/%n mail_debug: yes mail_executable(default): /usr/libexec/dovecot/imap mail_executable(imap): /usr/libexec/dovecot/imap mail_executable(pop3): /usr/libexec/dovecot/pop3 mail_plugins(default): quota imap_quota mail_plugins(imap): quota imap_quota mail_plugins(pop3): quota mail_plugin_dir(default): /usr/lib64/dovecot/imap mail_plugin_dir(imap): /usr/lib64/dovecot/imap mail_plugin_dir(pop3): /usr/lib64/dovecot/pop3 auth default: verbose: yes debug: yes passdb: driver: ldap args: /etc/dovecot-ldap.conf userdb: driver: static args: uid=virtualmail gid=virtualmail home=/var/storage/virtualmail/%d/ userdb: driver: ldap args: /etc/dovecot-ldap.conf userdb: driver: prefetch socket: type: listen master: path: /var/run/dovecot/auth-master mode: 384 user: virtualmail plugin: quota: maildir:storage=10240 dovecot-ldap.conf user_attrs = mail=user,MailQuota=quota= maildir:storage Suggestions? Thanks
[Dovecot] Quota per domain
Hi People I have a two questions I use dovecot 1.0.10 I have quota maildir 1- I want to use the last version of quota 1.1 in my dovecot , i have to patch then, so which file i have to apply ? http://dovecot.org/patches/1.0/ this one quota-rewrite-1.0.9.diff ??? my another question : 2- with the new quota (1.1) if is posible define a quota per domain? [EMAIL PROTECTED] = 100M [EMAIL PROTECTED] = 0 --- no quota limit or @domain1.com = 100M @domain2.com = 0 --- no limit quota Once again , sorry for my english Thanks ---
[Dovecot] Quota per domain
Hi People I have a two question I use dovecot 1.0.10 I have quota maildir 1- I want to use the last version of quota 1.1 in my dovecot , i have to patch then, so which file i have to apply ? http://dovecot.org/patches/1.0/ this one quota-rewrite-1.0.9.diff ??? When i using the original version with out quota new 1.1 , in my mailbox is created a file called maildirsize with the quota , but when a apply the patch the quota this stop work for me. 2- if is posible define a quota per domain? [EMAIL PROTECTED] = 100M [EMAIL PROTECTED] = 0 --- no limit quota or @domain1.com = 100M @domain2.com = 0 --- no limit quota Once again , sorry for my english Thanks
Re: [Dovecot] [Fwd: Re: Building path to maildir]
Hi Charles I receive the Timo's reply. thanks for send me again Use the option that i said, but the problem persists. userdb static { args = uid=500 gid=500 } userdb prefetch { } Jan 2 23:50:08 michel dovecot: auth(default): new auth connection: pid=18374 Jan 2 23:50:20 michel dovecot: auth(default): client in: AUTH 1 PLAIN service=POP3 secured lip=127.0.0.1 rip=127.0.0.1 resp= Jan 2 23:50:20 michel dovecot: auth(default): pam(michel,127.0.0.1): lookup service=dovecot Jan 2 23:50:20 michel dovecot: auth(default): client out: OK 1 user=michel Jan 2 23:50:20 michel dovecot: auth(default): master in: REQUEST 1 183061 Jan 2 23:50:20 michel dovecot: auth(default): master out: USER 1 michel uid=503 gid=503 Jan 2 23:50:20 michel dovecot: POP3(michel): Loading modules from directory: /usr/lib64/dovecot/pop3 Jan 2 23:50:20 michel dovecot: pop3-login: Login: user=, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured Jan 2 23:50:20 michel dovecot: POP3(michel): Module loaded: /usr/lib64/dovecot/pop3/lib10_quota_plugin.so Jan 2 23:50:20 michel dovecot: POP3(michel): Effective uid=503, gid=503 Jan 2 23:50:20 michel dovecot: POP3(michel): maildir: data=/var/spool/virtualmail//michel Jan 2 23:50:20 michel dovecot: POP3(michel): maildir: root=/var/spool/virtualmail//michel, index=/var/spool/virtualmail//michel, control=, inbox= Dovecot detect the username , but no detect the part domain that i need to build the path to maildir. Use ldap (active directory) to retrieve the mail attribute which specifies the address of my mail users. I ask, as I could do with pam. As I get the attribute mail with pam mail_location = maildir:/var/storage/virtualmail/%d/%n So must be /var/spool/virtualmail/casa.co.cu/michel not /var/spool/virtualmail//michel This message was sent using IMP, the Internet Messaging Program.
[Dovecot] Trying to build the maildir path
I use ldap because is where are store the users and his make place the authentication . In my LDAP I have a attribute mail. like this = mail: [EMAIL PROTECTED] I Have more that one domain This atribute return to me something like : [EMAIL PROTECTED] where i use tu build the path to maildir, using %d and %n variables . /var/spool/vmail/%d/%n = /var/spool/vmail/casa.com/pepe this work in 0.99.11 but no in the latest version of dovecot. This message was sent using IMP, the Internet Messaging Program.
[Dovecot] Building path to maildir
I have the following situation and I need help from all you people I have dovecot 0.99.11 and i want to migrate to a superior version like dovecot 1.0 looking forward to implement quotas in my system , and use the function deliver with postfix. My Scenario is as follow Dovecot + LDAP (ADS) + postfix My actual version is : 0.99.11 This is my actual configuration: Protocols = imap pop3 imap_listen = * pop3_listen = * login_dir = /var/run/dovecot-login login = imap login = pop3 default_mail_env = maildir:/var/spool/virtualmail/%d/%n mbox_locks = fcntl auth = dovecot-auth auth_mechanisms = plain auth_default_realm = CASA.CULT.CU auth_userdb = ldap /etc/dovecot-ldap.conf auth_passdb = pam dovecot auth_user = root auth_verbose = yes auth_debug = yes dovecot-ldap.conf hosts = ldap.casa.cult.cu base = ou=CASA,dc=casa,dc=cult,dc=cu dn = cn=unix-conector,cn=Users,dc=casa,dc=cult,dc=cu dnpass = * ldap_version = 3 deref = never scope = subtree user_global_uid = 500 user_global_gid = 500 user_attrs = mail,/var/spool/virtualmail/%d/%n user_filter = (&(objectClass=user)(!(objectClass=computer))(sAMAccountName=%n)) I see many changes in this new version. One of them is : -Renamed default_mail_env to mail_location - many changes in ldap queries With the new version my problem is when to dovecot tries to detect or builds the way where it´s stored the mailbox of my users. In /var/spool/virtualmail/%d/%u , it does not detect the domain when asking to my active directory (w2k) and consequently takes a value of my default realm = casa.cult.cu in this case the default domain where authenticate my users. My configuration in the new version of dovecot: protocols = imap pop3 protocol imap { listen = * } protocol pop3 { listen = * } login_dir = /var/run/dovecot/login login_chroot = yes login_greeting = Dovecot ready. mail_location = maildir:/var/spool/virtualmail/%d/%u mail_debug = yes mbox_read_locks = fcntl mbox_write_locks = fcntl protocol imap { mail_plugins = quota imap_quota } protocol pop3 { mail_plugins = quota } protocol lda { postmaster_address = [EMAIL PROTECTED] mail_plugins = quota auth_socket_path = /var/run/dovecot/auth-master } auth_executable = /usr/libexec/dovecot/dovecot-auth auth_verbose = yes auth_debug = yes auth default { mechanisms = plain passdb pam { args = dovecot } userdb ldap { args = /etc/dovecot-ldap.conf } userdb prefetch { } user = root socket listen { master { path = /var/run/dovecot/auth-master mode = 0600 user = virtualmail group = virtualmail } } } dict { } plugin { quota = maildir:storage=10240 } user_attrs = mail,/var/spool/virtualmail/%d/%n The attribute mail in the old version returns to me [EMAIL PROTECTED] or [EMAIL PROTECTED] this way dovecot can build the way with no problems at all. But in this late version something is happening, it only takes the value %n= user , but not %d = domain . It´s not working. do you have any idea how I can solve this I beg your pardon for my poor English. This message was sent using IMP, the Internet Messaging Program.
[Dovecot] Building path to maildir
Hello everyone Happy new year . This is the first time I address to the list I have the following situation and I need help from all you people I have dovecot 0.9-11 and i want to migrate to a superior version like dovecot 1.0 looking forward to implement quotas in my system , and use the function deliver with postfix. My Scenario is as follow Dovecot + LDAP (ADS) + postfix My actual version is : 0.99.11 This is my actual configuration: Protocols = imap pop3 imap_listen = * pop3_listen = * login_dir = /var/run/dovecot-login login = imap login = pop3 default_mail_env = maildir:/var/spool/virtualmail/%d/%n mbox_locks = fcntl auth = dovecot-auth auth_mechanisms = plain auth_default_realm = CASA.CULT.CU auth_userdb = ldap /etc/dovecot-ldap.conf auth_passdb = pam dovecot auth_user = root auth_verbose = yes auth_debug = yes dovecot-ldap.conf hosts = ldap.casa.cult.cu base = ou=CASA,dc=casa,dc=cult,dc=cu dn = cn=unix-conector,cn=Users,dc=casa,dc=cult,dc=cu dnpass = * ldap_version = 3 deref = never scope = subtree user_global_uid = 500 user_global_gid = 500 user_attrs = mail,/var/spool/virtualmail/%d/%n user_filter = (&(objectClass=user)(!(objectClass=computer))(sAMAccountName=%n)) I see many changes in this new version. One of them is : -Renamed default_mail_env to mail_location - many changes in ldap queries With the new version my problem is when to dovecot tries to detect or builds the way where it´s stored the mailbox of my users. In /var/spool/virtualmail/%d/%u , it does not detect the domain when asking to my active directory (w2k) and consequently takes a value of my default realm = casa.cult.cu in this case the default domain where authenticate my users. My configuration in the new version of dovecot: protocols = imap pop3 protocol imap { listen = * } protocol pop3 { listen = * } login_dir = /var/run/dovecot/login login_chroot = yes login_greeting = Dovecot ready. mail_location = maildir:/var/spool/virtualmail/%d/%u mail_debug = yes mbox_read_locks = fcntl mbox_write_locks = fcntl protocol imap { mail_plugins = quota imap_quota } protocol pop3 { mail_plugins = quota } protocol lda { postmaster_address = [EMAIL PROTECTED] mail_plugins = quota auth_socket_path = /var/run/dovecot/auth-master } auth_executable = /usr/libexec/dovecot/dovecot-auth auth_verbose = yes auth_debug = yes auth default { mechanisms = plain passdb pam { args = dovecot } userdb ldap { args = /etc/dovecot-ldap.conf } userdb prefetch { } user = root socket listen { master { path = /var/run/dovecot/auth-master mode = 0600 user = virtualmail group = virtualmail } } } dict { } plugin { quota = maildir:storage=10240 } user_attrs = mail,/var/spool/virtualmail/%d/%n The attribute mail in the old version returns to me [EMAIL PROTECTED] or [EMAIL PROTECTED] this way dovecot can build the way with no problems at all. But in this late version something is happening, it only takes the value %n= user , but not %d = domain . It´s not working. do you have any idea how I can solve this I beg your pardon for my poor English. This message was sent using IMP, the Internet Messaging Program.