[Dovecot] Mailing list convert scripts not working on wiki

2009-03-14 Thread Phill Edwards
I'm trying to download Julian Fitzell's scripts to convert mbox to
Maildir format from the wiki page at
http://wiki.dovecot.org/Migration/MailFormat

But when I click on the links for the scripts it just sends me back to
the same page rather than downloading the scripts. The links in
question are 
http://wiki.dovecot.org/Migration/MailFormat?action=AttachFile&do=get&target=mb2md.tgz
and 
http://wiki.dovecot.org/Migration/MailFormat?action=AttachFile&do=get&target=migrateuser.sh

How can I get the scripts?

Regards,
Phill


Re: [Dovecot] Mailing list convert scripts not working on wiki

2009-03-15 Thread Phill Edwards
> But when I click on the links for the scripts it just sends me back to
> the same page rather than downloading the scripts. The links in
> question are 
> http://wiki.dovecot.org/Migration/MailFormat?action=AttachFile&do=get&target=mb2md.tgz
> and 
> http://wiki.dovecot.org/Migration/MailFormat?action=AttachFile&do=get&target=migrateuser.sh

Someone has given me the mb2md.pl script but I still need the
migrateuser.sh script if anyone has that?

Regards,
Phill


[Dovecot] Errors on mbox to Maildir conversion

2009-03-17 Thread Phill Edwards
I have Julian Fitzell's migrateuser.sh script which uses mb2md-3.20.pl
to convert a mailbox in mbox format to Maildir.

I have set up a test user called "mailtest" which has mail as follows:

/var/mail/mailtest
/home/mailtest/mail/
Drafts
MoreStuff
Sent Items
Stuff

After the conversion I want all this user's mail to be in
/home/mailtest/Maildir/

I'm not quite sure how to run the migrateuser.sh script, but I think
it's like this (run as user mailtest):
$ /usr/local/bin/mb2md/migrateuser.sh mailtest /home/mailtest
/home/mailtest/Maildir

When I run this I get the following output:
mailtest -- Migrating INBOX... Converting /var/mail/mailtest to
maildir: /home/mailtest/Maildir.mdwork.1237291760
Source Mbox is /var/mail/mailtest
Target Maildir is /home/mailtest/Maildir.mdwork.1237291760
Created UID list: /home/mailtest/Maildir.mdwork.1237291760/dovecot-uidlist
3 messages.

warning: Can't open /home/mailtest/Maildir.mdwork.1237291760: not a
selectable mailbox
[ERROR] (mismatch during post compare)
mailtest -- 0 new message(s) (), 3 total
mailtest --


That bit about "not a selectable mailbox" seems to be the problem. Any
idea what I'm doing wrong here?

Regards,
Phill


Re: [Dovecot] Postfix + Dovecot + Sieve + SpamAssassin

2009-04-10 Thread Phill Edwards
> Use a (bash) script wrapping Dovecot deliver, it can first pipe the message
> from stdin to SpamAssassin, then pipe its output to Dovecot deliver.

You wouldn't have an example of that you could share would you? I'm
new to this too and need to move from Procmail to Sieve and I need to
call an external script but don't know what this would all look like.

Regards,
Phill


Re: [Dovecot] How do I get my mail from fetchmail into dovecot?

2009-04-29 Thread Phill Edwards
> I myself have such a "mail hamster" setup running just fine, which I
> mentioned a few weeks ago on this list [2]. You might find that post
> helpful.
>
> The general idea is to use Getmail to poll the remote mail servers (I
> poll two POP servers and three IMAP-SSL servers), retrieve messages,
> optionally scan them for viruses and spam and then hand them over to
> your local Dovecot server using Dovecot's LDA "deliver". See [3] for a
> nice picture :) If you skip virus and spam scanning the configuration
> for a single remote IMAP server boils down to:

Thanks for that - really useful post. I've been using fetchmail for
ages which gets the amil and uses Procmail to apply some processing
rules and deliver the messages to the appropriate folders. But I'll
check Getmail now. I've been running procmail for years and have
recently been toying with the idea of replacing that with
dovecot-sieve but have been a bit reluctant to mess with things. But
I'd also like to get Open-Xchange up and running and this requires
sieve so that's why I'm looking at replacing Procmail.

