Re: [Dovecot] dovecot creating unknown users

2013-06-19 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 18 Jun 2013, Yann Shukor wrote:

You have sent the message twice, mayhap you should rephrase it.


I noticed that dovecot is creating user directory structures
for unknown users withinour domain in /var/vmail, even
though we have setup a static users.conf db file.



I tried omiting the allow_all_users=yes parameter but
that doesn't seem to be linked to this issue


What is the problem / question actually?


Sorry if this has been asked a number of times already
Is there an easy way to search the archives of this
mailinglist ?


Google or any other search engine, maybe limit the search to 
site:dovecot.org, http://dir.gmane.org/gmane.mail.imap.dovecot, 
http://dovecot.markmail.org/


- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBUcFcTl3r2wJMiz2NAQKK9AgApenpl8vyTKtmeAAzP+7CcpUxlXdFjQKP
g4a0ZdZXrcUjOtp2R9Nr3wa8sZ+ftXtTgtwm6zayX8vA+pETpSGHObo7RlEiHvei
Fl0UInOrVvC5mOgRlCi3/clZs6mWvV8itrRAdvh5LAnFpudMazQDUT2nmY0RtMjc
yFA8O7QjOTmRJfTCV1JOeCLaFHUZNQh1w/ztqx2/bNUKHFkja1nLucChlpzb8BGT
WTXsVsPZTvBlzOunzZm3me+ItdoJYaWkW1HIVOo0Ca5cEw6GHIHiiLp9mWER2y2K
I+6lrzuaOJYztzbVVMOMRjHObOS/foL096rhweZSmPNDs6pmxPgkHw==
=MO8o
-END PGP SIGNATURE-


Re: [Dovecot] Allowing clients to test their Sieve scripts

2013-06-19 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sat, 15 Jun 2013, Benny Pedersen wrote:


The ManageSieve plugin in Thunderbird does basic syntax checks, to check
if your Sieve script does what it is supposed to to do, there is
something like this - https://www.fastmail.fm/docs/sieve/sievetest.php


code managesive plugin to make it test scripts before commit it to filesystem


the ManageSieve from Pigeonhole performs syntax checks before committing 
the script to the filesystem.


- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBUcFj+V3r2wJMiz2NAQKnsQgAqK2bcnxKzTLGH3SzesBj7irbk7pkDP5t
oNOBFucdzqGwJwCUIZhAqf+Uji8NyiUFCLa1wtz9dDIeMX5Ooowp6bH5q3TN2LP/
Jg+43b/nckwXlTcS0xBdOyr6VrYuAWE5cr68tu5RC57u2FLRaSFvQ53n7AIEsRNM
ypDwZeCJV+DsMGWp6y3LG5s5b0eMf3zDJtTdaD4Lt0NLU/NMpMvg1olCggUwxf1l
Os6JYl2dDLaCfwwpYqM8vT/DRXQ+wtjf08KUIqCku6I2X4n52yhmmfNZ1/5h838/
p0mP2ENmnIuMl7MxE5KTa9M55JdM5+PMbHxQK1f893DJnY8c6yYxTA==
=lyOL
-END PGP SIGNATURE-


Re: [Dovecot] A common, read-only IMAP INBOX for all accounts

2013-06-19 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 14 Jun 2013, Gus wrote:


2. For testing purposes, I used a perl script (using the Maildir::Lite
module) to create a test
message in this mailbox (it gets stored in the new/ subdirectory, as I
suppose it should). Now
this message shows up as unread for all accounts, however when I read it
in an IMAP client
and then refresh the mailbox, it shows up as unread again. Per-user INDEX
directory is writable
and I see some files created there by dovecot, so shouldn't they contain
the \Seen flags that
indicate the message has been read? Is this maybe a client problem and how
can I check that
dovecot actually saves the flag correctly?


see http://wiki2.dovecot.org/SharedMailboxes/Public


Maildir: Per-user \Seen flag

With Maildir a dovecot-shared file controls if the \Seen flags are shared 
or private. 



The SEEN status is encoded in the filesystem in Maildir not Dovecot 
index file per default.


- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBUcFrDV3r2wJMiz2NAQJD0Qf/YMMSDv09PNFV28TmjCmyoQLtuGBJfpq0
Ew3XyMcVIXleehnQiLPYO1CVJco73b5z40/Vt4yZAt6iHsszE/fw/KtlBsTtQpMF
SzNfBMG4BZSAk4xBPhCwDQjIpzuZRMQviZcjpVZ1aFQW8D3PY2m+kzTZvdQ1X4ge
KIOE6QUEUVXfwU4vcIpz+Qv7vUY5ZxIHQl2TlqwK3UFL2H+a5o96D8q1b7p8dr7P
pVkcZiwdY83dvLBc3ZvFbuMvSRXrwNW1Bk6iEE9SE51+5kRS5UjxubuBmkVbZrls
RHoYM42exrnwonHn0eLT9q0Pzg4DTwS03EKLxTDfA95isLrrhY1b2g==
=jxUo
-END PGP SIGNATURE-


Re: [Dovecot] Allowing clients to test their Sieve scripts

2013-06-19 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 14 Jun 2013, Frerich Raabe wrote:

One thing which came up repeatedly is that clients using the IMAP server 
I run (using Dovecot 2.1) wonder whether they broke their Sieve scripts, 
i.e. it often goes like I don't know whether I just didn't receive any 
mail, or whether my filters broke. Can you check the logs?.


I then usually just run the sieve-test binary (part of the Pigeonhole 
distribution) and send them the output. However, I was wondering - is 
there maybe a way for them to try it themselves? Like, maybe a tiny web 
server which just prints a form asking for a mail file and a sieve 
script, and then it runs sieve-script and prints the output of that? I 
wonder how other people do that.


you are not referring to syntax errors, do you?

Otherwise, this seems to be a nice idea to let users actually _test_ their 
scripts. However, I wonder how educated they are, in order to paste in a 
correct mail file incl. header and the like.


- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBUcFlBF3r2wJMiz2NAQIWkQf5AS1g63bj00I8nTrt9adYSgkRCXmRVlNi
M2TjBAGcRZJ5gpL08dyrGpymOydrkcJdsKjgythloGxzezfPStYCg71FLjfO3dLx
6Y1SDue+Dfn0AS49Zyh1zm6KXy56JFgQSopV4zUum1y9KH7ncskzBlBZobYeTXlN
rQXQ1Bim/m1368sCzqFwfD2v0CrFnNDe4YGaydbNIBQrC0WDPGQBWEiIxv4Ovudg
Zbsk9NSIWDr/nu2MfvE9m1dhXDX9YxeVZWlYoira//PgQkO81P9zFfJGCH8y1qtl
c+Hr1165e8sXunSnfkWRiZP3igoefWTgILZnBVSM9VpL3F1NtKi2uQ==
=IhRa
-END PGP SIGNATURE-


Re: [Dovecot] Crashes at login time with freshest code

2013-06-19 Thread Christian Wiese
Hi Timo,

thank you very much for fixing the issue. I can also confirm that it
solves the issue I experienced on a test machine after installing 2.2.3.

Cheers,
Chris

