Re: weakforced: Possible to access the ip address of report/allow?

2019-05-22 Thread Neil Cook via dovecot


 
 
  
   Hi Tobi,
  
  
   
  
  
   you need to process lt.attrs in a loop. It's not a real Lua table, it's a user data pretending to be a table, so # doesn't work.
  
  
   
  
  
   For example:
  
  
   
  
  
   
for k, v in pairs(lt.attrs) do
   
   

   
   
    if ((k == "accountStatus") and (v == "blocked"))
   
   

   
   
    then
   
   

   
   
        return -1, "accountStatus blocked", "accountStatus blocked", {}
   
   

   
   
    end
   
   

   
   
end
   
   

   
   
For examples of almost anything you can do in wforce.conf, including the above, please read the wforce.conf man page. It's really very thorough.
   
   

   
   
Neil
   
  
  
   
On 22 May 2019 13:53 Tobi <
tobiswo...@gmail.com> wrote:
   
   

   
   

   
   
Hi Neil
   
   

   
   
thanks for the hint with the dovecot config, adding this and I can see that
   
   

   
   

 ... attrs={local_ip="XX.XX.XX.XX"} ...

   
   
is now logged by wforce daemon. Then I tried to access that value from
   
   
wforce with the following testcode
   
   

   
   

 if (#lt.attrs > 0)


 then


 return 7, "ip_local", "ip_local", { test=test }


 end

   
   
but even if attrs are set (according to wforce logs), the code above
   
   
does not go into if condition. What is the proper way to access the attrs?
   
   

   
   
Thanks for your help and have a good one
   
   

   
   
--
   
   

   
   
tobi
   
   
Am 22.05.19 um 11:53 schrieb Neil Cook:
   
   

 From dovecot, you can add any additional attributes you like using the auth_policy_request_attributes configuration setting, e.g.


 


 By default in 2.3.1 this looks like:


 


 login=%{requested_username} pwhash=%{hashed_password} remote=%{rip} device_id=%{client_id} protocol=%s


 


 But you can add additional parameters:


 


 login=%{requested_username} pwhash=%{hashed_password} remote=%{rip} device_id=%{client_id} protocol=%s attrs/local_ip=%{lip}


 


 The above will add the local dovecot IP address to the attrs, which can then be accessed from wforce policy,


 


 Neil


 


 
  On 22 May 2019, at 07:56, Tobi via dovecot <
  dovecot@dovecot.org> wrote:
 

   
   
>> Hi
   
   
>>
   
   
>> I wonder if the information about the origin of report or allow can be
   
   
>> accessed somehow. lt.remote gives the IP of the client trying to login
   
   
>> but is there anything in lt which gives the ip of the system that
   
   
>> connects to wforced?
   
   
>>
   
   
>> Thanks and have a good one
   
   
>>
   
   
>> --
   
   
>>
   
   
>> tobi
   
   

 


 Neil Cook


 neil.c...@open-xchange.com


 


 -


 Open-Xchange AG, Rollnerstr. 14, 90408 Nuremberg, District Court Nuremberg HRB 24738


 Managing Board: Rafael Laguna de la Vera, Carsten Dirks, Michael Knapstein, Stephan Martin


 Chairman of the Board: Richard Seibt


 


 European Office:


 Open-Xchange GmbH, Olper Huette 5f, D-57462 Olpe, Germany, District Court Siegen, HRB 8718


 Managing Director: Frank Hoberg


 


 US Office:


 Open-Xchange. Inc., 530 Lytton Avenue, Palo Alto, CA 94301, USA


 -


 

   
  
  
   
  
  
    
   -- kind regards,Neil CookChief Security ArchitectPhone: +44 774 7012545Email: neil.c...@open-xchange.com-Open-Xchange AG, Rollnerstr. 14, 90408 Nuremberg, District Court Nuremberg HRB 24738Managing Board: Rafael Laguna de la Vera, Carsten Dirks, Michael Knapstein, Stephan Martin Chairman of the Board: Richard SeibtEuropean Office: Open-Xchange GmbH, Olper Huette 5f, D-57462 Olpe, Germany, District Court Siegen, HRB 8718 Managing Director: Frank HobergUS Office: Open-Xchange. Inc., 530 Lytton Avenue, Palo Alto, CA 94301, USA -
    
   
 



Re: weakforced: Possible to access the ip address of report/allow?

2019-05-22 Thread Neil Cook via dovecot
From dovecot, you can add any additional attributes you like using the 
auth_policy_request_attributes configuration setting, e.g.

By default in 2.3.1 this looks like:

login=%{requested_username} pwhash=%{hashed_password} remote=%{rip} 
device_id=%{client_id} protocol=%s

But you can add additional parameters:

login=%{requested_username} pwhash=%{hashed_password} remote=%{rip} 
device_id=%{client_id} protocol=%s attrs/local_ip=%{lip}

The above will add the local dovecot IP address to the attrs, which can then be 
accessed from wforce policy,

Neil

> On 22 May 2019, at 07:56, Tobi via dovecot  wrote:
> 
> Hi
> 
> I wonder if the information about the origin of report or allow can be
> accessed somehow. lt.remote gives the IP of the client trying to login
> but is there anything in lt which gives the ip of the system that
> connects to wforced?
> 
> Thanks and have a good one
> 
> --
> 
> tobi


Neil Cook
neil.c...@open-xchange.com

-
Open-Xchange AG, Rollnerstr. 14, 90408 Nuremberg, District Court Nuremberg HRB 
24738
Managing Board: Rafael Laguna de la Vera, Carsten Dirks, Michael Knapstein, 
Stephan Martin 
Chairman of the Board: Richard Seibt

European Office: 
Open-Xchange GmbH, Olper Huette 5f, D-57462 Olpe, Germany, District Court 
Siegen, HRB 8718 
Managing Director: Frank Hoberg

US Office: 
Open-Xchange. Inc., 530 Lytton Avenue, Palo Alto, CA 94301, USA 
-



Re: weakforced and GeoIP lookups

2019-05-14 Thread Neil Cook via dovecot
Hi Tobi,

it should just work, but depends on the OS version.

./configure —help tells you all the configure options, including:

--with-maxminddb-includedir
  path to maxminddb include directory [default=auto]
--with-maxminddb-libdir path to maxminddb library directory [default=auto]

Neil

> On 14 May 2019, at 17:44, Tobi via dovecot  wrote:
> 
> Hi Neil
> 
> according to yum list installed I have
> 
>> libmaxminddb-devel.x86_64 1.2.0-1.el7  @epel
> 
> but I checked the saved output from my former ./configure command and found
> 
>> checking for GEOIP... no
> 
> but even running a new autoreconf -i and ./configure after a make clean
> it still shows that GEOIP is not found.
> 
> Does the lib has to explicitly specified as argument like
> 
>> --with-maxminddb-libdir
> 
> to configure?
> 
> 
> Cheers
> 
> tobi
> Am 14.05.19 um 17:14 schrieb Neil Cook via dovecot:
>> Hi Tobi,
>> 
>> This looks like you haven’t included the libmaxmind libraries before
>> running configure. GeoIP support is only compiled in if it finds the
>> right libs.
>> 
>> This would be libmaxminddb-dev on Ubuntu for example.
>> 
>> Neil
>> 
>>>> Hi list
>>>> 
>>>> hope it's okay to ask weakforced questions here as well, but I could not
>>>> find a dedicated mailinglist for wforce.
>>>> 
>>>> I want to enable GeoIP lookups in my wforce daemon. In a first step I
>>>> installed luarocks and lua-compat53 to install mmdblua module.
>>>> Then I added
>>>> 
>>>> newGeoIP2DB("country", "/usr/local/share/GeoIP/GeoLite2-Country.mmdb")
>>>> local mygeodb = getGeoIP2DB("country")
>>>> if(mygeodb:lookupCountry(lt.remote) == 'XX')
>>>> then
>>>>   return -1, "country blocked", "country blocked", { country="XX" }
>>>> end
>>>> 
>>>> to wforce.conf and tried to restart wforce but that ends up in a
>>>> 
>>>>> Fatal Lua error: [string "chunk"]:28: attempt to call global
>>>>> 'newGeoIP2DB' (a nil value)
>>>> 
>>>> Any ideas what I could be missing here?
>>>> 
>>>> Cheers
>>>> 
>>>> tobi
>>> 
>>> 
>>> Neil Cook
>>> neil.c...@open-xchange.com <mailto:neil.c...@open-xchange.com> 
>>> <mailto:neil.c...@open-xchange.com <mailto:neil.c...@open-xchange.com>>
>>> 
>>> -----
>>> Open-Xchange AG, Rollnerstr. 14, 90408 Nuremberg, District Court
>>> Nuremberg HRB 24738
>>> Managing Board: Rafael Laguna de la Vera, Carsten Dirks, Michael
>>> Knapstein, Stephan Martin 
>>> Chairman of the Board: Richard Seibt
>>> 
>>> European Office: 
>>> Open-Xchange GmbH, Olper Huette 5f, D-57462 Olpe, Germany, District
>>> Court Siegen, HRB 8718 
>>> Managing Director: Frank Hoberg
>>> 
>>> US Office: 
>>> Open-Xchange. Inc., 530 Lytton Avenue, Palo Alto, CA 94301, USA 
>>> -
>>> 
>> 
>> 
>> Neil Cook
>> neil.c...@open-xchange.com <mailto:neil.c...@open-xchange.com> 
>> <mailto:neil.c...@open-xchange.com <mailto:neil.c...@open-xchange.com>>
>> 
>> -
>> Open-Xchange AG, Rollnerstr. 14, 90408 Nuremberg, District Court
>> Nuremberg HRB 24738
>> Managing Board: Rafael Laguna de la Vera, Carsten Dirks, Michael
>> Knapstein, Stephan Martin 
>> Chairman of the Board: Richard Seibt
>> 
>> European Office: 
>> Open-Xchange GmbH, Olper Huette 5f, D-57462 Olpe, Germany, District
>> Court Siegen, HRB 8718 
>> Managing Director: Frank Hoberg
>> 
>> US Office: 
>> Open-Xchange. Inc., 530 Lytton Avenue, Palo Alto, CA 94301, USA 
>> -


Neil Cook
neil.c...@open-xchange.com

-
Open-Xchange AG, Rollnerstr. 14, 90408 Nuremberg, District Court Nuremberg HRB 
24738
Managing Board: Rafael Laguna de la Vera, Carsten Dirks, Michael Knapstein, 
Stephan Martin 
Chairman of the Board: Richard Seibt

European Office: 
Open-Xchange GmbH, Olper Huette 5f, D-57462 Olpe, Germany, District Court 
Siegen, HRB 8718 
Managing Director: Frank Hoberg

US Office: 
Open-Xchange. Inc., 530 Lytton Avenue, Palo Alto, CA 94301, USA 
-



Re: weakforced and GeoIP lookups

2019-05-14 Thread Neil Cook via dovecot
Hi Tobi,

This looks like you haven’t included the libmaxmind libraries before running 
configure. GeoIP support is only compiled in if it finds the right libs.

This would be libmaxminddb-dev on Ubuntu for example.

Neil

>> Hi list
>> 
>> hope it's okay to ask weakforced questions here as well, but I could not
>> find a dedicated mailinglist for wforce.
>> 
>> I want to enable GeoIP lookups in my wforce daemon. In a first step I
>> installed luarocks and lua-compat53 to install mmdblua module.
>> Then I added
>> 
>> newGeoIP2DB("country", "/usr/local/share/GeoIP/GeoLite2-Country.mmdb")
>> local mygeodb = getGeoIP2DB("country")
>> if(mygeodb:lookupCountry(lt.remote) == 'XX')
>> then
>>   return -1, "country blocked", "country blocked", { country="XX" }
>> end
>> 
>> to wforce.conf and tried to restart wforce but that ends up in a
>> 
>> > Fatal Lua error: [string "chunk"]:28: attempt to call global
>> > 'newGeoIP2DB' (a nil value)
>> 
>> Any ideas what I could be missing here?
>> 
>> Cheers
>> 
>> tobi
> 
> 
> Neil Cook
> neil.c...@open-xchange.com <mailto:neil.c...@open-xchange.com>
> 
> -
> Open-Xchange AG, Rollnerstr. 14, 90408 Nuremberg, District Court Nuremberg 
> HRB 24738
> Managing Board: Rafael Laguna de la Vera, Carsten Dirks, Michael Knapstein, 
> Stephan Martin 
> Chairman of the Board: Richard Seibt
> 
> European Office: 
> Open-Xchange GmbH, Olper Huette 5f, D-57462 Olpe, Germany, District Court 
> Siegen, HRB 8718 
> Managing Director: Frank Hoberg
> 
> US Office: 
> Open-Xchange. Inc., 530 Lytton Avenue, Palo Alto, CA 94301, USA 
> -
> 


Neil Cook
neil.c...@open-xchange.com <mailto:neil.c...@open-xchange.com>

-
Open-Xchange AG, Rollnerstr. 14, 90408 Nuremberg, District Court Nuremberg HRB 
24738
Managing Board: Rafael Laguna de la Vera, Carsten Dirks, Michael Knapstein, 
Stephan Martin 
Chairman of the Board: Richard Seibt

European Office: 
Open-Xchange GmbH, Olper Huette 5f, D-57462 Olpe, Germany, District Court 
Siegen, HRB 8718 
Managing Director: Frank Hoberg

US Office: 
Open-Xchange. Inc., 530 Lytton Avenue, Palo Alto, CA 94301, USA 
-

Re: Really slow IMAP performance

2018-02-24 Thread Neil Jerram
Aki Tuomi  writes:

> Yes. You deffo are looking at several reasons for slowness.
>
> I can only recommend moving into maildir or sdbox format, and probably new 
> HDD too.
>
> https://wiki2.dovecot.org/Tools/Doveadm/Sync here is example of 'converting' 
> between mailbox formats using dsync. You should also read 
> https://wiki2.dovecot.org/Migration/MailFormat
>
> mbox format has been known to act up with dsync occasionally, so I recommend 
> using 
>
> doveadm backup maildir:~/Maildir

Thanks, I've done that now, and things are looking much better.

I rediscovered that I've configured postfix to deliver locally using
dovecot-lmtp - which meant that I then only needed to change dovecot's
mail_location setting, and nothing at all in the postfix config.

Many thanks! - Neil


Re: Really slow IMAP performance

2018-02-24 Thread Neil Jerram
Aki Tuomi  writes:

>> On 24 February 2018 at 15:47 Neil Jerram  wrote:

[...]
>> >  Feb 24 10:24:24 arudy dovecot[1712]: imap(neil): Warning:
>> > Transaction log file
>> > /home/neil/dovecot-mail/.imap/INBOX/dovecot.index.log was locked
>> > for 98 seconds (Mailbox was synchronized)
[...]

> You are using mbox format. This is ... bit slow. =)
>
> When you move mails between mbox files, it has to rewrite the entire mbox 
> file every time. You should probably start using maildir or sdbox instead.

