[Postfixbuch-users] .forward Courier-IMAP und MySQL mit Postfix

Claudio Tornado ClaudioTornado at gmx.de
Mi Apr 9 22:31:42 CEST 2003


Ralf Ebling schrieb:

>Erzähl doch mal was Du da gemacht hast. Vielleicht kann das noch jemand 
>gebrauchen (ich z.B. :-)...

>Ralf

Hallo Ralf, 
ich hatte schon eine Zusammenfassung der Konfiguration per Mail an an die
angegebene 
Mailingliste geschrieben. 

> http://lists.sourceforge.net/lists/listinfo/courier-maildrop

Dies hier nochmal anbei:
Zusammen mit dieser Auflistung und der Installationsanleitung von Maildrop
sollte es gehen.


>From: Gatis Gailis 
>Claudio - it certainly seems that you have made it through this mess.:) 
>Could you please post detailed config of your maildrop setup; also so that 
>we don't have to >ask you the same questions, just look at your setup.

well, here it is:
># ____________________________________________________________
># 1.
>cat /etc/maildrop/maildropmysql.conf

hostname        localhost
port            3306
socket          /var/lib/mysql/mysql.sock
database        mailbase
dbuser          root
dbpw            **************
dbtable         mailbase

default_uidnumber       5001
default_gidnumber       5001
uid_field               id
uidnumber_field         uid
gidnumber_field         gid
maildir_field           homedir
homedirectory_field     homedir
#quota_field            quota
#mailstatus_field       vmailstatus
#where_clause           ""




># 2. Your final maildrop ./configure options 
--without-db 
--with-etcdir=/etc/maildrop 
--enable-syslog=1 
--enable-maildrop-uid=mailsystem 
--enable-maildrop-gid=mailsystem 
--enable-restrict-trusted=1 
--enable-trusted-users='mailsystem postfix root' 
--enable-trusted-groups='root mailsystem postdrop maildrop' 
--enable-maildirquota 
--enable-use-dotlock=0 
--enable-use-flock=0 
--enable-maildropmysql 
--with-mysqlconfig=/etc/maildrop/maildropmysql.conf 

># 3.
>cat /etc/maildrop/maildroprc
I have delete this file! 

># 4. Maildrop binary permissions and owner
>ls /usr/local/bin/maildrop*

server:/usr/local/bin # dir maildrop*
-rwsr-sr-x    1 root     root       149688 Apr  4 15:46 maildrop
server:/usr/local/bin # dir
total 332
drwxr-xr-x    2 root     root          296 Apr  5 14:16 .
drwxr-xr-x   11 root     root          264 Apr  5 14:16 ..
-rwxr-xr-x    1 root     root        19944 Apr  4 15:46 deliverquota
-rwxr-xr-x    1 mailsystem mailsystem     9948 Apr  4 15:46 lockmail
-rwxr-xr-x    1 root     root        19288 Apr  4 15:46 mailbot
-rwxr-xr-x    1 root     root        21768 Apr  4 15:46 maildirmake
-rwsr-sr-x    1 root     root       149688 Apr  4 15:46 maildrop
-rwxr-xr-x    1 root     root        17240 Apr  4 15:46 makemime
-rwxr-xr-x    1 root     root        39288 Apr  4 15:46 reformail
-rwxr-xr-x    1 root     root        47448 Apr  4 15:46 reformime
lrwxrwxrwx    1 root     root           24 Apr  5 14:16 uvscan ->
/usr/local/uvscan/uvscan
server:/usr/local/bin # 

>maildrop -v
server:/usr/local/bin # maildrop -v
maildrop 1.5.2 Copyright 1998-2003 Double Precision, Inc.
Maildir quota extension enabled.
Virtual user database via MySQL extension enabled.
This program is distributed under the terms of the GNU General Public
License. See COPYING for additional information.

># 5. Postfix
># That master.cf line
I add only this line:

maildrop          unix  -       n       n       -       -       pipe
  flags=Ru user=mailsystem argv=/usr/local/bin/maildrop -d ${recipient}

># What exactly you changed in main.cf
I only add this line:
maildrop_destinaton_recipient_limit = 1
(This parameter wasn't there before.)

># 6. Mysql

Databasename: mailbase
Tablename: mailbase
Fields:
name                   type                  Null         std

id                        varchar(240)    notnull    
maildir                 varchar(100)    notnull
uid                       int(6)               notnull     5001
gid                       int(6)               notnull     5001
password             varchar(255)   notnull
home                   varchar(100)   notnull     /var/spool/maildirs
homedir               varchar(100)   notnull      
quota                   int(6)              notnull    0
vmailstatus           varchar(100)   notnull

What's in?
id                        claudio at intern.de
maildir                intern.de/claudio/
uid                      5001
gid                      5001
password            *********
home                   /var/spool/maildirs
homedir               /var/spool/maildirs/intern.de/claudio/
quota                   0
vmailstatus           ''

maildrop use the field 'homedir'. The two fields 'home' and 'maildir' are
use of courier-imap. 

># It looks from one of your posts that you have entry like this:
>#transport
>#intern.de     maildrop:
># Is the colon actually there after maildrop in your config? Was it there
when 
>you had virtual in that field? My config is without it.
Yes, this colon is actually in my transport:
intern.de     maildrop:

As I use virtual for mail-deliver, my colon was intern.de  virtual: 
For maildrop I change this line to 
intern.de maildrop:

(Don't forget postmap transport)


mailbox:
server:/var/spool/maildirs/intern.de/claudio # dir
total 17
drwxrwx---   12 mailsystem mailsystem      456 Jul  6 07:26 .
drwxrwxrwx    5 mailsystem mailsystem      120 Apr  4 16:52 ..
drwxrwx---    5 mailsystem mailsystem      184 Apr  1 09:04 .Aufheben
drwxrwx---    5 mailsystem mailsystem      184 Jul  6 08:21 .Entw&APw-rfe
drwxrwx---    5 mailsystem mailsystem      184 Jul  5 17:20 .Gesendete
Objekte
-rwxrwx---    1 mailsystem mailsystem      119 Apr  4 13:58
courierimapsubscribed
-rw-r--r--    1 mailsystem mailsystem      586 Jul  6 07:26 courierimapuiddb
drwxrwx---    2 mailsystem mailsystem      752 Jul  6 07:26 cur
-rwx------    1 mailsystem mailsystem      159 Apr  6 19:15 .mailfilter
drwxrwx---    2 mailsystem mailsystem       48 Jul  6 07:22 new
-rw-r--r--    1 root     root          186 Apr  6 15:29 text.txt
drwxrwx---    2 mailsystem mailsystem       48 Jul  6 08:22 tmp

you can see, that mailsystem is the owner of all folder in maildirs

cat .mailfilter
logfile '/var/log/claudio'
cc "| mailbot -t /var/spool/maildirs/intern.de/claudio/text.txt \
            -A 'From: claudioTornado at gmx.de' /usr/sbin/sendmail -f ''"

This send an autorespond text to mailsender. 

I hope this may help you.
Claudio Tornado
claudiotornado at gmx.de

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!



Mehr Informationen über die Mailingliste Postfixbuch-users