Re: [Dovecot] Maildir Skeleton

2007-08-09 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 8 Aug 2007, Sebastian Ganschow wrote:


deliver([EMAIL PROTECTED]): Aug 08 23:22:58 Info: cmusieve: Using sieve
path: /var/vmail/[EMAIL PROTECTED]//.dovecot.sieve
deliver([EMAIL PROTECTED]): Aug 08 23:22:58 Info: cmusieve: Executing
script /var/vmail/[EMAIL PROTECTED]//.dovecot.sievec


Dovecot-LDA is using _one_ script, when there is an user Sieve script, the 
global one is _not_ used.


Bye,

- -- 
Steffen Kaiser

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

iQEVAwUBRrq2By9SORjhbDpvAQKMLwf/ejZObQJYslAMDZmt7pAIqBBjOEmRIBvt
4V6qXbR1XDJxuo6lxCW5+YQHurImPLdZJzprdNWGDlGWG9t5EanYXwOh8bGqkUgV
WFr8X+jL8zv60iBxnYHo2lt5MPKxsD8Nbzqr5lSNi01G9UpST4uHsJB149JdwfBt
keJ6zoC+RJBXrjkLM8sIE3jZsCY9Q8gLWpNRB9nsGWQ+P2B7OiLaH3i0JyYG+lW2
6LTDJz2sMjCdFpSEsQu5K/IpWtLdlmjgt7FJax9sN8HRP5Q0NXJOuv7zCuTFIxJB
d2IewvbAUQ2Wl7+xx5mJaO8GAYCzj5NbOvlH627YPz+A4QYwxVTp1A==
=H2Ke
-END PGP SIGNATURE-


Re: [Dovecot] Maildir Skeleton

2007-08-09 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, 9 Aug 2007, Sebastian Ganschow wrote:


But if the user creates his own rules, he also needs to create the spam
rule. Otherwise his spam won't be delivered to the spam folder. I'm not
really sure, if this is the solution i'd like to have.


Yeah ;-) It's my impression, too.

I was on the way to make a patch for this situation, but Timo has moved on 
to another version for the next versions of Dovecot-sieve, which I have 
not looked into.


Bye,

- -- 


Steffen Kaiser

FH Bonn-Rhein-Sieg| e-mail: [EMAIL PROTECTED]
FB Informatik |
Grantham-Allee 20 | phone : +49 2241/865-203
53757 Sankt Augustin  |
Germany - Deutschland | fax   : +49 2241/865-8203

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

iD8DBQFGusnEqkPRRG/0bFIRAgwPAJ9M98Mzfbe5qR6olQ2dS68j3M+/WACdHLLm
QL676rweK4rrJYD9Z1zjloM=
=dvNc
-END PGP SIGNATURE-


Re: [Dovecot] Maildir Skeleton

2007-08-09 Thread Robert Schetterer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sebastian Ganschow schrieb:
 Steffen Kaiser schrieb:
 Dovecot-LDA is using _one_ script, when there is an user Sieve script,
 the global one is _not_ used.
 
 
 Okay now it works.
 
 But if the user creates his own rules, he also needs to create the spam
 rule. Otherwise his spam won't be delivered to the spam folder. I'm not
 really sure, if this is the solution i'd like to have.
 
 Sebastian
 
it should be possible to write a rule in global sieve that
delivers marked spam mails into the users spam folder
it can be done with maildrop, so it should work with sieve too.
After all i dont think this is a good idea ( depend deeply to your setup
 ) cause subfolders are not visiable in pop3
i choose to let the users make their own sieve filters with avelsieve
- --
Mit freundlichen Gruessen
Best Regards

Robert Schetterer

Germany/Bavaria/Munich
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFGutccfGH2AvR16oERAkncAJsHe++90AE9RsvGJRPagG603Nm3nQCfW63l
WaS8XhzbpWIGiCyrzBAGYQ4=
=ekdD
-END PGP SIGNATURE-



Re: [Dovecot] Maildir Skeleton