Ah, right, thanks.

My INBOX file has 22990 messages.  Is the slowness that I am seeing
definitely expected for an mbox of that size?  (It may also be relevant
that the HDD it's stored on is pretty old now, and has been known to
report SMART errors...)

If so, I'll start looking at how to migrate, given that my system is
Postfix + Dovecot.  If you have any particular recommendations or
migration pointers for a system like that, I'd appreciate them.

Best wishes - Neil


Re: Really slow IMAP performance

2018-02-24 Thread Neil Jerram
Aki Tuomi  writes:

>  On 24 February 2018 at 12:45 Neil Jerram < n...@ossau.homelinux.net> wrote: 
>
>  Please could you help me to understand and fix why my dovecot IMAP 
>  performance is so bad? I've read through a lot of the 
>  performance-related material on the website, but I don't think that any 
>  of it could account for slowness at the level that I am seeing. 
>
>  The simplest scenario is moving a message from my Inbox to another IMAP 
>  folder. Using Gnus as the client, the whole UI freezes for about 2 
>  minutes (which I assume is until the move is complete), and journalctl 
>  on the dovecot server says: 
>
>  Feb 24 10:24:24 arudy dovecot[1712]: imap(neil): Warning: Transaction log 
> file /home/neil/dovecot-mail/.imap/INBOX/dovecot.index.log was locked for 98 
> seconds (Mailbox was synchronized) 
>
>  or the same message with (rotating while syncing). 
>
>  There must be something badly wrong in my setup, or perhaps in the spec 
>  of the server that dovecot is running on. What should I look at to 
>  start understanding this better? 
>
>  Many thanks - Neil 
>
> Can you tell a bit more about your environment? Sounds like io issue 