Great to hear someone's done it already and put together some nice
documentation.

Regards,
Phill


Re: [Dovecot] How do I get my mail from fetchmail into dovecot?

2009-04-30 Thread Phill Edwards
> Dovecot's Sieve support is excellent, thanks to Stephan Bosch. There is
> much more documentation out there than I can possibly provide or link
> to in this post but I think it gets the point across.

Thanks for the examples. Does anyone know if dovecot-sieve supports
the Editheade extensions which allow you to add or delete email
headers? I currently use procmail and pipe to formail to add a header
which indicates which procmail recipe got applied. I'd like to add
headers in sieve so I can achieve the same result.

Regards,
Phill


[Dovecot] Can't connect to auth server

2009-05-04 Thread Phill Edwards
I'm trying to phase out procmail and move to dovecot-sieve instead. It
ain't proving easy. I'll describe my setup:

- Centos 5.2 box with dovecot 1.1.4 and dovecot-sieve 1.1.6 from ATrpms.

- A single user account is used to store all our email (the account is
called maildb).

- Getmail is being used to fetch the email from various ISP mailboxes.
I want to deliver mail to different folders in maildb's Maildir/
depending on who the email is addressed to (the procmail recipes
currently do that).

- Getmail destination section looks like this:
 [destination]
 type = MDA_external
 path = /usr/libexec/dovecot/deliver
 arguments = ("-d", "maildb")
 allow_root_commands = true

- When I run getmail I get this error in dovecot.log:
deliver(maildb): May 04 22:15:26 Error: Can't connect to auth server
at /var/run/dovecot/auth-master: No such file or directory

It's true that I don't have a file called auth-master. I guess I
should have but until I started this dovecot-sieve work it was never a
problem. I have no idea what that file should look like. As I
installed from binary RPMs I would have thought one would have come
with the install.

Can anyone help?

Regards,
Phill


Re: [Dovecot] Can't connect to auth server

2009-05-08 Thread Phill Edwards
> I'm trying to phase out procmail and move to dovecot-sieve instead. It
> ain't proving easy. I'll describe my setup:
>
> - Centos 5.2 box with dovecot 1.1.4 and dovecot-sieve 1.1.6 from ATrpms.
>
> - A single user account is used to store all our email (the account is
> called maildb).
>
> - Getmail is being used to fetch the email from various ISP mailboxes.
> I want to deliver mail to different folders in maildb's Maildir/
> depending on who the email is addressed to (the procmail recipes
> currently do that).
>
> - Getmail destination section looks like this:
>     [destination]
>     type = MDA_external
>     path = /usr/libexec/dovecot/deliver
>     arguments = ("-d", "maildb")
>     allow_root_commands = true
>
> - When I run getmail I get this error in dovecot.log:
> deliver(maildb): May 04 22:15:26 Error: Can't connect to auth server
> at /var/run/dovecot/auth-master: No such file or directory
>
> It's true that I don't have a file called auth-master. I guess I
> should have but until I started this dovecot-sieve work it was never a
> problem. I have no idea what that file should look like. As I
> installed from binary RPMs I would have thought one would have come
> with the install.
>
> Can anyone help?

