|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Liviu Daia (Liviu.Daia
imar.ro)Date: Thu Nov 01 2001 - 13:05:19 CST
On 1 November 2001, Alberto <aalberto
euskalnet.net> wrote:
> Hello,
>
> I'm getting crazy about this.
Nah, you're too young for that. ;-)
> I have a Debian 2.2 Linux distribution, with a following packages:
>
> ii procmail 3.15.2-1 Versatile e-mail processor.
> ii postfix 0.0.19991231pl A mail transport agent
>
> with the line of /etc/postfix/main.cf:
>
> mailbox_command = /usr/bin/procmail -t
> # mailbox_command = /usr/bin/procmail -a "$EXTENSION"
> # mailbox_command = /usr/bin/procmail -a $DOMAIN -d $LOGNAME
>
> Procmail and Procmail rules worked OK without $HOME/.forward
> file... By the way, in what cases must be used the comment lines?
The first one is useful when you want to pass Procmail the
extensions as known to Postfix, instead of parsing them with a recipe.
The second one turns on explicit delivery, which is probably only
useful if you want to deliver to root. That won't work otherwise,
because when delivering to root, Postfix would invoke Procmail under the
authority of $default_privs (typically "nobody"), so Procmail would be
fooled into delivering the message to "nobody". Of course, Procmail
must be setuid to root to be used that way.
On a side note, you probably want to drop the "-t" above.
> Well, I installed the Cyrus Imap server, for access from
> windows-client to mail by IMAP protocol,
>
> ii cyrus-admin 1.5.19-2 Cyrus mail system (administration tool)
> ii cyrus-common 1.5.19-2 Cyrus mail system (common files)
> ii cyrus-imapd 1.5.19-2 Cyrus mail system (IMAP support)
That's _very_ old, you might consider upgrading to a newer version.
> in /etc/postfix/main.cf, I uncommented the line:
>
> mailbox_transport = cyrus
>
> in /etc/postfix/master.cf, there is the line:
>
> cyrus unix - n n - - pipe
> flags=R user=cyrus argv=/usr/sbin/cyrdeliver -e -m ${extension} ${user}
>
> and Cyrus works fine, the access from windows-client by IMAP is good
> but I have found 2 BIG problems...
>
> All the old mail is stored in spool file format, and Cyrus uses its
> own directory structure and maildir format. How can I migrate all
> these mails to Cyrus format?
Not tested:
for U in /var/spool/mail/*
do
formail -I"From " <$U -s /usr/sbin/cyrdeliver -e `basename $U`
done
(IIRC, Cyrus deliver would bail out if you don't remove the "From_"s).
> Another problem:
>
> Procmail seems not working, the rules are not functional yet, I
> have changed in the rules of delivery the path to maildir format as
> Procmail documentation tells, but without any result.
[...]
Right, $mailbox_transport overrides $mailbox_command, so Procmail
is left out of the game. Well, the solution to this depends on what
you want. If you used Procmail only as a LDA, you can simply forget
about it. If you used it for spam rejection and *simple* filtering,
you might consider switching to Sieve (which comes with Cyrus imapd).
If you used Procmail for more complex filtering, you might want to
leave out $mailbox_transport, and invoke Cyrus deliver from Procmail.
In the latter case, you probably want a fallback for users without a
~/.procmailrc: just create a file
/etc/procmailrc
owned by root and mode 0600 (IIRC), containing something like
DEFAULT=|/usr/sbin/cyrdeliver -e $USER
On a second thought, I think $USER is not available at the time
Procmail reads /etc/procmailrc, so you might try something else:
mailbox_command = /usr/bin/procmail -a $LOGNAME
and put into /etc/procmailrc something like
DEFAULT=|/usr/sbin/cyrdeliver -e "$1"
On 1 November 2001, Ralf Hildebrandt <Ralf.Hildebrandt
charite.de>
wrote:
[...]
> Cyrus doesn't use maildir.
[...]
Cyrus does use some sort of indexed maildir. Knowing that however
doesn't do you any good, since you're not supposed to mess with the
contents of mailboxes directly (bad things will happen if you do).
Regards,
Liviu Daia
-- Dr. Liviu Daia e-mail: Liviu.Daiaimar.ro Institute of Mathematics web page: http://www.imar.ro/~daia of the Romanian Academy PGP key: http://www.imar.ro/~daia/daia.asc - To unsubscribe, send mail to majordomo
postfix.org with content (not subject): unsubscribe postfix-users
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]