Thanks for your reply.  I'm not sure exactly what you have in mind, but
here are some starting points:

arudy:~# uname -a
Linux arudy 4.13.0-1-686-pae #1 SMP Debian 4.13.4-2 (2017-10-15) i686 GNU/Linux

arudy:~# dovecot -n
# 2.2.32 (dfbe293d4): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.20 (7cd71ba)
# OS: Linux 4.13.0-1-686-pae i686 Debian buster/sid 
auth_mechanisms = plain login
auth_username_format = %Ln
auth_verbose = yes
login_trusted_networks = 192.168.11.8
mail_access_groups = mail
mail_fsync = never
mail_location = mbox:~/dovecot-mail:INBOX=/var/mail/%u
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox "Sent Messages" {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix = 
}
passdb {
  driver = pam
}
plugin {
  antispam_backend = dspam
  antispam_dspam_args = --deliver;--user;%u
  antispam_dspam_binary = /usr/bin/dspam
  antispam_signature = X-DSPAM-Signature
  antispam_signature_missing = error
  antispam_spam = Spam
  antispam_trash = trash;Trash;Deleted Items; Deleted Messages
  fts = solr
  fts_solr = url=http://localhost:8080/solr/
  sieve = file:~/sieve;active=~/.dovecot.sieve
}
postmaster_address = postmas...@ossau.homelinux.net
protocols = " imap lmtp"
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
  }
}
ssl_cert = 

Really slow IMAP performance

2018-02-24 Thread Neil Jerram
Please could you help me to understand and fix why my dovecot IMAP
performance is so bad?  I've read through a lot of the
performance-related material on the website, but I don't think that any
of it could account for slowness at the level that I am seeing.

The simplest scenario is moving a message from my Inbox to another IMAP
folder.  Using Gnus as the client, the whole UI freezes for about 2
minutes (which I assume is until the move is complete), and journalctl
on the dovecot server says:

Feb 24 10:24:24 arudy dovecot[1712]: imap(neil): Warning: Transaction log file 
/home/neil/dovecot-mail/.imap/INBOX/dovecot.index.log was locked for 98 seconds 
(Mailbox was synchronized)

or the same message with (rotating while syncing).

There must be something badly wrong in my setup, or perhaps in the spec
of the server that dovecot is running on.  What should I look at to
start understanding this better?

Many thanks - Neil


[Dovecot] Trying to get dovecot and squirrelmail talking

2009-08-03 Thread Neil Bird


  I have been using dovecot+squirrelmail with no problems on my Fedora box 