Anyone? I'm pretty stuck if I can't resolve this :(

Regards,
Phill


Re: [Dovecot] Can't connect to auth server

2009-05-12 Thread Phill Edwards
>>> - Getmail destination section looks like this:
>>>     [destination]
>>>     type = MDA_external
>>>     path = /usr/libexec/dovecot/deliver
>>>     arguments = ("-d", "maildb")
>
>>> It's true that I don't have a file called auth-master. I guess I
>>> should have but until I started this dovecot-sieve work it was never a
>
> See http://wiki.dovecot.org/LDA
>
> "-d : Destination username. If given, the user information is
> looked up from dovecot-auth."
>
> You need Dovecot running and providing the auth socket, see
> http://wiki.dovecot.org/MainConfig?highlight=auth-master

Thanks for your reply, but I still don't understand how to fix my
issue. I had a look at the wiki page and it says: "auth_socket_path =
/var/run/dovecot/auth-master
UNIX socket path to master authentication server to find users."

The file auth-master doesn't exist anywhere on my system, and the wiki
doesn't tell me how to create it or what its contents should look
like. So I still don't understand how I make dovecot provide the auth
socket.

Regards,
Phill


Re: [Dovecot] Can't connect to auth server

2009-05-12 Thread Phill Edwards
> Thanks for your reply, but I still don't understand how to fix my
> issue. I had a look at the wiki page and it says: "auth_socket_path =
> /var/run/dovecot/auth-master
>    UNIX socket path to master authentication server to find users."
>
> The file auth-master doesn't exist anywhere on my system, and the wiki
> doesn't tell me how to create it or what its contents should look
> like. So I still don't understand how I make dovecot provide the auth
> socket.

Actually, I think I may have solved my own problem here. In order for
auth-master to be created the following lines have to be uncommented
in dovecot.conf:

  #socket listen {
#master {
  # Master socket provides access to userdb information. It's typically
  # used to give Dovecot's local delivery agent access to userdb so it
  # can find mailbox locations.
  #path = /var/run/dovecot/auth-master
  #mode = 0600
  # Default user/group is the one who started dovecot-auth (root)
  #user =
  #group =
#}
#client {
  # The client socket is generally safe to export to everyone. Typical use
  # is to export it to your SMTP server so it can do SMTP AUTH lookups
  # using it.
  #path = /var/run/dovecot/auth-client
  #mode = 0660
#}
  #}

needs to look like this:

  socket listen {
master {
  # Master socket provides access to userdb information. It's typically
  # used to give Dovecot's local delivery agent access to userdb so it
  # can find mailbox locations.
  path = /var/run/dovecot/auth-master
  mode = 0600
  # Default user/group is the one who started dovecot-auth (root)
  user =
  group =
}
#client {
  # The client socket is generally safe to export to everyone. Typical use
  # is to export it to your SMTP server so it can do SMTP AUTH lookups
  # using it.
  #path = /var/run/dovecot/auth-client
  #mode = 0660
#}
  }

I deliberately hadn't uncommented them before because the top of
dovecot.conf says this:

   # '#' character and everything after it is treated as comments. Extra spaces
   # and tabs are ignored. If you want to use either of these
explicitly, put the
   # value inside quotes, eg.: key = "# char and trailing whitespace  "

   # Default values are shown for each setting, it's not required to uncomment
   # any of the lines.

Clearly that last part is incorrect because in this case it WAS
necessary to uncomment the lines in the socket listen stanza in order
for it to work.

I hope this helps someone else.

Regards,
Phill


[Dovecot] How can I view these email files?

2011-03-26 Thread Phill Edwards
I messed up my email today through a combination of stuff-ups with
procmail and dovecot. The result was that I ended up delivering some
email messages to the root Maildir folder instead of the sub-folders.
The files are in the correct format but have names like msg.3BXE,
msg.2BXE etc.

Of course these don't show up in my IMAP client so I can't read them.
Does anyone know a way I can point some sort of email client at these
to read them? Or a way to transfer them under Maildir/new so that I
can read them as part of my normal inbox? I know that some of them
have attachments.


[Dovecot] Multiple versions of Dovecot installed

2011-03-26 Thread Phill Edwards
I have had to rebuild my 64-bit CentOS 5 email server and after
installing dovecot rpms (using yum) I seem to have multiple versions
installed:

dovecot-1.1.20-1_98.el5 - from ATrpms repo
dovecot-1.0.7-7.el5 - from CentOS repo
dovecot-sieve-0.1.18-6.1.el5 - from ATrpms repo

I have tried to install just the ATrpms version but when I do "yum
install dovecot" the CentOS one always gets pulled in as well. Is this
normal, or does it indicate that something has gone wrong in the
installation process?

I'm having an issue with Dovecot sieve because it can't find a sieve
plugin in /usr/lib64/dovecot/lda/. However, there is one in
/usr/lib/dovecot/lda/. Do I have some sort or 32-bit/64-bit mismatch?


Re: [Dovecot] How can I view these email files?

2011-03-26 Thread Phill Edwards
>> Of course these don't show up in my IMAP client so I can't read them.
>> Does anyone know a way I can point some sort of email client at these
>> to read them? Or a way to transfer them under Maildir/new so that I
>> can read them as part of my normal inbox? I know that some of them
>> have attachments.
>
> Just mv them into new/

Thanks so much - I had no idea it would be that easy! Worked a treat.


[Dovecot] Setting up webmail in DMZ

2010-08-08 Thread Phill Edwards
I have a Smoothwall server on my network and am running three network
interfaces off it.

1) local LAN 192.168.0.0 with PCs and an internal dovecot server on
192.168.0.154.
2) internet interface
3) DMZ 192.168.2.0 which has a linux web server 192.168.2.1 on which I
want to install a webmail so I can access my email remotely.