2007-08-09 Thread Timo Sirainen
On Thu, 2007-08-09 at 10:01 +0200, Steffen Kaiser wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On Thu, 9 Aug 2007, Sebastian Ganschow wrote:
 
  But if the user creates his own rules, he also needs to create the spam
  rule. Otherwise his spam won't be delivered to the spam folder. I'm not
  really sure, if this is the solution i'd like to have.
 
 Yeah ;-) It's my impression, too.
 
 I was on the way to make a patch for this situation, but Timo has moved on 
 to another version for the next versions of Dovecot-sieve, which I have 
 not looked into.

The new Sieve supports include feature, so it should be somewhat easy to
support automatic includes. I think.



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Maildir Skeleton

2007-08-09 Thread Sebastian Ganschow
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



Timo Sirainen schrieb:
 The new Sieve supports include feature, so it should be somewhat easy to
 support automatic includes. I think.

Will this support be included in dovecot 1.1?

Sebastian

- --
Sebastian Ganschow
Königsberger Str. 17
45770 Marl
Germany

Phone:  +49 2365 9 24 96 76
Mobile: +49 172 2 47 41 44
Mail:   [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGuuc3KWhY+QthhLYRAmb2AJ94LgCw53xrzQE0mmRN69r3MOdZxQCeO0kw
DD2eBKf5X6De/Ft3UD+pIg8=
=VPmo
-END PGP SIGNATURE-


Re: [Dovecot] Maildir Skeleton

2007-08-09 Thread Greg
Le jeudi 09 août 2007 09:47, Sebastian Ganschow a écrit :
 But if the user creates his own rules, he also needs to create the spam
 rule. Otherwise his spam won't be delivered to the spam folder. I'm not
 really sure, if this is the solution i'd like to have.

Why not include a default sieve script in your maildir skeleton that will take 
care of moving spams into the right folder then ? If the user later deletes 
this rule it's out of your control sure, but if you send a welcome message 
tell them about this rule and why it's here to help them.

Grégory


Re: [Dovecot] Maildir Skeleton

2007-08-08 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 7 Aug 2007, Sebastian Ganschow wrote:


/var/vmal/globalsieverc:
require [fileinto];
# Move spam to spam folder
if exists X-Spam-Flag {
 fileinto spam;
 # Stop here so that we do not reply on spams
 stop;
}

Is there anything else I need to configure?


The compiled script needs to be written there by the user. Is it there?
If not: you might pre-compile it with sievec (as root).
If yes: I'm not sure, if Sieve errors can happen, when the script is 
already compiled; I'd enable a+wx permission for testing purpose on 
/var/vmail.


BTW: There are mail systems that also set X-Spam-Flag: no ;-)
Do you remove this flag on incoming mails?

Bye,

- -- 
Steffen Kaiser

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

iQEVAwUBRrlpWC9SORjhbDpvAQJ54Qf/UicG/fu5vjHzG0ATTdmhOaxiB0jujesW
IeMdZ9lACgZCAbtd/iHfeRsCfrTyB5UbT5K7gQi/qOQW+Dj0MEcsrtKaLdHLBU6G
jjSFarGnWtPHiwNN/F2vAFh7tTz7hgXW9/6d430NA1sZk2dJ4ykni4gQYaspyKCW
3aK7zHnwvgzAx6yawoYx4FbqpukTi1LKGskDHKnK5TuJ3fw+UIlp6ol59bdGKyWD
LNdb4qITwilP2Hf5JaaHj3dOUUc8AAyV/NRvkRj81FQDXpbmUyolOFLrEsRixgyd
DHBtkpn2Nh2vgr1oH5M3gMozMoVws9uIpSkuvujtx899ilT+tOsJKw==
=qZ+g
-END PGP SIGNATURE-


Re: [Dovecot] Maildir Skeleton

2007-08-08 Thread Robert Schetterer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sebastian Ganschow schrieb:
 
 Robert Schetterer schrieb:
 so do you have any idea why global sieve-filter file
 does not work with your system?
 
 No I've got no idea.
 
 dovecot.conf:
 snip
 protocol lda {
   mail_plugin= quota, cmusieve
   global_script_path = /var/vmail/globalsieverc
 }
 /snip
 
 /var/vmal/globalsieverc:
 require [fileinto];
 # Move spam to spam folder
 if exists X-Spam-Flag {
   fileinto spam;
   # Stop here so that we do not reply on spams
   stop;
 }
 
 Is there anything else I need to configure?
 
 Sebastian