(currently at F10).  I've been using a simple mail location string along the 
lines of 'mbox:~/usr/mail/%u:INBOX=mbox:/var/spool/mail/%u' (sorry, that's 
off the top of my head, I can't get into my box from here at the moment).


  Essentially:  standard mbox inbox in /var/spool/mail/[user], plus mbox 
files under ~/usr/mail.  These latter are for remote access to archived 
Thunderbird files, which are [currently] mbox format.  This works fine.



  However, I've had some slight issues elsewhere which I feel would be 
eased or solved by making my INBOX use maildir format, and keeping mails I 
want to remote-access more often in the top level maildir there (instead of 
always having to dip into the TB mboxes). To that end, I tried setting up:


# want to be able to add sibling and child folders here
namespace private {
  separator = /
  prefix =
  location = /var/spool/mail/%u
  inbox = yes
  hidden = no
  list = yes
}
# And the legacy mbox files go here under 'local'
namespace private {
  separator = /
  prefix = local/
  location = mbox:~/usr/mail
  hidden = no
  list = yes
}

  (with appropriate an procmail change for maildir delivery)


  Now, this pretty much worked the way I wanted.  However, afterwards, 
trying to connect from squirrelmail I had it say that there were no [IMAP] 
folders to subscribe to, including the INBOX.


  I couldn't se any errors, either in /var/log/maillog or http's logs.

  Have I got something wrong?  Am I trying to do something that's doomed to 
failure?


--
[n...@fnx ~]# rm -f .signature
[n...@fnx ~]# ls -l .signature
ls: .signature: No such file or directory
[n...@fnx ~]# exit


Re: [Dovecot] Dovecot -> Gmail (via POP Mail Fetcher)

2009-04-20 Thread Neil
On Mon, Apr 20, 2009 at 1:09 PM, Rick Romero  wrote:

> Quoting "Seth Mattinen" :
>
>  Neil wrote:
>>
>>> imapsync is failing for me, with very odd errors; mostly "failure to
>>> append
>>> message to folder", or some such...  And unlike most of the failures with
>>> imapsync, it didn't just error out (and give me the message with "N
>>> messages
>>> failed."), it just flat out crashes (it's outputting as if it's running,
>>> and
>>> then suddenly drops me back to a prompt).
>>> I kind of gave up on it for Gmail; but if you want to take a look at the
>>> errors, I'd be happy to toss you the log.
>>>
>>>
>> Yeah, gmail doesn't support folders. Their IMAP support is misleading.
>> Try dumping it all to INBOX.
>>
>>
> In my experience mail will still be transferred to Gmail - it just gets
> stuck under an 'IMAP - foldername' label instead of a "real" synced folder.
>  Maybe they've broken it more since :)
>

I can make folders on Gmail using a normal IMAP client (but yeah, it's not
always pretty), so I don't think that's the problem.

But it seems like they've broken _something_, because no tool I use works
consistently with their server, it seems (as far as upload...downloading
seems to work fine...).

Ugh, I wished Google used Dovecot too...


Re: [Dovecot] Dovecot -> Gmail (via POP Mail Fetcher)

2009-04-20 Thread Neil
imapsync is failing for me, with very odd errors; mostly "failure to append
message to folder", or some such...  And unlike most of the failures with
imapsync, it didn't just error out (and give me the message with "N messages
failed."), it just flat out crashes (it's outputting as if it's running, and
then suddenly drops me back to a prompt).
I kind of gave up on it for Gmail; but if you want to take a look at the
errors, I'd be happy to toss you the log.

I also tried offlineimap, but that kept trying to read from Gmail and write
local; I couldn't get it to start going the other direction.

And thus I've arrived to here...using the POP Mail Fetcher...

On Mon, Apr 20, 2009 at 12:40 PM, Rick Romero  wrote:

>
> Try imapsync - it seems to work fairly well with Gmail, except folders are
> screwy.
> freshmeat.net/projects/imapsync/
>
> Rick
>
>
> Quoting Neil :
>
>  I'm trying to move my entire email store from my Dovecot installation
>> (which
>> I normally access via IMAP) into Gmail using Gmail's Mail Fetcher (which
>> functions over POP); and I'm running into two problems:
>> 1. Gmail only imported 78 out of 1000+ mails in my inbox, which I'm taking
>> to mean that Dovecot is reporting only those 78 as new.  How can I get
>> Dovecot to send all mail over as new?
>>
>> 2. I can't be sure of this yet (since, due to #1, Gmail doesn't seem to be
>> downloading everything), but I'm pretty sure Dovecot is only reporting my
>> Inbox emails over POP; is there a way I can get all my mail, from all my
>> folders, to stream in over POP?
>>
>> Thanks,
>> Neil
>>
>> PS. I'm not leaving Dovecot entirely, I just need to have my mail in
>> another
>> place in case something happens to my server...
>>
>>
>
>
>


[Dovecot] Dovecot -> Gmail (via POP Mail Fetcher)

2009-04-20 Thread Neil
I'm trying to move my entire email store from my Dovecot installation (which
I normally access via IMAP) into Gmail using Gmail's Mail Fetcher (which
functions over POP); and I'm running into two problems:
1. Gmail only imported 78 out of 1000+ mails in my inbox, which I'm taking
to mean that Dovecot is reporting only those 78 as new.  How can I get
Dovecot to send all mail over as new?

2. I can't be sure of this yet (since, due to #1, Gmail doesn't seem to be
downloading everything), but I'm pretty sure Dovecot is only reporting my
Inbox emails over POP; is there a way I can get all my mail, from all my
folders, to stream in over POP?

Thanks,
Neil

PS. I'm not leaving Dovecot entirely, I just need to have my mail in another
place in case something happens to my server...


[Dovecot] Dovecot, LVS and the issues I have with it.

2009-04-06 Thread neil
We run around 5 dovecot (debian etch 1.0.rc15) POP/IMAP 'nodes' using 
the LVS load balancer and an NFS based SAN. it works pretty well. I love 
the robustness of load balancing POP/IMAP.  We do a reasonable amount of 
throughput through these especially at peak times pushing our SAN to 
around 1.5k IOP/s


We currently have two issues with this setup. One of which is NFS index 
corruption issues we get due to NFS/dovecot locking. Basically the UUID 
list or a .index gets corrupt. This causes a full re-indexing of the 
mailbox / broken mailbox until i delete the indexes. In the UUID lists 
case the symptom tends to effect use who use POP rather than IMAP and 
insist on keeping messages on the server. Because it's corrupt it gets 
rebuilt one way or the other and the users email client proceeds to 
redownload the entire mailbox again until he remarks them to be saved. 
This tends to annoy the user a lot. After a bit of testing we do however 
expect this to be fixed by version 1.1. However if anyone has any 
comments on this I would certainly be interested.


The other issue is a little tricky to describe or even log effectively. 
Occasionally a node basically receives more connections than it is able 
to handle. The connection count goes through the roof for that node. It 
will go up way beyond 150 dovecot authentication threads and 100 or so 
active POP/IMAP dovecot threads. The IO_wait/cpu and memory usage also 
tends to be spiking at this point. The server gets to the tipping point 
where it can no longer serve it's POP/IMAP requests fast enough compared 
to the number of connections it's getting. I'd be fine with this but 
this creates some less than desirable symptoms:


1. We obviously reach the auth thread cap eventually so any new auth 
requests basically get refused by the server. To the user this is a seen 
as an outlook/mail client re-auth pop-up request. This annoys them. 
Ideally if the server stops accepting auth requests it should fall off 
our load balancer until it can consistently accept them again. Since the 
LVS detects a node fail by whether the tcp port is still open this 
doesn't happen, since dovecot keeps the port open. This is obviously 
more an LVS issue and not for this mailing list I expect unless anyone 
has any config tweaking tips here?