Originally 192.168.2.1 couldn't see the 192.168.0.0 network but with
some help from the Smoothwall forums I have fixed that. The problem
now is that 192.168.2.1 can't connect to the dovecot server on
192.168.0.154. When I "telnet 192.168.0.154 993" or  "telnet
192.168.0.154 143" I get a "Connection refused" error. But these
commands work fine from PCs on the 192.168.0.0 network.

I'm pretty sure there's no firewall on the dovecot server and
/etc/hosts.allow and /etc/hosts.deny are empty.

Is there a default setting that I need to change in Dovecot that only
allows connections from machines on the same subnet?


Re: [Dovecot] create Sub-Subfolders

2010-08-09 Thread Phill Edwards
> when a user tries to create a sub-subfolder in Archiv, he gets the message:
>
> "Mailbox doesn't allow inferior mailboxes"
>
> is there a spezial configuration in /etc/dovecot.conf needed?
>

>From memory I believe it depends on the format of the mailboxes. If
you're using Maildir format then you can create sub-folders, but if
you're using mbox you can't. It's possible to convert mailboxes from
mbox to Maildir, but if you have a lot of users with a lot of mail
then this could be a big task. Also, remember that if you do change
format you also need to modify Postfix (assuming you're using Postfix)
to deliver to that format.


[Dovecot] Sieve vacation not working

2009-07-06 Thread Phill Edwards
I've been trying all night to get vacation working in my
.dovecot.sieve file. The way our email works is we have one account on
dovecot which serves my mail and my wife's and we use procmail and
sieve to put the emails in different folders depending on who it's
for. I'm trying to set up a vacation reply on my wife's email address
(a...@optus* below) so people can update to her new address.


Here's my file with the email addresses masked:

require ["fileinto", "vacation"];
if address :is "to" "...@ozemail.com.au" {
   fileinto "Phill_OzEmail_Folder";
   stop;
} elsif address :is "to" "yy...@optusnet.com.au" {
   fileinto "Phill_Optus_Folder";
   stop;
} elsif address :matches "to" "a...@optus*" {
   vacation "Please update my email address to bb...@exemail.com.au";
   fileinto "Sarah_Optus_Folder";
   stop;
} else {
   keep;
   stop;
}

The problem I'm having is that no auto-replies are sent. I removed
.dovecot.lda-dupes and that didn't help; so then I touched it and now
it's a 0 byte file and that didn't help. There is no dovecot.sieve.err
file and I can't see anything in /var/log/dovecot.log which gives any
message about why this wouldn't work.

The emails to ...@optus* get filed into the right folder so I know
the matching is working.

I've also tried a reject recipe and that worked fine, so I know that
it can send an email if it chooses to.

So it's a complete black box mystery as to why it just won't send a reply.

Regards,
Phill


Re: [Dovecot] Sieve vacation not working

2009-07-06 Thread Phill Edwards
> According to the sources, the CMUSieve plugin will refuse to autorespond in
> the following situations:

Thanks Stephan. It is indeed the CMU Sieve plugin (sorry for not
pointing that out). I saw those conditions the wiki somewhere and I
don't believe any of the conditions are met, though perhaps I need to
check the mail headers more to be absolutely certain.

Is the Dovecot Sieve plugin more lenient/easier to use and would it be
worth giving it a try? I can't remember the exact version of Dovecot
I'm running until I go home to check, but I'm pretty sure it's < 1.2
which is why I'm using CMU Sieve.

Regards,
Phill


[Dovecot] Dovecot-sieve version compatability

2009-07-06 Thread Phill Edwards
I'm thinking of upgrading my dovecot version to 1.2 so that I can use
the Dovecot sieve plugin instead of the CMU Sieve plugin. My RPM repo
for dovecot is ATrpms so I could get dovecot-1.2.0-0_95.el5.i386.rpm
from the bleeding ATrpms repo. Would this be compatible with
dovecot-sieve-1.1.6-9.el5.i386.rpm which is in the stable repo, or
would I need to find a later dovecot-sieve version somewhere?

Regards,
Phill


Re: [Dovecot] Sieve vacation not working

2009-07-07 Thread Phill Edwards
> I know this won't help much, but I can tell you that we have vacation with
> cmusieve (CentOS package dovecot-sieve-1.1.6-9.el5) working with dovecot
> (1.1.7-0_84.el5) without any problems.

Thanks for the info. My versions are dovecot-1.1.4-0_81 and
dovecot-sieve-1.1.6-9. Perhaps I need to do some upgrading - though I
somehow doubt that's the problem.

Regards,
Phill


Re: [Dovecot] Sieve vacation not working

2009-07-07 Thread Phill Edwards
> According to the sources, the CMUSieve plugin will refuse to autorespond in
> the following situations

Here are the headers of an email that I believe should have triggered
an auto-reply but didn't (with email addresses and names masked for
privacy). I don't see any headers here that should prevent vacation
from auto-replying.