On Tue, 18 Jun 2013 18:56:51 +0300
Timo Sirainen t...@iki.fi wrote:

 On 18.6.2013, at 18.14, interfaSys sàrl interfa...@gmail.com wrote:
 
  Hello,
  
  Dovecot keeps crashing at login time. Things were fine on 2.2.2
  Fatal: master: service(imap): child 5014 killed with signal 11
  
  Here is the trace:
  Core was generated by `imap'.
  Program terminated with signal 11, Segmentation fault.
  #0  0x105cdfdf in mailbox_list_get_storage
  (list=0x7fffe310, vname=0x10a04ab0 INBOX/spam,
  storage_r=0x7fffe308) at mailbox-list.c:811
  811 if (set != NULL  set-driver[0] != '\0') {
 
 Fixed: http://hg.dovecot.org/dovecot-2.2/rev/8a81c5a1b60f
 
 



-- 
Kind regards,
Mit freundlichen Grüßen,
Christian Wiese

Follow us on Facebook:
http://www.facebook.com/pages/Securepoint-GmbH/132451210137395

Follow us on Twitter:
http://twitter.com/SecurepointStat

-
Securepoint GmbH
Christian Wiese
Salzstr. 1
D-21335 Lueneburg
http://www.securepoint.de
Tele: ++49 4131 2401-0 Fax: ++49 4131 2401-50
Lueneburg HRB 1776
-

CONFIDENTIALITY :
This e-mail and any attachments are confidential and may be privileged.
If you are not a named recipient, please notify the sender immediately
and do not disclose the contents to another person, use it for any
purpose or store or copy the information in any medium.

GEHEIMHALTUNGSPFLICHT :
Dieses E-Mail und alle damit verbundenen Anlagen sind vertraulich
und dürfen nur bestimmten Personen zugänglich gemacht werden.
Sofern Sie nicht zu den angegebenen Empfängern gehören, benachrichtigen
Sie bitte unverzüglich den Absender. Der Inhalt darf weder an Dritte
weitergegeben noch zu anderen Zwecken verwendet werden. Die
Informationen dürfen auch nicht auf einem Datenträger gespeichert
oder auf einen Datenträger kopiert werden.


Re: [Dovecot] A common, read-only IMAP INBOX for all accounts

2013-06-19 Thread Gus
On Wed, Jun 19, 2013 at 10:25 AM, Steffen Kaiser 
skdove...@smail.inf.fh-brs.de wrote:

 see 
 http://wiki2.dovecot.org/**SharedMailboxes/Publichttp://wiki2.dovecot.org/SharedMailboxes/Public

 
 Maildir: Per-user \Seen flag

 With Maildir a dovecot-shared file controls if the \Seen flags are shared
 or private. 

 The SEEN status is encoded in the filesystem in Maildir not Dovecot
 index file per default.


Thanks, yes, I figured it out from a similar discussion going on in here
last week. I just created an empty dovecot-shared file in that mailbox
and it worked like a charm. Checked the docs later - the phrasing
that mentions this file is not too clear, maybe adding a note like make
sure you create this (empty) file in the mailbox would help.

Anyway, from the info I gathered, I assume my concept of providing
a shared INBOX should work with no problems which is great.


[Dovecot] Mbox corruption - Inbox beginning with 'FFrom' or 'FrFrom'

2013-06-19 Thread Dimos Alevizos

Hello,

we're having some problems with our dovecot setup.
I've seen similar problems in the mailing list some years ago but alas 
wasn't able to find a solution.


Our setup is as follows :
An MX farm (postfix) sends mails via LMTP to a director farm (dovecot 
2.1.12) which proxies pop3/imap/lmtp traffic to a dovecot farm (dovecot 
2.1.16).

All mailboxes and indexes are on NFS and all servers are Centos.

The problem is that at times we see mailboxes (all of them are in mbox 
format) beginning with FFrom or FrFrom and of course dovecot says it's 
not a valid mbox file.
If we manually remove the offending extra characters from the beginning 
of the file everything is working again, but often the same user will 
show the problem again tomorrow.
However it's very rare and so far we haven't been able to reproduce the 
problem.


After activating the mail_log plugin hoping it'll help us locate the 
problem we run across this case :


The user (let's call him u...@domain.gr) logs in via pop3 and deletes 
some mails but one of them fails:


Jun 19 11:09:18 pop01 dovecot: pop3-login: Login: user=u...@domain.gr, 
method=PLAIN, rip=83.235.173.26, lip=83.235.66.40, mpid=1389, secured, 
session=Ao+rWH3fHgBT660a
Jun 19 11:09:18 director5 dovecot: pop3-login: proxy(u...@domain.gr): 
started proxying to 83.235.66.40:110: user=u...@domain.gr, 
method=PLAIN, rip=83.235.173.26, lip=83.235.66.65, 
session=Ao+rWH3fHgBT660a
Jun 19 11:09:24 pop01 dovecot: pop3(u...@domain.gr): expunge: box=INBOX, 
uid=20670, 
msgid=9f5b1a20a9428ed31a9e7e42ce4411f08d0.20130612070...@mail84.us2.rsgsv.net, 
size=36526
Jun 19 11:09:24 pop01 dovecot: pop3(u...@domain.gr): expunge: box=INBOX, 
uid=20671, 
msgid=b27d72dc5a47a3235a232494c6fe8...@newsletter.stockout.gr, size=4637
Jun 19 11:09:24 pop01 dovecot: pop3(u...@domain.gr): expunge: box=INBOX, 
uid=20672, 
msgid=1113670779560.910791405.1470.2.32032...@scheduler.constantcontact.com, 
size=38655
Jun 19 11:09:24 pop01 dovecot: pop3(u...@domain.gr): expunge: box=INBOX, 
uid=20673, msgid=83600a274c1407c5aa4c263e2592c...@debop.gr, size=1181688
Jun 19 11:09:24 pop01 dovecot: pop3(u...@domain.gr): expunge: box=INBOX, 
uid=20674, 
msgid=f2a59be7-007a-4567-9ba5-803446c3d...@bernier-eliades.gr, size=61116
Jun 19 11:09:26 pop01 dovecot: pop3(u...@domain.gr): Error: Next message 
unexpectedly corrupted in mbox file /var/mail/K/Y/V/domain_gr_user_007 at 1
Jun 19 11:09:26 pop01 dovecot: pop3(u...@domain.gr): Error: Cached 
message offset 1 is invalid for mbox file /var/mail/K/Y/V/domain_gr_user_007
Jun 19 11:09:27 pop01 dovecot: pop3(u...@domain.gr): Disconnected: 
Logged out top=0/0, retr=2/1502843, del=122/359, size=137448432
Jun 19 11:09:27 pop01 dovecot: pop3(u...@domain.gr): Warning: Our 
dotlock file /var/mail/K/Y/V/domain_gr_user_007.lock was deleted (locked 
9 secs ago, touched 9 secs ago)
Jun 19 11:09:27 pop01 dovecot: pop3(u...@domain.gr): Error: 
file_dotlock_delete() failed with mbox file 
/var/mail/K/Y/V/domain_gr_user_007: No such file or directory
Jun 19 11:09:27 director5 dovecot: pop3-login: proxy(u...@domain.gr): 
disconnecting 83.235.173.26 (Disconnected by server): 
user=u...@domain.gr, method=PLAIN, rip=83.235.173.26, 
lip=83.235.66.65, session=Ao+rWH3fHgBT660a


However he's still able to log in again :

Jun 19 11:11:36 pop01 dovecot: pop3-login: Login: user=u...@domain.gr, 
method=PLAIN, rip=85.74.231.10, lip=83.235.66.40, mpid=10094, secured, 
session=QDLrYH3f7ABVSucK
Jun 19 11:11:36 director3 dovecot: pop3-login: proxy(u...@domain.gr): 
started proxying to 83.235.66.40:110: user=u...@domain.gr, 
method=PLAIN, rip=85.74.231.10, lip=83.235.66.63, session=QDLrYH3f7ABVSucK
Jun 19 11:11:51 pop01 dovecot: pop3(u...@domain.gr): Disconnected: 
Logged out top=0/0, retr=0/0, del=0/237, size=75036938
Jun 19 11:11:51 director3 dovecot: pop3-login: proxy(u...@domain.gr): 
disconnecting 85.74.231.10 (Disconnected by server): 
user=u...@domain.gr, method=PLAIN, rip=85.74.231.10, lip=83.235.66.63, 
session=QDLrYH3f7ABVSucK


A few minutes later he receives another mail which is delivered with no 
problem :


Jun 19 11:30:39 corvus amavis[546]: (00546-22) Passed CLEAN, 
[91.190.168.40] [91.190.168.40] tk-14...@free.splio.com - 
u...@domain.gr, Message-ID: 58175-bWFyaW5hQGJlcm5pZXItZWxpYWR
lcy5ncg==@free.splio.com, mail_id: J1P-0WpmQksJ, Hits: 1.412, size: 
9025, queued_as: 02BA4AE00414, Tests: 
[DKIM_VALID=-0.1,DKIM_VERIFIED=-0.1,FREEMAIL_FROM=0.001,HTML_IMAGE_RATIO_04=0.61,INVALID_MSGID=1,URIBL_BLOCKED=0.001], 
autolearn=disabled, 1533 ms
Jun 19 11:30:39 corvus smtp/smtpd[1283]: proxy-accept: END-OF-MESSAGE: 
250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 
02BA4AE00414; from=tk-14...@free.splio.com 
to=mar...@bernier-eliades.gr proto=ESMTP helo=poc-pbcs2.splio.com
Jun 19 11:30:39 pop01 dovecot: lmtp(4099, u...@domain.gr): 
77O4IHlGwVEDEAAAYg/qxw: 
msgid=58175-bWFyaW5hQGJlcm5pZXItZWxpYWRlcy5ncg==@free.splio.com: 
from=residence.sudde...@gmx.com size=9610 saved mail to INBOX

[Dovecot] Sieve file permission problem

2013-06-19 Thread Zoltan Lippai
Hi folks, 

I am using dovecot 2.1.7 with the ManageSieve plugin which works great. 
Recently I set up Afterlogic webmail on my server (the community version) and 
it has a nice UI to manage the sieve settings. It uses port 2000 to communicate 
with dovecot via the ManageSieve plugin. Also, dovecot uses Maildirs to store 
the messages.

The problem is that the permissions on the files that store the sieve rules are 
to strict.
I am talking about the sieve directory and the .dovecot.sieve file. 
The sieve folder has a chmod 700 and the .dovecot.sieve is chmod 600. Both are 
owned by vmail:mail

If I delete these two items, then the rules can be saved via the web interface. 
Then these files are created but for some reason the ManageSieve plugin can't 
modify them.

Here is the output of dovecot -n:
http://pastebin.com/4eqyBKCA

Can you help me out on this?

Thanks a lot!
Zoltan




Re: [Dovecot] Patch for pigeonhole 0.4.0 avoiding PATH_MAX

2013-06-19 Thread Svante Signell
On Tue, 2013-06-18 at 12:25 +0200, Svante Signell wrote:
 On Tue, 2013-06-18 at 08:37 +0200, Stephan Bosch wrote:
  On 6/15/2013 3:24 PM, Svante Signell wrote:
   Hi,
  
   I recently downloaded and built dovecot-2.2.2 and
   dovecot-2.2-pigeonhole-0.4.0 on GNU/Linux and GNU/Hurd. The changes
   needed will be sent to the Debian maintainer shortly. Latest Debian
   release is 2.1.7-7 and dovecot-2.1-pigeonhole-0.3.1. When building
   dovecot-2.2.2 there were no PATH_MAX problems on GNU/Hurd, thank you for
   that. However, pigeonhole 0.4.0 had one remaining PATH_MAX construct.
   The attached patch solves this problem. It it good enough to be accepted
   upstream? (According to the description of t_malloc, free is not needed,
   right?)
  
  Fixed:
  
  http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/1b1a0c271383
 
 Thanks a lot :)

Are you planning to make a new (minor) release of pigeonhole soon, just
to know what to submit in the bug report to the Debian maintainer?




Re: [Dovecot] Sieve file permission problem

2013-06-19 Thread Daniel Parthey
Please provide permission details of the affected directories and files and 
possibly error messages from dovecot logfile.

Regards
Daniel



Zoltan Lippai z...@lippai.net schrieb:

Hi folks, 

I am using dovecot 2.1.7 with the ManageSieve plugin which works great.
Recently I set up Afterlogic webmail on my server (the community
version) and it has a nice UI to manage the sieve settings. It uses
port 2000 to communicate with dovecot via the ManageSieve plugin. Also,
dovecot uses Maildirs to store the messages.

The problem is that the permissions on the files that store the sieve
rules are to strict.
I am talking about the sieve directory and the .dovecot.sieve file. 
The sieve folder has a chmod 700 and the .dovecot.sieve is chmod 600.
Both are owned by vmail:mail

If I delete these two items, then the rules can be saved via the web
interface. Then these files are created but for some reason the
ManageSieve plugin can't modify them.

Here is the output of dovecot -n:
http://pastebin.com/4eqyBKCA

Can you help me out on this?

Thanks a lot!
Zoltan


[Dovecot] Dovecot proxy to Microsoft Exchange 2013

2013-06-19 Thread Ricardo Machini Barbosa

Hello,

I am trying to do a proxy with dovecot to IMAP backend server that are 
using Microsoft Exchange 2013.
I already did this with Microsoft Exchange 2007 and Microsoft Exchange 
2010 and it works perfectly! But with Microsoft Exchange 2013 I can not 
perform LOGIN.


The error log message is:
/imap-login: Error: proxy(u...@domain.com.br): Login for 
exchange2013.domain.com.br:143 timed out in state=4 (after 30 secs, 
local=x.x.x.x:59640)/


My troubleshoot was:

- tcpdump on dovecot server side:
I can see the commands sent/received by Microsoft Exchange. But no 
the OK LOGIN response.


/* OK The Microsoft Exchange IMAP4 service in  is ready.//
//C CAPABILITY//
//L LOGIN u...@domain.com.br 123456//
//* CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN STARTTLS UIDPLUS CHILDREN IDLE 
NAMESPACE LITERAL+//

//C OK CAPABILITY completed./

- tcpdump with telnet login on dovecot server side:
Works fine.

/* OK The Microsoft Exchange IMAP4 service in  is ready.//
//a login u...@domain.com.br 123456//
//a OK LOGIN completed.//
//a logout//
//* BYE Microsoft Exchange Server 2013 IMAP4 server signing off.//
//a OK LOGOUT completed./

- Log verbose on Microsoft Exchange 2013.
Look like that Microsoft Exchange did not receive the login command.

Someone already tried do this with Microsoft Exchange 2013 ?

See bellow some information about my dovecot configuration:

/# 2.2.2: dovecot.conf//
//# OS: Linux 2.6.32-358.2.1.el6.centos.plus.x86_64 x86_64 CentOS 
release 6.4 (Final)//

//
//base_dir = /var/run/dovecot///
//disable_plaintext_auth = no//
//listen = x.x.x.x//
//mbox_write_locks = fcntl//
//passdb {//
//  args = /etc/dovecot/dovecot-ldap.conf.ext//
//  driver = ldap//
//}//
//
//protocols = imap pop3//
//service imap-login {//
//  inet_listener imap {//
//port = 143//
//  }//
//  inet_listener imaps {//
//port = 993//
//ssl = yes//
//  }//
//  process_min_avail = 4//
//  service_count = 0//
//  vsz_limit = 512 M//
//}//
//service pop3-login {//
//  inet_listener pop3 {//
//port = 110//
//  }//
//  inet_listener pop3s {//
//port = 995//
//ssl = yes//
//  }//
//  process_min_avail = 4//
//  service_count = 0//
//  vsz_limit = 512 M//
//}//
//ssl_cert = /etc/dovecot/certificate/chained.crt//
//ssl_key = /etc/dovecot/certificate/cert.key//
//userdb {//
//  driver = prefetch//
//}//
//
///etc/dovecot/dovecot-ldap.conf.ext//
//hosts = x.x.x.x//
//dn = cn=admin,o=email//
//dnpass = xxx//
//ldap_version = 3//
//base = o=email//
//scope=subtree//
//pass_filter = mail=%u//
//pass_attrs = uid=user,=password=,=proxy=y,mailHost=host,=nopassword=y/

Thanks,
Ricardo Machini



[Dovecot] Calling dovecot-lda from within Antispam pipe script (bash) seems to have no effect

2013-06-19 Thread Ben Johnson
Hello,

I'm attempting to configure the Dovecot Antispam plug-in on Ubuntu 12.04
LTS with Dovecot 2.0.19.

Everything seems to be in order with one considerable exception: when my
pipe script (a simple Bash shell script) calls the dovecot-lda
executable, absolutely nothing seems to result.

If I copy/paste the exact same command into the terminal, the mail is
delivered to the target mailbox, as expected.

Here's my pipe script: http://pastebin.com/DBXAZqsN

When I move a message from INBOX - Junk, or from Junk - INBOX, the
pipe script is called, and here's the output:

---
31465-start (--debug --username=amavis --ham)
Checking if the command-line input argument string (--debug
--username=amavis --ham) contains the string ham or spam
Mode is HAM
Calling (as user vmail) '/usr/lib/dovecot/deliver -d
sa-train...@example.com -m Training.HAM -p
/tmp/sendmail-msg-31465.txt'
31465-end
---

But, for some reason, the call to /usr/lib/dovecot/deliver doesn't
seem to do anything.

If I copy the above output and paste it into the terminal:

/usr/lib/dovecot/deliver -d sa-train...@example.com -m Training.HAM
-p /tmp/sendmail-msg-31465.txt

Dovecot does indeed deliver the message. This works whether I execute
the above command as root or vmail.

Why does this command have no effect when called from within the pipe
script?

Here is my doveconf -n output:

# 2.0.19: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-042stab076.8 x86_64 Ubuntu 12.04.2 LTS
auth_mechanisms = plain login
disable_plaintext_auth = no
listen = *,[::]
log_timestamp = %Y-%m-%d %H:%M:%S 
mail_privileged_group = vmail
passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
plugin {
  antispam_backend = pipe
  antispam_debug_target = syslog
  antispam_pipe_program = /usr/bin/sa-learn-pipe.sh
  antispam_pipe_program_args = --debug;--username=amavis
  antispam_pipe_program_notspam_arg = --ham
  antispam_pipe_program_spam_arg = --spam
  antispam_pipe_tmpdir = /tmp
  antispam_spam_pattern_ignorecase = SPAM;JUNK
  antispam_trash_pattern_ignorecase = trash;Deleted *
  antispam_verbose_debug = 1
  quota = dict:user::file:/var/vmail/%d/%n/.quotausage
  quota_rule2 = Trash:storage=+100M
  quota_rule3 = Junk:ignore
  quota_warning = storage=95%% quota-warning 95 %u %d
  quota_warning2 = storage=80%% quota-warning 80 %u %d
  quota_warning3 = -storage=100%% quota-below below %u %d
  sieve = /var/vmail/%d/%n/.sieve
}
protocols = imap pop3
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
  unix_listener auth-userdb {
group = vmail
mode = 0600
user = vmail
  }
  user = root
}
service quota-below {
  executable = script /usr/local/bin/quota-below.sh
  user = vmail
}
service quota-warning {
  executable = script /usr/local/bin/quota-warning.sh
  user = vmail
}
ssl_cert = /etc/postfix/smtpd.cert
ssl_key = /etc/postfix/smtpd.key
userdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
protocol imap {
  mail_plugins = quota imap_quota antispam
}
protocol pop3 {
  mail_plugins = quota
  pop3_uidl_format = %08Xu%08Xv
}
protocol lda {
  info_log_path = /var/log/dovecot-lda.log
  log_path = /var/log/dovecot-lda-errors.log
  mail_plugins = sieve quota
}


Thank you,

-Ben


[Dovecot] pop3 and imap don't run

2013-06-19 Thread Mohsen Pahlevanzadeh
Dear all,

I run dovecot and when i use 
'ps ax |egrep dovecot' command , i get the following result:
//
 9290 pts/3S+ 0:00 tail -f /var/log/dovecot.err
 9597 ?Ss 0:00 /opt/dovecot/sbin/dovecot
 9598 ?S  0:00 dovecot/anvil
 9599 ?S  0:00 dovecot/log
 9601 ?S  0:00 dovecot/config
 9606 pts/0S+ 0:00 egrep --color=auto dovecot
///

I dont see any pop or imap process.

--mohsen



[Dovecot] mail_max_userip_connections on a per user basis

2013-06-19 Thread Antonio Leding
Hello,

Can the above setting be applied on a per user account basis?

I thought that maybe something like per account quotas might be a possible 
method but not sure.

Thanks.

[Dovecot] Sieve Plugin Setup

2013-06-19 Thread Denny Jones
I've got an existing setup that I want to add Sieve filtering to. I'm on 
QmailToaster:

qmailadmin-toaster-1.2.16-1.4.0

I using Dovecot version 2.0.11

I'm looking for a good tutorial for installing Sieve Rules functionality on an 
existing system. Anybody know of one? Anybody else done this? Do I just install 
the latest Dovecot-sieve plugin release with wget, etc? What kind of 
configuration can I expect to have to go through. Do I have to reconfigure 
Dovecot to work in conjunction with the Sieve plugin?

I'm hoping to find someone else has done this that can help me navigate the 
waters so-to-speak.

Thanks in advance,
Denny


Re: [Dovecot] Calling dovecot-lda from within Antispam pipe script (bash) seems to have no effect

2013-06-19 Thread Bob Miller
Hi Ben,

I checked over your script, and I don't see the problem either.  You
already checked everything that comes to my mind.

Maybe using something like set -e to try and get some output from the
script?  

-- 
Computerisms
Bob Miller  
867-334-7117 / 867-633-3760
http://computerisms.ca


On Wed, 2013-06-19 at 14:52 -0400, Ben Johnson wrote:
 Hello,
 
 I'm attempting to configure the Dovecot Antispam plug-in on Ubuntu 12.04
 LTS with Dovecot 2.0.19.
 
 Everything seems to be in order with one considerable exception: when my
 pipe script (a simple Bash shell script) calls the dovecot-lda
 executable, absolutely nothing seems to result.
 
 If I copy/paste the exact same command into the terminal, the mail is
 delivered to the target mailbox, as expected.
 
 Here's my pipe script: http://pastebin.com/DBXAZqsN
 
 When I move a message from INBOX - Junk, or from Junk - INBOX, the
 pipe script is called, and here's the output:
 
 ---
 31465-start (--debug --username=amavis --ham)
 Checking if the command-line input argument string (--debug
 --username=amavis --ham) contains the string ham or spam
 Mode is HAM
 Calling (as user vmail) '/usr/lib/dovecot/deliver -d
 sa-train...@example.com -m Training.HAM -p
 /tmp/sendmail-msg-31465.txt'
 31465-end
 ---
 
 But, for some reason, the call to /usr/lib/dovecot/deliver doesn't
 seem to do anything.
 
 If I copy the above output and paste it into the terminal:
 
 /usr/lib/dovecot/deliver -d sa-train...@example.com -m Training.HAM
 -p /tmp/sendmail-msg-31465.txt
 
 Dovecot does indeed deliver the message. This works whether I execute
 the above command as root or vmail.
 
 Why does this command have no effect when called from within the pipe
 script?
 
 Here is my doveconf -n output:
 
 # 2.0.19: /etc/dovecot/dovecot.conf
 # OS: Linux 2.6.32-042stab076.8 x86_64 Ubuntu 12.04.2 LTS
 auth_mechanisms = plain login
 disable_plaintext_auth = no
 listen = *,[::]
 log_timestamp = %Y-%m-%d %H:%M:%S 
 mail_privileged_group = vmail
 passdb {
   args = /etc/dovecot/dovecot-sql.conf
   driver = sql
 }
 plugin {
   antispam_backend = pipe
   antispam_debug_target = syslog
   antispam_pipe_program = /usr/bin/sa-learn-pipe.sh
   antispam_pipe_program_args = --debug;--username=amavis
   antispam_pipe_program_notspam_arg = --ham
   antispam_pipe_program_spam_arg = --spam
   antispam_pipe_tmpdir = /tmp
   antispam_spam_pattern_ignorecase = SPAM;JUNK
   antispam_trash_pattern_ignorecase = trash;Deleted *
   antispam_verbose_debug = 1
   quota = dict:user::file:/var/vmail/%d/%n/.quotausage
   quota_rule2 = Trash:storage=+100M
   quota_rule3 = Junk:ignore
   quota_warning = storage=95%% quota-warning 95 %u %d
   quota_warning2 = storage=80%% quota-warning 80 %u %d
   quota_warning3 = -storage=100%% quota-below below %u %d
   sieve = /var/vmail/%d/%n/.sieve
 }
 protocols = imap pop3
 service auth {
   unix_listener /var/spool/postfix/private/auth {
 group = postfix
 mode = 0660
 user = postfix
   }
   unix_listener auth-userdb {
 group = vmail
 mode = 0600
 user = vmail
   }
   user = root
 }
 service quota-below {
   executable = script /usr/local/bin/quota-below.sh
   user = vmail
 }
 service quota-warning {
   executable = script /usr/local/bin/quota-warning.sh
   user = vmail
 }
 ssl_cert = /etc/postfix/smtpd.cert
 ssl_key = /etc/postfix/smtpd.key
 userdb {
   args = /etc/dovecot/dovecot-sql.conf
   driver = sql
 }
 protocol imap {
   mail_plugins = quota imap_quota antispam
 }
 protocol pop3 {
   mail_plugins = quota
   pop3_uidl_format = %08Xu%08Xv
 }
 protocol lda {
   info_log_path = /var/log/dovecot-lda.log
   log_path = /var/log/dovecot-lda-errors.log
   mail_plugins = sieve quota
 }
 
 
 Thank you,
 
 -Ben