2. Now here's my real gripe. Dovecot does not handle running out 
resources very gracefully at all in our setup. It does start killing 
threads after a while. I get multiple *"dovecot: child 17989 (login) 
killed with signal 9". *I'm not exactly sure what's going on here 
because after this all I can see is the machine totally out of memory 
and the kernel starts killing absolutely everything. All services are 
killed (including ssh etc..) and I plug a monitor into the server and 
find the last few lines of the console listing init and other rather 
important things having just been killed. At this point it is a case of 
power cycling the server and all is back to normal again.


I imagine there's not a huge amount of people using dovecot in this way. 
But anyone got any recommendations here? I really like using dovecot in 
this setup it handles it pretty well and the redundancy and 
functionality options it provides have been invaluable.


Neil



[Dovecot] Read-Only IMAP

2009-02-24 Thread Neil
Inspired by the "Dovecot as a email storage system" thread...

Is there a way to instruct Dovecot go into read-only mode for an
account, or a mailbox?

Could I maybe fake it by setting perms on the maildir directory to 440?


Re: [Dovecot] OT: Fixing Messages To Be RFC 2822 Compliant

2009-02-23 Thread Neil
Thank you for the suggestion.

Will this still work if I'm using the maildir format?  (Something I
should've mentioned upfront, sorry...)

On Mon, Feb 23, 2009 at 5:17 AM, Darabos Edvárd Konrád <
n...@hippy.csoma.elte.hu> wrote:

> Hi!
>
> EXAMPLES
>   ...
>  To convert a non-standard mailbox file into a standard mailbox file
> you
>  can use:
> formail -ds >new_mailbox
>
>  Or, if you have a very tolerant mailer:
> formail -a Date: -ds >new_mailbox
>   ...
>
>   These are not working based on explicit instructions. You may give them a
> try. I don't know how bad is your mbox...
>
> Bye
>
>
> Neil wrote:
>
>> Hi,
>>
>> Yeah, I'm vaguely familiar with formail, but (after reviewing the
>> literature) it doesn't seem like it can be used to identify/fix existing
>> messages (unless you already know how they're broken and give it explicit
>> instructions to fix them).
>>
>> Is there something I'm missing?
>>
>> Thanks.
>>
>> On Mon, Feb 23, 2009 at 4:24 AM, Darabos Edvárd Konrád <
>> n...@hippy.csoma.elte.hu> wrote:
>>
>>
>>
>>> Hello!
>>>
>>>  I am not sure about what you want, but I found something that maybe
>>> useful for you.
>>>  http://gd.tuwien.ac.at/linuxcommand.org/man_pages/formail1.html
>>>
>>> Bye
>>>
>>>
>>> Neil wrote:
>>>
>>>
>>>
>>>> Soapparently I have some messages which are not RFC compliant
>>>> sitting
>>>> in
>>>> my mailboxes (mostly older ones), and I have some software which is
>>>> refusing
>>>> to handle such messages.
>>>>
>>>> 1. Does anyone know of a nice way to verify that all my messages are
>>>> compliant/find those that aren't? (I suppose I could use the existing
>>>> failing software, but I was hoping for something a little more
>>>> robust...)
>>>>
>>>> 2. Does anyone know of any tools that will do The Right Thing as far as
>>>> fixing these messages are concerned?
>>>>
>>>> Googling didn't turn up much for me, but maybe I wasn't hitting the
>>>> right
>>>> terms ("RFC message repair", "fix email message", etc.).
>>>>
>>>> Thanks.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>


Re: [Dovecot] OT: Fixing Messages To Be RFC 2822 Compliant

2009-02-23 Thread Neil
Hi,

Yeah, I'm vaguely familiar with formail, but (after reviewing the
literature) it doesn't seem like it can be used to identify/fix existing
messages (unless you already know how they're broken and give it explicit
instructions to fix them).

Is there something I'm missing?

Thanks.

On Mon, Feb 23, 2009 at 4:24 AM, Darabos Edvárd Konrád <
n...@hippy.csoma.elte.hu> wrote:

> Hello!
>
>   I am not sure about what you want, but I found something that maybe
> useful for you.
>   http://gd.tuwien.ac.at/linuxcommand.org/man_pages/formail1.html
>
> Bye
>
>
> Neil wrote:
>
>> Soapparently I have some messages which are not RFC compliant sitting
>> in
>> my mailboxes (mostly older ones), and I have some software which is
>> refusing
>> to handle such messages.
>>
>> 1. Does anyone know of a nice way to verify that all my messages are
>> compliant/find those that aren't? (I suppose I could use the existing
>> failing software, but I was hoping for something a little more robust...)
>>
>> 2. Does anyone know of any tools that will do The Right Thing as far as
>> fixing these messages are concerned?
>>
>> Googling didn't turn up much for me, but maybe I wasn't hitting the right
>> terms ("RFC message repair", "fix email message", etc.).
>>
>> Thanks.
>>
>>
>>
>
>


[Dovecot] OT: Fixing Messages To Be RFC 2822 Compliant

2009-02-23 Thread Neil
Soapparently I have some messages which are not RFC compliant sitting in
my mailboxes (mostly older ones), and I have some software which is refusing
to handle such messages.

1. Does anyone know of a nice way to verify that all my messages are
compliant/find those that aren't? (I suppose I could use the existing
failing software, but I was hoping for something a little more robust...)

2. Does anyone know of any tools that will do The Right Thing as far as
fixing these messages are concerned?

Googling didn't turn up much for me, but maybe I wasn't hitting the right
terms ("RFC message repair", "fix email message", etc.).

Thanks.


Re: [Dovecot] Best Imap Transfer Tool?

2009-02-08 Thread Neil
On Sat, Feb 7, 2009 at 2:33 AM, Sahil Tandon  wrote:

> On Fri, 06 Feb 2009, Neil wrote:
>
> > So I'm looking to do a migration of my IMAP mailboxes, and I'm looking
> for
> > the best tool to use.  I used to use the uw-mailutil tool, a while ago,
> but
> > that was a bit coarse of a tool.  More recently I've used imapsync, but
> that
> > was giving me some errors.  I've sort of tracked those down; but I was
> > wondering if anyone else had any other recommendations...?
>
> What about rsync?
>

Don't have shell access on the mail server.


[Dovecot] Best Imap Transfer Tool?

2009-02-06 Thread Neil
So I'm looking to do a migration of my IMAP mailboxes, and I'm looking for
the best tool to use.  I used to use the uw-mailutil tool, a while ago, but
that was a bit coarse of a tool.  More recently I've used imapsync, but that
was giving me some errors.  I've sort of tracked those down; but I was
wondering if anyone else had any other recommendations...?

Thanks.


[Dovecot] Fwd: apply Sieve filter to existing mails

2009-01-13 Thread Neil
Forgot reply-all...

-- Forwarded message --
Date: Tue, Jan 13, 2009 at 1:39 AM
Subject: Re: [Dovecot] apply Sieve filter to existing mails

On Fri, Jan 9, 2009 at 11:01 AM, Jakob Grießmann
 wrote:
> Hello,
>
> is it possible to apply Sieve filter to existing mails, e.g. for
> testing purposes whether my rules work as expected?
>

You can pipe mails to deliver again, and I would imagine it should run
through the sieve script.  And if it did, you could probably whip up a
shell script to do that to all mails in a maildir...

-Neil.


Re: [Dovecot] Default dirs in ./configure?

2009-01-04 Thread Neil
On Sat, Jan 3, 2009 at 6:49 PM, Johan 'yosh' Marklund  wrote:
> Isn't /usr/local/ the default to prevent collisions with dist. provided
> files?
>

Yes, basically.


Re: [Dovecot] delivers mail to bad directory(prefix) using sieve filters

2008-12-23 Thread Neil
On Tue, Dec 23, 2008 at 4:53 AM, Radim Roska  wrote:
> really nobody has similar issue?
>
> On Mon, Dec 15, 2008 at 7:29 PM, Radim Roska  wrote:
>
>> Hi,
>>
>> I've installed dovecot debian stable(from backports) version (1.0.15). Its
>> great..i just have problem with sieve filters. I use only web tool for
>> creating filters that works for me (avelsieve plugin for squirrelmail).
>>
>> it creates rules, where specified folder has prefix INBOX. Thats fine..
>> Since dovecot has configured prefix INBOX too. BUT mails are delivered to
>> INBOX.INBOX.test_folder
>>
>> and thats ugly and not usable.
>>
>> I've figured out new version 1.2 should work, but i dont like idea to
>> install not stable version to production server.
>>
>> Is there any patch or something for stable version?
>>
>> Thanks a lot!
>> Radim
>>
>

Remove the prefix in avelsieve settings?


Re: [Dovecot] MySQL as a storage only.?

2008-12-23 Thread Neil
On Tue, Dec 23, 2008 at 2:20 AM, Timo Sirainen  wrote:
> On Dec 23, 2008, at 4:51 AM, R A wrote:
>> Especially if you try
>> to implement cloud-like services, where you have the possibility of
>> links temporarily going down between servers, and mail can come in to
>> any point, and be retrieved or moved at any point.
>>
>> You really need transactions then, to track every mails change in time,
>> and to replicate those when you get connectivity back. You "can"
>> possibly do it by tracking dovecot logs and do the replication yourself
>> with scripts, but using a database would probably be easier here.
>
> I've also planned easy replication support for Dovecot. Also I don't think
> doing the SQL replication correctly and without losing any data on error
> conditions is as easy as you think.
>
+1
Needless to say, replication would be _very_ useful...


Re: [Dovecot] fine tuning for 10 users?

2008-12-10 Thread Neil


On 11 Dec 2008, at 00:48, badeguruji wrote:


Also, is there any smtp client which can be used with it for a open- 
source standalone server?


Did you mean SMTP server?  If so, Postfix would be my suggestion.   
Fairly easy for basic configurations, and excellent support on the  
mailing list.




Re: [Dovecot] Dovecot as proxy for M$ Exchange mailboxes

2008-11-28 Thread Neil

How is this proxying Exchange?

On 28 Nov 2008, at 07:21, Axel Schmalowsky wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi list,

is there a way to use dovecot as proxy for m$ exchange mailboxes?

Currently, our clients not only can login to their mailboxes with
their e-mail address but also with their accountid.
Both the clients e-mail address and accountid are stored in ldap.

Now I need a way to let dovecot rewriting the client's accountid to
the respective e-mail address. Is this possible with the proxy-feature
of dovecot?

Any hints would be appreciated.

- --
Freundliche Grüße / Kind regards

Axel Schmalowsky
Platform Engineer
___

domainfactory GmbH
Oskar-Messter-Str. 33
85737 Ismaning
Germany

Telefon:  +49 (0)89 / 55266-356
Telefax:  +49 (0)89 / 55266-222

E-Mail:   [EMAIL PROTECTED]
Internet: www.df.eu

Registergericht: Amtsgericht München
HRB 150294, Geschäftsführer Tobias
Marburg, Jochen Tuchbreiter
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJL+JKsuqpduCyZM0RAoFUAJ9mPbv5eI5xP54YhwlmOs40F1RxDQCgir5l
jCdaNeXKO8FnOCxaKSI7S4E=
=m5WN
-END PGP SIGNATURE-





Re: [Dovecot] OT: Run Sieve On A Mailbox Manually

2008-11-22 Thread Neil


On 22 Nov 2008, at 12:55, Ben Winslow wrote:


On Fri, 21 Nov 2008 23:51:11 -0500
Neil <[EMAIL PROTECTED]> wrote:


(Apologies for being offtopic.)

The subject basically says it all...does anyone know of a tool to
run a sieve script on a mailbox (in particular, Maildirs) manually?
Ideally, I'd like to do it without adding a bunch of new headers to
the mail.

So, could I just do a find (or for-loop, if it was just one maildir)
command and pipe all the mails into deliver..?


That should work fine, although Sieve won't know the envelope from or
to.  You can easily add the envelope to address on the command line if
you want to use the same one for every message, but adding the  
envelope

from is a little trickier -- the envelope from isn't standardized in
Maildir, so you'll have to try to pull it from the message headers.

If you want to run sieve on all the messages in an mbox file, you  
could

use formail from procmail in place of your for loop (e.g. formail -s
deliver < mboxfile.)


Why would deliver need to know the envelope to/from ?  It wouldn't  
just use the To: and From: headers?


[Dovecot] OT: Run Sieve On A Mailbox Manually

2008-11-21 Thread Neil

(Apologies for being offtopic.)

The subject basically says it all...does anyone know of a tool to run  
a sieve script on a mailbox (in particular, Maildirs) manually?   
Ideally, I'd like to do it without adding a bunch of new headers to  
the mail.


So, could I just do a find (or for-loop, if it was just one maildir)  
command and pipe all the mails into deliver..?


Thanks,
Neil.




[Dovecot] Mail.app & Subscriptions

2008-11-16 Thread Neil

Client: Mail.app v.3.5
Server: Dovecot 1.1.6

I've noticed that when I go to "Account Info" in Mail.app, and then to  
the "Subscription List" tab, Mail.app will spin for a bit, and then  
give up, without showing any folders and all the buttons are grayed out.


Does anyone know if this a Mail.app issue or a Dovecot issue, if  
there're any work-arounds, and/or if this is something I should be  
concerned about?


Thanks,
Neil.


[Dovecot] Enh-Req: Mark As Read When Delivered

2008-10-29 Thread Neil
I'm under the impression bug-reports are supposed to go to the list,  
so hopefully it's okay if I put in a feature request here too  
(assuming it's not already implemented; but it doesn't look like it).


Basically, all I would like to do is be able to sometimes deliver mail  
as already mail into mail boxes.  Is there some way to do this?