Return-Path: <1staddr...@gmail.com>
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on ash.edwards.home
X-Spam-Level:
X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VERIFIED autolearn=failed version=3.2.5
Received: from mail-pz0-f200.google.com (mail-pz0-f200.google.com
[209.85.222.200])
by mail14.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id 
n67CEnCM028116
for <2ndaddr...@optusnet.com.au>; Tue, 7 Jul 2009 22:14:53 +1000
Received: by pzk38 with SMTP id 38so1578688pzk.23
for <2ndaddr...@optusnet.com.au>; Tue, 07 Jul 2009 05:14:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:mime-version:received:date:message-id:subject
 :from:to:content-type:content-transfer-encoding;
bh=6QSMfQcM9Jx/F5SCN90TkKETpHxtUkMGGvtoTjT/stM=;
b=IWFsqmBGzHGv+nhcHcgjGFRVzpHWlztUfd/kG00d3sYltw6vB8AEzlGY0XdRbN724+
 2KmxoYsvjAndbKwLeAnIpBTA1hXTp2DenGTa8HUqiqfzRP7+bbTzfPZBFF8r90n9i7YZ
 1E6mQmemrdPNZ2q5uGEcglajxMZKeIdgc1OaQ=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=mime-version:date:message-id:subject:from:to:content-type
 :content-transfer-encoding;
b=IlCr6qHtsPkykHQ6NeusuIO2uSDTv0Zm3bYtOeE7PHZGm/D7+9a9+sq85MsW1tlaL3
 Jvo6LOZha+fDq680ElEW282jIUl7gHmoIt/THLa8v84WWHQEpfGXtx/Ihv31MpqLPUXW
 i664bd+xJXBsa2uq8Su6ePeb50+Iev9qb8P1k=
MIME-Version: 1.0
Received: by 10.142.226.1 with SMTP id y1mr1758836wfg.298.1246968889443; Tue,
07 Jul 2009 05:14:49 -0700 (PDT)
Date: Tue, 7 Jul 2009 22:14:49 +1000
Message-ID: 
Subject: Automails reply properly if set up correctly #2
From: Me <1staddr...@gmail.com>
To: "You" <2ndaddr...@optusnet.com.au>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

> Unfortunately, CMUSieve does not indicate which condition is triggered and
> the vacation action is silently discarded.

Yes - that is indeed unfortunate; it makes it just about impossible to
debug. If I was using the dovecot sieve plugin would that have better
logging so I could find out what's going on?

Regards,
Phill


Re: [Dovecot] Sieve vacation not working

2009-07-07 Thread Phill Edwards
Folks, I'm really sorry. It turns out I'm just an idiot. I hadn't put
anything in the :addresses field. As soon as I put the recipient's
email address in there it all started working. Something like this:

:addresses ["2ndaddr...@optusnet.com.au"]

I hadn't realised you had to do that and I'd seen examples which
didn't use it, but I guess I should have tried it before wasting
everyone's time.

Sorry again. Hopefully this will help someone in the future with a
similar issue.

Regards,
Phill