you should do verbose logging to find out what happens
- --
Mit freundlichen Gruessen
Best Regards

Robert Schetterer

Germany/Bavaria/Munich
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFGuXAMfGH2AvR16oERAiLXAJ9PBVoPwhMX+izHXgjjA0rbOh+94gCeNdgW
//ddnno86NpGxkwsvNMQblQ=
=dZuc
-END PGP SIGNATURE-



Re: [Dovecot] Maildir Skeleton

2007-08-08 Thread Christian Schmidt
Hello Sebastian,

Sebastian Ganschow, 07.08.2007 (d.m.y):

 Scott Silva schrieb:
  What are you using to create users?
  MAybe you could add something to the user creation system.
 
 I'm using postfixAdmin but I don't want to modify it.

What you could do is create a wrapper script that
1. invokes postfixAdmin and after that
2. creates the maildirs as needed.

Keep it simple!

Gruss/Regards,
Christian Schmidt

-- 
You have no real enemies.


Re: [Dovecot] Maildir Skeleton

2007-08-08 Thread Robert Schetterer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Christian Schmidt schrieb:
 Hello Sebastian,
 
 Sebastian Ganschow, 07.08.2007 (d.m.y):
 
 Scott Silva schrieb:
 What are you using to create users?
 MAybe you could add something to the user creation system.
 I'm using postfixAdmin but I don't want to modify it.
 
 What you could do is create a wrapper script that
 1. invokes postfixAdmin and after that
 2. creates the maildirs as needed.
 
 Keep it simple!
 
 Gruss/Regards,
 Christian Schmidt
 
That would mean to sudo apache to create maildirs
this would be complex to code in postfixadmin ( have to be php crack )
cause its not designed to create maildir that way, also it would break
the chance to have the web gui , database , smtp server on different
physical machines.and end ito very complex setups.

postfixadmin sends a welcome mail, the idea to create needed stuff
with that mail is ok , and it work if you have maildrop/procmail as
transport ( using a global script )

- --
Mit freundlichen Gruessen
Best Regards

Robert Schetterer

Germany/Bavaria/Munich
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFGuYVqfGH2AvR16oERAuUcAJ9P+KhOaECYV156++owIAONgZJikgCfWWo2
aAjkHSQoCEBQF1abgDF8N14=
=pxX1
-END PGP SIGNATURE-



Re: [Dovecot] Maildir Skeleton

2007-08-08 Thread Tom Diehl

On Wed, 8 Aug 2007, Robert Schetterer wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Christian Schmidt schrieb:

Hello Sebastian,

Sebastian Ganschow, 07.08.2007 (d.m.y):


Scott Silva schrieb:

What are you using to create users?
MAybe you could add something to the user creation system.

I'm using postfixAdmin but I don't want to modify it.


What you could do is create a wrapper script that
1. invokes postfixAdmin and after that
2. creates the maildirs as needed.

Keep it simple!

Gruss/Regards,
Christian Schmidt


That would mean to sudo apache to create maildirs
this would be complex to code in postfixadmin ( have to be php crack )
cause its not designed to create maildir that way, also it would break
the chance to have the web gui , database , smtp server on different
physical machines.and end ito very complex setups.

postfixadmin sends a welcome mail, the idea to create needed stuff
with that mail is ok , and it work if you have maildrop/procmail as
transport ( using a global script )


FWIW, it also works using the dovecot lda and sieve. Sending the welcome
message from pfa causes postfix to make the necessary maildir structure
when the message gets delivered.

Hope this helps,

Regards,

--
Tom Diehl   [EMAIL PROTECTED]   Spamtrap address [EMAIL 
PROTECTED]


Re: [Dovecot] Maildir Skeleton

2007-08-08 Thread Sebastian Ganschow
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sebastian Ganschow schrieb:
 Steffen Kaiser schrieb:
 The compiled script needs to be written there by the user. Is it there?
 If not: you might pre-compile it with sievec (as root).
 If yes: I'm not sure, if Sieve errors can happen, when the script is
 already compiled; I'd enable a+wx permission for testing purpose on
 /var/vmail.
 
 I've tried it just yet, but it doesn't change anythin. With verbose logging
 there's no sign that the globalsieve file is used.
 