If not, could a flag perhaps be added to deliver to do it?  (And  
Sieve; but for now I think procmail still has much higher adoption,  
and thus having it in deliver would be rather key...)


Thanks,
-Neil.



Re: [Dovecot] Backing Up

2008-10-29 Thread Neil

On 29 Oct 2008, at 16:02, Scott Silva wrote:

on 10-29-2008 12:47 PM Dave McGuire spake the following:

On Oct 29, 2008, at 3:42 PM, Scott Silva wrote:

What is the best way to do a (server-side) backup of all mail in a
user's mail?


I usually just rsync the /home directories to another server. The
inital sync
can take a while, but it gets faster after there is a base to work  
from.


 ...and it's much less painful if you're using maildir instead of  
mbox!


  -Dave

Mbox syncs fairly quickly also. Rsync is very good at working with  
large text

files like mbox, even if users purge stuff from the middle.

But since he did show Maildir was in use, I left out also backing up
/var/spool/mail/* for the inboxes on a default mbox installation.


Yeah, the maildir line was mostly why I put the dovecot -n there.

Do you think rsync will be easier on my servers than tarball/bzip2/scp ?

Thanks for the help,
-Neil.


[Dovecot] Backing Up

2008-10-29 Thread Neil
What is the best way to do a (server-side) backup of all mail in a  
user's mail?


I don't think I'm doing anything weird as far as configs go; here's  
dovecot -n if it helps:


# 1.1.4: /etc/dovecot/dovecot.conf
protocols: imaps
listen: *, [::]
ssl_cert_file: /etc/ssl/dovecot/cert.pem
ssl_key_file: /etc/ssl/dovecot/key.pem
login_dir: /var/run/dovecot/login
login_executable: /usr/libexec/dovecot/imap-login
mail_location: maildir:~/.maildir
auth default:
  mechanisms: plain login
  passdb:
driver: pam
args: *
  userdb:
driver: passwd
  socket:
type: listen
client:
  path: /var/spool/postfix/private/auth
  mode: 432
  user: postfix
  group: postfix



Re: [Dovecot] mbox to Maildir conversion

2008-10-23 Thread Neil


On 23 Oct 2008, at 16:17, Albert E. Whale wrote:


Neil wrote:


On 22 Oct 2008, at 23:35, Albert E. Whale wrote:

I've been running a mbox solution using UW's IMAP server.  I've  
run it

for years.

Now do to heavy message volumes, I've decided to to take the  
plunge to

convert to the Maildir format.

I am currently testing a single user, and have successfully  
converted
the mail messages from mbox to Maildir format, and now I am  
setting up
the procmail tool to place the messages into the correct folder.   
I have
been following the http://wiki.dovecot.org/Migration/MailFormat  
formula,

but now have a question.

New Messages are now being placed into the ~user/Maildir/new folder.
However, when I attempt to retrieve those messages, Dovecot does not
find them.  Why not?


How are you attempting to retrieve them?


I am trying to retrieve them using the POP3 section of Thunderbird.

Is Maildir an IMAP format?


No, the protocol (IMAP/POP3) is irrelevant.  The important part to  
note (and where I suspect your problem is) is that the folder, as far  
as your client (Thunderbird) is concerned, is "Maildir/", the "Maildir/ 
new/" directory is part of Maildir's internal format.


That is to say, you should never be putting "Maildir/(new|cur|tmp)" as  
a mailbox name into a client, just "Maildir/".


-N.


Re: [Dovecot] Problem with virtual mail user login users uid not permitted

2008-05-13 Thread Neil Muller
Unfortunately, I received no replies on this problem so I guess that  
there are very few people using Dovecot and Exim with virtual users on  
Solaris 10 :=( ...


...  I do now have a working mail system of sorts but with real unix  
users so the virtual mail domains issues still remains for me to  
solve.  I'm running Exim with clamav, spamassassin, rbl checking etc  
(and dovecot of course). If anyone wants to know more about my  
configuration then I am happy to talk off list.


Neil
--
E [EMAIL PROTECTED]


Hello,

I am trying to run exim 4.68 and dovecot 1.0.13 on Solaris 10 x86  
5/08 using dovecot lda and sieve with virtual users and domains, tls  
and ssl. At the moment certificates are from my internal CA Exim and  
Dovecot, dovecot lda and dovecot sieve were downloaded and installed  
from Blastwave. Mail delivery (ie from Exim to dovecot via dovecot  
lda) is working correctly but when I try to access mail using imap  
from a client (eg. Thunderbird) the login fails. My mail user for  
accessing virtual user mail is vmail (uid=954, gid=954). I have  
attached the messages from dovecot.log and the output of dovecot -n  
below as well as contents from the passdb file.



 doveco



[Dovecot] Problem with virtual mail user login users uid not permitted

2008-05-12 Thread Neil Muller

Hello,

I am trying to run exim 4.68 and dovecot 1.0.13 on Solaris 10 x86 5/08  
using dovecot lda and sieve with virtual users and domains, tls and  
ssl. At the moment certificates are from my internal CA Exim and  
Dovecot, dovecot lda and dovecot sieve were downloaded and installed  
from Blastwave. Mail delivery (ie from Exim to dovecot via dovecot  
lda) is working correctly but when I try to access mail using imap  
from a client (eg. Thunderbird) the login fails. My mail user for  
accessing virtual user mail is vmail (uid=954, gid=954). I have  
attached the messages from dovecot.log and the output of dovecot -n  
below as well as contents from the passdb file.


Can anyone point me to where I've gone wrong, I've had this working  
fine on Linux but Solaris just doesn't seem to want to play :-)


Thanks,

Neil

--
E [EMAIL PROTECTED]


My passdb file contents:
lothar#  cat /opt/csw/etc/vmail/comms.neologix/passwd
neil:{MD5-CRYPT}$1$Lik.5MFj$PJKYoXEfADgTiK1PI6aa01:954:954::/export/ 
home/vmail/comms.neologix/users/ 
neil::userdb_quota=maildir:storage=10240  
mail_plugins=cmusieve,quota,imap_quota sieve=.dovecot.sieve



Contents of dovecot.log:
dovecot: May 12 15:13:45 Info: auth(default): passwd-file /opt/csw/etc/ 
vmail/comms.neologix/passwd: Read 2 users
dovecot: May 12 15:13:45 Info: auth(default): passwd-file([EMAIL PROTECTED] 
,192.168.1.100): lookup: user=neil file=/opt/csw/etc/vmail/ 
comms.neologix/passwd
dovecot: May 12 15:13:45 Info: auth(default): client out: OK 
1   [EMAIL PROTECTED] 
mail_plugins=cmusieve,quota,imap_quota  sieve=.dovecot.sieve
dovecot: May 12 15:13:45 Error: user [EMAIL PROTECTED]: Logins with  
login_user's UID 954 not permitted (see http://wiki.dovecot.org/ 
UserIds).
dovecot: May 12 15:13:45 Info: auth(default): master in:  
REQUEST1   16850   1
dovecot: May 12 15:13:45 Info: auth(default):  
passwd([EMAIL PROTECTED],192.168.1.100): lookup
dovecot: May 12 15:13:45 Info: auth(default):  
passwd([EMAIL PROTECTED],192.168.1.100): unknown user
dovecot: May 12 15:13:45 Info: auth(default): passwd-file([EMAIL PROTECTED] 
,192.168.1.100): lookup: user=neil file=/opt/csw/etc/vmail/ 
comms.neologix/passwd
dovecot: May 12 15:13:45 Info: auth(default): master out: USER   
1   [EMAIL PROTECTED] uid=954 gid=954 home=/export/home/ 
vmail/comms.neologix/users/neil   quota=maildir:storage=10240
dovecot: May 12 15:13:45 Info: imap-login: Internal login failure:  
user=<[EMAIL PROTECTED]>, method=PLAIN, rip=192.168.1.100,  
lip=192.168.1.229, TLS




The output from dovecot -n is:

lothar#  dovecot -n
# 1.0.13: /opt/csw/etc/dovecot.conf
base_dir: /opt/csw/var/run/dovecot/
log_path: /opt/csw/var/log/dovecot.log
ssl_cert_file: /opt/csw/ssl/certs/dovecot-cert.pem
ssl_key_file: /opt/csw/ssl/private/dovecot-key-np.pem
verbose_ssl: yes
login_dir: /opt/csw/var/run/dovecot//login
login_executable: /opt/csw/libexec/dovecot/imap-login
login_user: vmail
first_valid_uid: 900
last_valid_uid: 1900
first_valid_gid: 900
last_valid_gid: 1900
mail_location: maildir:%h/Maildir
mail_debug: yes
auth default:
  username_format: %Lu
  verbose: yes
  debug: yes
  debug_passwords: yes
  passdb:
driver: passwd-file
args: /opt/csw/etc/vmail/%d/passwd
  userdb:
driver: passwd
  userdb:
driver: passwd-file
args: /opt/csw/etc/vmail/%d/passwd
  socket:
type: listen
client:
  path: /opt/csw/var/run/dovecot/auth-client
  mode: 432
master:
  path: /opt/csw/var/run/dovecot/auth-master
  mode: 384
  user: vmail
  group: vmail
plugin:
  sieve: %h/.dovecot.sieve
  quota: maildir








Re: [Dovecot] dovecot/postfix+vda

2007-09-07 Thread Neil Wilson

Hi Nils,

Nils Vogels wrote:

Try using a static userdb: http://wiki.dovecot.org/UserDatabase/Static

HTH & HAND!

Nils.


Thanks Nils, that's exactly what I was looking for and it's now working 
perfectly!


Much appreciated.

Regards.

Neil


--
This email and all contents are subject to the following disclaimer:
http://www.dcdata.co.za/emaildisclaimer.html



[Dovecot] dovecot/postfix+vda

2007-09-05 Thread Neil Wilson

Hi guys,

Been fighting with postfix+vda/dovecot/

My postfix delivers the emails to /vmail/ which is owned by user 
maild:users 501(uid):100(gid) without any problems.


When I...

# telnet localhost 110
+OK Dovecot ready.
user samichand
+OK
pass wordpass
+OK Logged in.
-ERR [IN-USE] Couldn't open INBOX: Internal error occurred. Refer to 
server log for more information. [2007-09-05 16:32:52]

Connection closed by foreign host.

I get...

Sep  5 16:32:52 mail dovecot: pop3-login: Login: user=, 
method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured

Sep  5 16:32:52 mail dovecot: POP3(samichand): Effective uid=4841, gid=27021
Sep  5 16:32:52 mail dovecot: POP3(samichand): maildir: 
data=/vmail/samichand/Maildir
Sep  5 16:32:52 mail dovecot: POP3(samichand): maildir: 
root=/vmail/samichand/Maildir, index=/vmail/samichand/Maildir, control=, 
inbox=
Sep  5 16:32:52 mail dovecot: POP3(samichand): 
stat(/vmail/samichand/Maildir/cur) failed: Permission denied
Sep  5 16:32:52 mail dovecot: POP3(samichand): 
stat(/vmail/samichand/Maildir/cur) failed: Permission denied
Sep  5 16:32:52 mail dovecot: POP3(samichand): Couldn't open INBOX: 
Internal error occurred. Refer to server log for more information. 
[2007-09-05 16:32:52]
Sep  5 16:32:52 mail dovecot: POP3(samichand): Couldn't open INBOX 
top=0/0, retr=0/0, del=0/0, size=0


In my mail log.

Below is my dovecot.conf

mail:/ # cat /usr/local/etc/dovecot.conf
base_dir = /var/run/dovecot/
protocols = imap pop3
listen = *
disable_plaintext_auth = no
ssl_disable = yes
mail_location = maildir:/vmail/%u/Maildir
mail_debug = yes

protocol imap {
}
protocol pop3 {
  pop3_uidl_format = %v.%u
}
protocol lda {
  postmaster_address = [EMAIL PROTECTED]
}
auth default {
  mechanisms = plain
  passdb shadow {
  }
  userdb passwd {
  }
  user = root
}
dict {
}
plugin {
}

If I change the ownership on the Maildir to the user:users then I can 
log in, but then postfix doesn't deliver successfully.


I need to set the mail user that dovecot uses to access the maildir to 
the same uid that postfix uses, how can I do this, I've read the wiki 
over and over and although it says you can do it, I don't know how.


Taken from the WIKI...

http://wiki.dovecot.org/UserIds#mailusers
Virtual users where all Dovecot users run under a single system user, 
for example vmail (just NOT dovecot).


Also taken from WIKI
http://wiki.dovecot.org/VirtualUsers
You can create for example one vmail user which owns all the mails, or 
you can assign a separate UID for each user. See UserIds#mailusers for 
more information about different ways to allocate UIDs for users.


All I want is to be able to access the mail, with the same my 
"virtual_uid_maps = static:501"(set in my postfix main.cf)


All of these say it can be done, but how do I do it?

Please could someone assist me :(

Thanks.

Neil

--
This email and all contents are subject to the following disclaimer:
http://www.dcdata.co.za/emaildisclaimer.html



[Dovecot] telnet connection refused

2007-07-20 Thread Neil Robins
I'm running Dovecot 1.0 with Postfix and Amavisd-new on FreeBSD 2.6-RELEASE. 
Mail was working OK until I put a new mailbox on but then it stopped. 
Dovecot appears to be running but it doesn't show up in "Top" nor when I run 
"ps -aucx". I also can't telnet to it on port 110 either at localhost or at 
the mail server (Connection refused). Can telnet to port 25 (Postfix) no 
problem. Any suggestions very much appreciated. I know this is an imap group 
but it's the only Dovecot group I could find. Thanks,