Even if I set global_script_dir = /var/vmail dovecot won't use the global
filter.

Sebastian
- --
Sebastian Ganschow
Königsberger Str. 17
45770 Marl
Germany

Phone:  +49 2365 9 24 96 76
Mobile: +49 172 2 47 41 44
Mail:   [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGufMsKWhY+QthhLYRAiL2AKCZN5OfEKx/VUvY9tEBXoffCpRudACgog8E
6nrY5lpeRwko6zs1N5eovWI=
=T6OF
-END PGP SIGNATURE-


Re: [Dovecot] Maildir Skeleton

2007-08-08 Thread pod
 SG == Sebastian Ganschow [EMAIL PROTECTED] writes:

SG Even if I set global_script_dir = /var/vmail dovecot won't use
SG the global filter.

shell$ cd dovecot-sieve-1.0.2
shell$ find . -type f -name \*.[ch] -print0 | xargs -0 grep -i -e global_script
./src/cmusieve-plugin.c:script_path = 
getenv(GLOBAL_SCRIPT_PATH);

shell$ 

Have you tried

  global_script_path = /var/vmail/script.sieve

Note that the var name is _path not _dir, and the value should be a script
file not a directory.

I'm just jumping in here mid-thread so apologies if I'm misunderstanding
the nature of your problem.


Re: [Dovecot] Maildir Skeleton

2007-08-08 Thread Timo Sirainen
On Wed, 2007-08-08 at 18:36 +0200, Sebastian Ganschow wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Steffen Kaiser schrieb:
 
  The compiled script needs to be written there by the user. Is it there?
  If not: you might pre-compile it with sievec (as root).
  If yes: I'm not sure, if Sieve errors can happen, when the script is
  already compiled; I'd enable a+wx permission for testing purpose on
  /var/vmail.
 
 I've tried it just yet, but it doesn't change anythin. With verbose logging
 there's no sign that the globalsieve file is used.

Set mail_debug=yes. Make deliver log its info and errors to a single
file:

protocol lda {
  log_path = /var/log/deliver.log
  info_log_path = /var/log/deliver.log
}

Now after trying to deliver a mail, what does the log contain?



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Maildir Skeleton

2007-08-08 Thread Sebastian Ganschow
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Timo Sirainen schrieb:
 Set mail_debug=yes. Make deliver log its info and errors to a single
 file:
 
 protocol lda {
   log_path = /var/log/deliver.log
   info_log_path = /var/log/deliver.log
 }
 
 Now after trying to deliver a mail, what does the log contain?
 


The logfile contains the following lines:

deliver([EMAIL PROTECTED]): Aug 08 23:22:58 Info: Loading modules from
directory: /usr/lib/dovecot/lda
deliver([EMAIL PROTECTED]): Aug 08 23:22:58 Info: Module loaded:
/usr/lib/dovecot/lda/lib10_quota_plugin.so
deliver([EMAIL PROTECTED]): Aug 08 23:22:58 Info: Module loaded:
/usr/lib/dovecot/lda/lib90_cmusieve_plugin.so
deliver([EMAIL PROTECTED]): Aug 08 23:22:58 Info: auth input:
[EMAIL PROTECTED]
deliver([EMAIL PROTECTED]): Aug 08 23:22:58 Info: auth input:
home=/var/vmail/[EMAIL PROTECTED]/
deliver([EMAIL PROTECTED]): Aug 08 23:22:58 Info: auth input:
mail=maildir:/var/vmail/[EMAIL PROTECTED]/
deliver([EMAIL PROTECTED]): Aug 08 23:22:58 Info: auth input: uid=101
deliver([EMAIL PROTECTED]): Aug 08 23:22:58 Info: auth input: gid=12
deliver([EMAIL PROTECTED]): Aug 08 23:22:58 Info: auth input:
quota=maildir:storage=102400
deliver([EMAIL PROTECTED]): Aug 08 23:22:58 Info: maildir:
data=/var/vmail/[EMAIL PROTECTED]/
deliver([EMAIL PROTECTED]): Aug 08 23:22:58 Info: maildir:
root=/var/vmail/[EMAIL PROTECTED], index=/var/vmail/[EMAIL PROTECTED],
control=, inbox=
deliver([EMAIL PROTECTED]): Aug 08 23:22:58 Info: cmusieve: Using sieve
path: /var/vmail/[EMAIL PROTECTED]//.dovecot.sieve
deliver([EMAIL PROTECTED]): Aug 08 23:22:58 Info: cmusieve: Executing
script /var/vmail/[EMAIL PROTECTED]//.dovecot.sievec
deliver([EMAIL PROTECTED]): Aug 08 23:22:58 Info:
msgid=[EMAIL PROTECTED]: saved mail
to INBOX

Nothing that indicates the usage of the global sieve file.

For the test I've set the permissions of /var/vmail and the filter file to
777. Owner of the directory an the filter file is user vmail with group mail.

Sebastian
- --
Sebastian Ganschow
Königsberger Str. 17
45770 Marl
Germany

Phone:  +49 2365 9 24 96 76
Mobile: +49 172 2 47 41 44
Mail:   [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGujSFKWhY+QthhLYRAkPHAKCS3CELuYrnUBRnAO+SJVHfAvVARACfaW6a
hTNYB66eUPXVlCNFw//htWw=
=HRy5
-END PGP SIGNATURE-


Re: [Dovecot] Maildir Skeleton

2007-08-07 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 7 Aug 2007, Sebastian Ganschow wrote:


I'd like to prepare a skeleton for the users maildir to create i.e. a spam
folder and a sieve file per default.



Is there any chance to realize this with dovecot?


Try: http://wiki.dovecot.org/PostLoginScripting

But the script runs for each login.

Bye,

- -- 
Steffen Kaiser

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

iQEVAwUBRrhy2i9SORjhbDpvAQIZiAgAlo6RC/39/mMj+rKiZ9i15fc6PF0lrK4X
bvPTyhSSngC1Eeq3Ozc76J5Y4OCw4eKp9ouBECu840v81zRMe01An0zJjmrf/tjx
yyWE/aJiGg4yOk3oP2pdfv8+MYawYxb6EPW+NmEyCr/6LHDfONa4PWC76iT6XZsF
HOAxXE99qm4Kv9jGINKsRL1+OK+KWWzplF6hVtsrY7+8D+zk2YiQtFCKFK5SnpdA
X2IMUfrYVovIJAUGPdzrLOVgeJxQJbXTqkG5dhqHZnYc6mEcrwsvRzavExz1qjmx
6uPUA7UsG/DM0Xj4rBoPXT9m+jwSouEUyM1lKNPzUsq8RyvhxOSN/g==
=9nBa
-END PGP SIGNATURE-


Re: [Dovecot] Maildir Skeleton

2007-08-07 Thread Peter Hessler
If your OS uses /etc/skel to build new users from (many do), you can 
create it there.  Most OSs that use /etc/skel merely copy files from 
there, then chown them to the appropriate user and group.  Perms 
shouldn't be modified.


On 2007 Aug 07 (Tue) at 14:37:03 +0200 (+0200), Sebastian Ganschow wrote:
:-BEGIN PGP SIGNED MESSAGE-
:Hash: SHA1
:
:Hi,
:
:I'm setting up a new mailserver with postfix and Dovecot.
:
:I'd like to prepare a skeleton for the users maildir to create i.e. a spam
:folder and a sieve file per default.
:
:Is there any chance to realize this with dovecot?
:
:Regards
:Sebastian
:- --
:Sebastian Ganschow
:K??nigsberger Str. 17
:45770 Marl
:Germany
:
:Phone:  +49 2365 9 24 96 76
:Mobile: +49 172 2 47 41 44
:Mail:   [EMAIL PROTECTED]
:-BEGIN PGP SIGNATURE-
:Version: GnuPG v1.4.7 (MingW32)
:Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
:
:iD8DBQFGuGdvKWhY+QthhLYRArCQAKCKLAaWetcu84vqnlr+a31K1qhKNgCfVtGL
:71lFFadsY+9U1vIdNdhIcZE=
:=biAm
:-END PGP SIGNATURE-
:


-- 
A sine curve goes off to infinity or at least the end of the blackboard.
-- Prof. Steiner


Re: [Dovecot] Maildir Skeleton

2007-08-07 Thread Sebastian Ganschow
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Peter Hessler schrieb:
 If your OS uses /etc/skel to build new users from (many do), you can 
 create it there.  Most OSs that use /etc/skel merely copy files from 
 there, then chown them to the appropriate user and group.  Perms 
 shouldn't be modified.

It would work if the users weren't virtual. There are only virtual users on
the mail system.

Sebastian

- --
Sebastian Ganschow
Königsberger Str. 17
45770 Marl
Germany

Phone:  +49 2365 9 24 96 76
Mobile: +49 172 2 47 41 44
Mail:   [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGuItoKWhY+QthhLYRAmdGAKCgbg2mvg8dUh14AqvMFJKnBp5YigCfWyXX
17qBtdCdl4j2q7AvuBq1jKY=
=Jo8x
-END PGP SIGNATURE-


Re: [Dovecot] Maildir Skeleton

2007-08-07 Thread Patrick Ben Koetter
* Sebastian Ganschow [EMAIL PROTECTED]:
 
 Peter Hessler schrieb:
  If your OS uses /etc/skel to build new users from (many do), you can 
  create it there.  Most OSs that use /etc/skel merely copy files from 
  there, then chown them to the appropriate user and group.  Perms 
  shouldn't be modified.
 
 It would work if the users weren't virtual. There are only virtual users on
 the mail system.

That's no problem either. The question is: Are you looking for an automated
process or does cp -a template_maildir/ /srv/mail/newuser/ the job?

[EMAIL PROTECTED]

-- 
state of mind
Agentur für Kommunikation, Design und Softwareentwicklung

Patrick KoetterTel: 089 45227227
Echinger Strasse 3 Fax: 089 45227226
85386 Eching   Web: http://www.state-of-mind.de

Amtsgericht MünchenPartnerschaftsregister PR 563


Re: [Dovecot] Maildir Skeleton

2007-08-07 Thread Charles Marcus

That's no problem either. The question is: Are you looking for an automated
process or does cp -a template_maildir/ /srv/mail/newuser/ the job?



It should be automated.

A possible solution would be a cronjob, which checks every few minutes if
there is a new user without a maildir. But this requires that the user
hasn't logged on before the cronjob is executed.

Another approach is to check every maildir for an existing .Spam folder and
a .dovecot.sieve file and create both if they don't exist.

If dovecot couldn't do this by itself, I'm going to realize it with a cronjob.


Why not just do this with a post-logon script?

http://wiki.dovecot.org/PostLoginScripting

--

Best regards,

Charles


Re: [Dovecot] Maildir Skeleton

2007-08-07 Thread Scott Silva
Sebastian Ganschow spake the following on 8/7/2007 9:38 AM:
 Patrick Ben Koetter schrieb:
 * Sebastian Ganschow [EMAIL PROTECTED]:
 Peter Hessler schrieb:
 If your OS uses /etc/skel to build new users from (many do), you can 
 create it there.  Most OSs that use /etc/skel merely copy files from 
 there, then chown them to the appropriate user and group.  Perms 
 shouldn't be modified.
 It would work if the users weren't virtual. There are only virtual users on
 the mail system.
 That's no problem either. The question is: Are you looking for an automated
 process or does cp -a template_maildir/ /srv/mail/newuser/ the job?
 
 It should be automated.
 
 A possible solution would be a cronjob, which checks every few minutes if
 there is a new user without a maildir. But this requires that the user
 hasn't logged on before the cronjob is executed.
 
 Another approach is to check every maildir for an existing .Spam folder and
 a .dovecot.sieve file and create both if they don't exist.
 
 If dovecot couldn't do this by itself, I'm going to realize it with a cronjob.
 
 Sebastian
 
What are you using to create users?
MAybe you could add something to the user creation system.
-- 

MailScanner is like deodorant...
You hope everybody uses it, and
you notice quickly if they don't



Re: [Dovecot] Maildir Skeleton

2007-08-07 Thread Sebastian Ganschow
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Scott Silva schrieb:
 What are you using to create users?
 MAybe you could add something to the user creation system.

I'm using postfixAdmin but I don't want to modify it.

Sebastian

- --
Sebastian Ganschow
Königsberger Str. 17
45770 Marl
Germany

Phone:  +49 2365 9 24 96 76
Mobile: +49 172 2 47 41 44
Mail:   [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGuKoBKWhY+QthhLYRAgeYAKCHRZiLW/wjQ/SjpFuM+PoLSO2NUACeP0OO
YEXvoEgBTB0wLA64NP9FukU=
=xgOo
-END PGP SIGNATURE-


Re: [Dovecot] Maildir Skeleton

2007-08-07 Thread Sebastian Ganschow
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Charles Marcus schrieb:
 
 Why not just do this with a post-logon script?
 
 http://wiki.dovecot.org/PostLoginScripting

This would only work, if the user logs in before he gets the first mail.

Sebastian

- --
Sebastian Ganschow
Königsberger Str. 17
45770 Marl
Germany

Phone:  +49 2365 9 24 96 76
Mobile: +49 172 2 47 41 44
Mail:   [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGuKpYKWhY+QthhLYRAugAAKCKto8coVYvONIYLpZ7r+/0crDZcwCgjHuC
rqSurMbqtYCoWO0xtqM4shs=
=9lc4
-END PGP SIGNATURE-


Re: [Dovecot] Maildir Skeleton

2007-08-07 Thread Udo Rader

On Tue, 2007-08-07 at 19:22 +0200, Sebastian Ganschow wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Charles Marcus schrieb:
  
  Why not just do this with a post-logon script?
  
  http://wiki.dovecot.org/PostLoginScripting
 
 This would only work, if the user logs in before he gets the first mail.

Hmm, dovecot is all about retrieving received mail. If you need things
to be done before a user retrieves mail initially, you _need_ to do it
either via postfixadmin (don't know that piece) or using the LDA you are
using to route the mail to the fitting (virtual) user.

procmail for example could make you happy here (man procmailex).

major drawback however for all those operations is that things are
checked over and over again for each mail received.

another (more sane) option would be to write the list of newly created
users into a file/database/... and have a cronjob loop over this list,
create the skeleton things you need and finally remove the user if the
creation was successfull. Yet keep in mind that cron jobs are executed
once a minute at most, so the time between creating the user and the
cronjob running might cause some mails getting in before your user has
been correctly initialized.

-- 
Udo Rader

bestsolution.at EDV Systemhaus GmbH
http://www.bestsolution.at


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Maildir Skeleton

2007-08-07 Thread Charles Marcus

Why not just do this with a post-logon script?

http://wiki.dovecot.org/PostLoginScripting


This would only work, if the user logs in before he gets the first 
mail.


Ahh, right, sorry... this would not be the best way anyway, since as 
someone else pointed out, the script would run every time the user 
logged in.


Then as someone else pointed out, the best way would be the user 
creation utility, or maybe the LDA... what do you use for deliver?


--

Best regards,

Charles


Re: [Dovecot] Maildir Skeleton

2007-08-07 Thread Sebastian Ganschow
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Udo Rader schrieb:

 procmail for example could make you happy here (man procmailex).

May be, but I'm using dovecots deliver.

 another (more sane) option would be to write the list of newly created
 users into a file/database/... and have a cronjob loop over this list,
 create the skeleton things you need and finally remove the user if the
 creation was successfull. Yet keep in mind that cron jobs are executed
 once a minute at most, so the time between creating the user and the
 cronjob running might cause some mails getting in before your user has
 been correctly initialized.

If the cronjob will be executed every minute, the chance for some mails
getting in before the maildir has been created will be very low, because
the created alias has to be synchronized to the mailrelay first. This
happens every 15 minutes.

I think the cronjob approach will be the best solution.

- --
Sebastian Ganschow
Königsberger Str. 17
45770 Marl
Germany

Phone: +49 2365 9 24 96 76
Mobile: +49 172 2 47 41 44
Mail: [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGuMbIKWhY+QthhLYRAr0oAJ95wCphT67fVKJUZS05mxKqBVlKkwCdG1IG
/ble5it+wMW7rF7YVxKps9Q=
=WkL8
-END PGP SIGNATURE-


Re: [Dovecot] Maildir Skeleton

2007-08-07 Thread albinootje
Sebastian Ganschow wrote:

 If the cronjob will be executed every minute, the chance for some
 mails getting in before the maildir has been created will be very
 low, because the created alias has to be synchronized to the
 mailrelay first. This happens every 15 minutes.
 
 I think the cronjob approach will be the best solution.

am i missing something ? i am using postfixadmin+dovecot+dovecot-LDA and
i thought the spam-folder gets created the moment there's spam to be
delivered
in the spam-folder

so why not just simply have a global sieve-file ?

i used these 2 pages for my setup :
http://wiki.dovecot.org/HowTo/DovecotLDAPostfixAdminMySQL
http://workaround.org/articles/ispmail-etch/#sieve-filtering-out-spam



Re: [Dovecot] Maildir Skeleton

2007-08-07 Thread Sebastian Ganschow
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

albinootje schrieb:
 am i missing something ? i am using postfixadmin+dovecot+dovecot-LDA and
 i thought the spam-folder gets created the moment there's spam to be
 delivered
 in the spam-folder
 
 so why not just simply have a global sieve-file ?
 
 i used these 2 pages for my setup :
 http://wiki.dovecot.org/HowTo/DovecotLDAPostfixAdminMySQL
 http://workaround.org/articles/ispmail-etch/#sieve-filtering-out-spam
 

The global sieve-filter file won't work on my system, but if I configure a
per user sieve-file with the rule, the spam folder will be created.

If I'll get the global filter working, it would the perfect solution.

Sebastian

- --
Sebastian Ganschow
Königsberger Str. 17
45770 Marl
Germany

Phone:  +49 2365 9 24 96 76
Mobile: +49 172 2 47 41 44
Mail:   [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGuNYcKWhY+QthhLYRAjqwAJ9Rmup8RLg+M7oI3z7PguqTX2onagCeOi3t
5jAKwRFdZ5sMptklNZ7zl90=
=y837
-END PGP SIGNATURE-


Re: [Dovecot] Maildir Skeleton

2007-08-07 Thread Robert Schetterer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sebastian Ganschow schrieb:
 albinootje schrieb:
 am i missing something ? i am using postfixadmin+dovecot+dovecot-LDA and
 i thought the spam-folder gets created the moment there's spam to be
 delivered
 in the spam-folder
 
 so why not just simply have a global sieve-file ?
 
 i used these 2 pages for my setup :
 http://wiki.dovecot.org/HowTo/DovecotLDAPostfixAdminMySQL
 http://workaround.org/articles/ispmail-etch/#sieve-filtering-out-spam
 
 
 The global sieve-filter file won't work on my system, but if I configure a
 per user sieve-file with the rule, the spam folder will be created.
 
 If I'll get the global filter working, it would the perfect solution.
 
 Sebastian
 
so do you have any idea why global sieve-filter file
does not work with your system?
- --
Mit freundlichen Gruessen
Best Regards

Robert Schetterer

Germany/Bavaria/Munich
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFGuNbdfGH2AvR16oERAu6gAJ9opSqXewNY/1tEbm5/NBTjIFU5BwCaA02Z
LV5ZxJbfjAOKCGk8QHls5Ik=
=12WU
-END PGP SIGNATURE-



Re: [Dovecot] Maildir Skeleton

2007-08-07 Thread Sebastian Ganschow
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Robert Schetterer schrieb:
 so do you have any idea why global sieve-filter file
 does not work with your system?

No I've got no idea.

dovecot.conf:
snip
protocol lda {
mail_plugin= quota, cmusieve
global_script_path = /var/vmail/globalsieverc
}
/snip

/var/vmal/globalsieverc:
require [fileinto];
# Move spam to spam folder
if exists X-Spam-Flag {
  fileinto spam;
  # Stop here so that we do not reply on spams
  stop;
}

Is there anything else I need to configure?

Sebastian
- --
Sebastian Ganschow
Königsberger Str. 17
45770 Marl
Germany

Phone:  +49 2365 9 24 96 76
Mobile: +49 172 2 47 41 44
Mail:   [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGuNppKWhY+QthhLYRAoaZAKCWkYT9G9saoQrzzEAwFWW3x1JLvACglvdL
Z0bDAOsI3Zji4/U2bQu0eCY=
=vQOu
-END PGP SIGNATURE-