Re: Postfix and Dovecot SASL: log NTLM username

2017-05-24 Thread Bradley Giesbrecht
The message in my log is logged by postfix/smtpd which is using dovecot for 
sasl.

Should dovecot sasl be passing the username back to postfix?

Brad

> On May 23, 2017, at 11:33 PM, Aki Tuomi <aki.tu...@dovecot.fi> wrote:
> 
> In fact, looking again, dovecot should log the failure with username, if
> available.
> 
> Aki
> 
> On 24.05.2017 09:22, Aki Tuomi wrote:
>> As band-aid you could try looking at the SASL message, if you decode64
>> it might contain the username in plain text.
>> 
>> Aki
>> 
>> 
>> On 23.05.2017 17:44, Bradley Giesbrecht wrote:
>>> The problem we are facing is incorrect authentications being caught by 
>>> firewall rules and IP’s getting blocked. We would like to be able to 
>>> identify the problem account to help the domain admin track down the issue.
>>> 
>>> Does anyone have another idea? We use sql user db so I thought of logging 
>>> all login attempts to a table with timestamps and lookup the failed logins 
>>> by timestamp.
>>> 
>>> 
>>> Regards,
>>> Bradley Giesbrecht (pixilla)
>>> 
>>> 
>>>> On May 22, 2017, at 10:54 PM, Aki Tuomi <aki.tu...@dovecot.fi> wrote:
>>>> 
>>>> The problem is that the SASL message contains NTLM(v2) message, so it
>>>> would need to be decoded. We can see if there is something we can do
>>>> about this. At the moment it's not possible to log this.
>>>> 
>>>> Aki
>>>> 
>>>> 
>>>> On 23.05.2017 03:23, Bradley Giesbrecht wrote:
>>>>> dovecot 2.2.22
>>>>> postfix 3.1.1
>>>>> 
>>>>> I’m seeing "SASL NTLM authentication failed: {long_hash}” in mail.log.
>>>>> 
>>>>> Is there a way to log the SASL username?
>>>>> 
>>>>> I think postfix is logging what Dovecot SASL is returning so I hope I am 
>>>>> asking on the right list.
>>>>> 
>>>>> 
>>>>> Regards,
>>>>> Bradley Giesbrecht (pixilla)


Re: Postfix and Dovecot SASL: log NTLM username

2017-05-23 Thread Bradley Giesbrecht
The problem we are facing is incorrect authentications being caught by firewall 
rules and IP’s getting blocked. We would like to be able to identify the 
problem account to help the domain admin track down the issue.

Does anyone have another idea? We use sql user db so I thought of logging all 
login attempts to a table with timestamps and lookup the failed logins by 
timestamp.


Regards,
Bradley Giesbrecht (pixilla)


> On May 22, 2017, at 10:54 PM, Aki Tuomi <aki.tu...@dovecot.fi> wrote:
> 
> The problem is that the SASL message contains NTLM(v2) message, so it
> would need to be decoded. We can see if there is something we can do
> about this. At the moment it's not possible to log this.
> 
> Aki
> 
> 
> On 23.05.2017 03:23, Bradley Giesbrecht wrote:
>> dovecot 2.2.22
>> postfix 3.1.1
>> 
>> I’m seeing "SASL NTLM authentication failed: {long_hash}” in mail.log.
>> 
>> Is there a way to log the SASL username?
>> 
>> I think postfix is logging what Dovecot SASL is returning so I hope I am 
>> asking on the right list.
>> 
>> 
>> Regards,
>> Bradley Giesbrecht (pixilla)


Postfix and Dovecot SASL: log NTLM username

2017-05-22 Thread Bradley Giesbrecht
dovecot 2.2.22
postfix 3.1.1

I’m seeing "SASL NTLM authentication failed: {long_hash}” in mail.log.

Is there a way to log the SASL username?

I think postfix is logging what Dovecot SASL is returning so I hope I am asking 
on the right list.


Regards,
Bradley Giesbrecht (pixilla)


Re: restrict map-login by geoip?

2015-09-17 Thread Bradley Giesbrecht
>> On Sep 16, 2015, at 6:31 PM, Benny Pedersen <m...@junc.eu> wrote:
>> 
>> Terry Barnum skrev den 2015-09-17 02:32:
>> 
>>> I've searched but haven't found how to accomplish this.
>> 
>> http://wiki2.dovecot.org/Authentication/RestrictAccess
>> http://wiki2.dovecot.org/PasswordDatabase/ExtraFields/AllowNets
>> 
>> took me 3 sec :=)
> 
> On Sep 16, 2015, at 6:56 PM, Terry Barnum <te...@dop.com> wrote:
> 
> Thanks Benny. I should've said I saw AllowNets but in researching it looked 
> like it expected a smaller comma separated list, not hundreds of IP blocks. 
> Is that what you are using to accomplish this?


You could use a geoip table [1] in your firewall or in dovecot with sql and 
variables [2].


[1] https://dev.maxmind.com/geoip/geoip2/geolite2/
[2] http://wiki2.dovecot.org/Variables


Regards,
Bradley Giesbrecht (pixilla)


object storage

2015-09-11 Thread Bradley Giesbrecht
Is the Dovecot Object Storage plugin still available for purchase?

Clicking the store link [2] from this page [1] does not show any info about 
purchasing the plugin.

[1] 
http://www.dovecot.fi/dovecot-object-storage-plugins-available-for-online-purchase/
[2] http://shop.dovecot.fi/


Regards,
Bradley Giesbrecht (pixilla)


Re: v2.2.17 release candidate released

2015-05-10 Thread Bradley Giesbrecht

On May 9, 2015, at 10:41 AM, Timo Sirainen t...@iki.fi wrote:

 http://dovecot.org/releases/2.2/rc/dovecot-2.2.17.rc1.tar.gz
 http://dovecot.org/releases/2.2/rc/dovecot-2.2.17.rc1.tar.gz.sig
 
 Quite a lot of changes, so here's a release candidate first. If no problems 
 are reported I'll make v2.2.17 release early next week. Please test 
 especially non-Linux systems as there are some larger configure/Makefile 
 changes done since v2.2.16.

Between dovecot-2.2.17rc1 and 69630e6048fd a build issue on OS X/MacPorts 
appears to be gone.

Regards,
Bradley Giesbrecht (pixilla)



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: v2.2.14.rc1 released

2014-10-05 Thread Bradley Giesbrecht

On Oct 5, 2014, at 3:37 AM, Timo Sirainen t...@iki.fi wrote:

 On 04 Oct 2014, at 20:52, Bradley Giesbrecht pixi...@macports.org wrote:
 
 With Apple OS X Mavericks 10.9 (MacPorts) we stop here:
 
 libtool: link: /usr/bin/clang -dynamiclib  -o .libs/libdovecot-dsync.0.dylib 
   -Wl,-force_load,./.libs/libdsync.a  -L/opt/local/lib 
 ../../lib-storage/.libs/libdovecot-storage.dylib  -Os -arch x86_64 
 -Wl,-headerpad_max_install_names -arch x86_64 -Wl,-dylib_file 
 -Wl,/opt/local/lib/dovecot/libdovecot.0.dylib:/opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_mail_dovecot2/dovecot2/work/dovecot-2.2.14.rc1/src/lib-dovecot/.libs/libdovecot.dylib
-install_name  /opt/local/lib/dovecot/libdovecot-dsync.0.dylib 
 -compatibility_version 1 -current_version 1.0 -Wl,-single_module
 Undefined symbols for architecture x86_64:
 _aqueue_append, referenced from:
 _sync_tree_sort_and_delete_mailboxes in 
 libdsync.a(dsync-mailbox-tree-sync.o)
 _aqueue_count, referenced from:
 _sync_tree_sort_and_delete_mailboxes in 
 libdsync.a(dsync-mailbox-tree-sync.o)
 ...
 
 Does the attached patch help?

Yes, with this patch dd25099bd633 compiled and installed to DESTDIR.

 You need to run autogen.sh + configure after patching.

Autogen.sh required wget and pulled wiki2-export.tar.gz during its operation. 
Curiously, wget was also used during make to pull a unicode file I believe. I 
need to guard against pulling new files during the build operation. Would these 
wget fetched files normally be provided in your release packages?


Regards,
Bradley Giesbrecht (pixilla)



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: v2.2.14.rc1 released

2014-10-04 Thread Bradley Giesbrecht

On Oct 3, 2014, at 8:34 AM, Timo Sirainen t...@iki.fi wrote:

 http://dovecot.org/releases/2.2/rc/dovecot-2.2.14.rc1.tar.gz

Patched with this fix:
http://hg.dovecot.org/dovecot-2.2/rev/dd25099bd633


Hi Timo,


With Apple OS X Mavericks 10.9 (MacPorts) we stop here:

libtool: link: /usr/bin/clang -dynamiclib  -o .libs/libdovecot-dsync.0.dylib   
-Wl,-force_load,./.libs/libdsync.a  -L/opt/local/lib 
../../lib-storage/.libs/libdovecot-storage.dylib  -Os -arch x86_64 
-Wl,-headerpad_max_install_names -arch x86_64 -Wl,-dylib_file 
-Wl,/opt/local/lib/dovecot/libdovecot.0.dylib:/opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_mail_dovecot2/dovecot2/work/dovecot-2.2.14.rc1/src/lib-dovecot/.libs/libdovecot.dylib
   -install_name  /opt/local/lib/dovecot/libdovecot-dsync.0.dylib 
-compatibility_version 1 -current_version 1.0 -Wl,-single_module
Undefined symbols for architecture x86_64:
  _aqueue_append, referenced from:
  _sync_tree_sort_and_delete_mailboxes in 
libdsync.a(dsync-mailbox-tree-sync.o)
  _aqueue_count, referenced from:
  _sync_tree_sort_and_delete_mailboxes in 
libdsync.a(dsync-mailbox-tree-sync.o)
...



Regards,
Bradley Giesbrecht (pixilla)



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Dovecot] Dovecot 2 | Creating message rules

2014-06-02 Thread Bradley Giesbrecht
+1 roundcube/managesieve

On Jun 2, 2014, at 6:46 AM, Bubreg István bubreg.ist...@gmail.com wrote:
 I'm using roundcube for this, it has a 'managesieve' plugin which works
 with dovecot well.
 
 
 2014-06-02 15:35 GMT+02:00 Jos Chrispijn dove...@webrz.net:
 
 Can someone explain how I can create message rules to use with this
 version of Dovecot? I specially switched to this version because it
 supports then Pigeonhole Sieve. I would like to volunteer to contribute as
 a volunteer when someone would like to create a html driven user interface
 that provides a user friendly configuration interface and would make such
 configuration a piece of cake.
 
 --
 
 Best regards,
 Jos Chrispijn
 
 --- Artificial intelligence is no match for natural stupidity




signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Dovecot] Dovecot antispam plugin for 2.2

2013-08-21 Thread Bradley Giesbrecht

On Aug 21, 2013, at 1:19 PM, Micah Anderson wrote:

 
 Hello,
 
 I recently was looking to update to dovecot 2.2 and I have been happily
 using the dovecot-antispam plugin in 2.1, but found that there have been
 some changes in dovecot that make this version not compile against 2.2.


I believe this is what you want:
http://hg.dovecot.org/dovecot-antispam-plugin/

Regards,
Bradley Giesbrecht (pixilla)



Re: [Dovecot] tables between dovecot and postfix and a paradoxical question

2013-06-21 Thread Bradley Giesbrecht
On Jun 21, 2013, at 4:25 PM, Mohsen Pahlevanzadeh wrote:

 Dear all,
 
 I read we create the following table in wiki2 :
 CREATE TABLE users (
userid VARCHAR(128) NOT NULL,
domain VARCHAR(128) NOT NULL,
password VARCHAR(64) NOT NULL,
home VARCHAR(255) NOT NULL,
uid INTEGER NOT NULL,
gid INTEGER NOT NULL
 );
 
 But i read the following text in the official postfix documentation :
  DO create tables with each matching item as a key and with
   an arbitrary value. With SQL databases it is not  uncommon
   to return the key itself or a constant value.
 ref: http://www.postfix.org/mysql_table.5.html
 
 How can i combine together?


I'm not sure I understand you problem but for dovecot and postfix the important 
thing is to return the query result that meets your needs.
How the tables are create and related does not really matter. If you are having 
problems it is most likely your select query.

Regards,
Bradley Giesbrecht (pixilla)



[Dovecot] dovecot-antispam-plugin compile error

2013-01-08 Thread Bradley Giesbrecht
$ hg --cwd ./work/dovecot-antispam-plugin-50 glog -l3 --style compact
@  50[tip]   0319240072d8   2012-12-20 03:56 +0200   Eugene Paskevich 
eug...@raptor.kiev.ua
|Made use of new DOVECOT_ABI_VERSION macro.
...

$ configure; make
Compiling signature-log.c (plugin)...
signature-log.c:122: error: too many arguments to function ‘dict_init’
...

Reverting src/signature-log.c from r49 to r30 allows make to succeed again.


Regards,
Bradley Giesbrecht (pixilla)



smime.p7s
Description: S/MIME cryptographic signature


Re: [Dovecot] SPECIAL-USE and mailbox names in various IMAP clients

2012-12-12 Thread Bradley Giesbrecht
On Dec 12, 2012, at 3:11 AM, Timo Sirainen wrote:

 http://imapwiki.org/SpecialUse
 
 Please fill out for all clients with all languages you know of. Knowing the 
 mailbox names can be helpful with Dovecot's mailbox_alias plugin.


Is there online documentation for testing an email clients support of 
SPECIAL-USE?

Regards,
Bradley Giesbrecht (pixilla)



smime.p7s
Description: S/MIME cryptographic signature


Re: [Dovecot] no longer mounted warnings

2012-12-04 Thread Bradley Giesbrecht
On Dec 4, 2012, at 12:57 PM, Daniel Parthey wrote:

 e-frog wrote:
 On 04.12.2012 19:27, wrote Dave Abrahams:
 See http://wiki2.dovecot.org/Mountpoints
 
 Just being curious:
 
 Is it possible to ignore all mountpoints with this command?
 doveadm mount add '*' ignore
 
 Where does dovecot store ignored mountpoints?

The docs say:
...
or ignore all mountpoints under /mnt:
doveadm mount add '/mnt/*' ignore
...

So in your case try:
doveadm mount add '/Volumns/*' ignore


Regards,
Bradley Giesbrecht (pixilla)



smime.p7s
Description: S/MIME cryptographic signature


Re: [Dovecot] Trouble implementing Antispam plug-in for Dovecot

2012-09-20 Thread Bradley Giesbrecht

On Sep 20, 2012, at 8:53 AM, Ben Johnson wrote:

 Thanks again, Tom. After you set me straight on the various versions of
 the plug-in, I was able to synthesize the relevant documentation and
 make it all work on Ubuntu 12.04 LTS with Dovecot 2.
 
 The key was to understand the following:
 
 1.) The Ubuntu repositories use the Johannes versions of the plug-in
 (for both Dovecot 1 and 2).
 
 Ubuntu 10.04 LTS (Dovecot 1)
 http://manpages.ubuntu.com/manpages/lucid/man7/dovecot-antispam.7.html
 
 Ubuntu 12.04 LTS (Dovecot 2)
 http://manpages.ubuntu.com/manpages/precise/man7/dovecot-antispam.7.html
 
 2.) The Dovecot 2 Wiki instructions for the Antispam plug-in refer to
 the Eugene version, and that version's configuration directives differ
 from the Johannes version 2 directives.

Is there a Johannes version 2?

I understood that Johannes dropped support at dovecot 2.x and that is why 
Eugene's version exists.

 So, anyone attempting to follow
 the Wiki article on Ubuntu will need to adapt the directives accordingly
 (see documentation links above for equivalent directive names).
 
 3.) The sample /usr/bin/sa-learn-pipe.sh script in the Dovecot 2 Wiki
 instructions lacks a shebang; until a proper shebang is added to the
 shell script, script execution will fail with status 1. I added the
 standard shebang:
 
 #!/bin/sh
 
 Here are the configuration directives that work for me:
 
 plugin {
 antispam_debug_target = syslog
 antispam_backend = pipe
 antispam_signature = X-DSPAM-Signature
 antispam_signature_missing = error
 antispam_spam_pattern_ignorecase = SPAM;JUNK
 antispam_pipe_tmpdir = /tmp
 antispam_pipe_program = /usr/bin/sa-learn-pipe.sh
 antispam_pipe_program_spam_arg = --spam
 antispam_pipe_program_notspam_arg = --ham
 }
 
 My final goal is to get the version 1 plug-in working with Dovecot 1.2.9.

If I were implementing Johannes  antispam plugin with Dovecot 1.2.9 I would 
follow Johannes documentation.
http://johannes.sipsolutions.net/files/antispam.html


Regards,
Bradley Giesbrecht (pixilla)



smime.p7s
Description: S/MIME cryptographic signature


Re: [Dovecot] The deleted_to_trash Plugin (workaround Outlook 2007 behaviour)

2012-06-27 Thread Bradley Giesbrecht

On Jun 27, 2012, at 9:10 AM, J E Lyon wrote:

 Hi,
 
 I see this plugin exists for v1  v2, all very interesting... Surprised no 
 one seems to have created an RPM and it looks like deleted_to_trash is one of 
 the very few plugins to not be shipped as part of the default install with 
 CentOS 5.5 or CentOS 6 (i.e. Dovecot v1  v2 respectively.)
 
 Am I missing something, or does everyone really build from source?

I was not aware of this plugin.

Looking at the plugin configuration options how would one handle all the 
various folder names that users use for Trash?
http://wiki2.dovecot.org/Plugins/deleted-to-trash

Regards,
Brad

smime.p7s
Description: S/MIME cryptographic signature


Re: [Dovecot] doveadm fetch LARGE attachments and remove message [SOLVED]

2012-06-19 Thread Bradley Giesbrecht
On Jun 18, 2012, at 6:49 AM, Timo Sirainen wrote:

 On 17.6.2012, at 18.19, Bradley Giesbrecht wrote:
 
 Looking at the wiki and man pages I am unsure how to fetch email attachments 
 from a unix shell.
 
 I have an doveadm search that returns the messages that have the 
 attachments I am after.
 
 Would I loop through an doveadm fetch and use a commandline imap client to 
 save the attachments and move the message to the Trash?
 
 Or is there a doveadm command for this?
 
 No, there's currently no easy way to do this. doveadm fetch doesn't support 
 that. You could possibly do this via IMAP, but it would be difficult to know 
 which MIME part to fetch. Actually it's not even obvious if a MIME part is an 
 attachment or not..


I used an imap client to create an imap folder named unpack , searched for 
the messages I needed and then moved them into the unpack folder. I then used 
munpack to unpack the messages from the unpack folder to a local disk directory.
http://ftp.andrew.cmu.edu/pub/mpack/


Regards,
Bradley Giesbrecht (pixilla)



[Dovecot] doveadm fetch LARGE attachments and remove message

2012-06-17 Thread Bradley Giesbrecht
Looking at the wiki and man pages I am unsure how to fetch email attachments 
from a unix shell.

I have an doveadm search that returns the messages that have the attachments 
I am after.

Would I loop through an doveadm fetch and use a commandline imap client to 
save the attachments and move the message to the Trash?

Or is there a doveadm command for this?

Regards,
Bradley Giesbrecht (pixilla)

Re: [Dovecot] testing fts-solr?

2012-03-04 Thread Bradley Giesbrecht

On Mar 4, 2012, at 7:57 AM, Charles Marcus wrote:

 On 2012-03-03 4:16 PM, Bradley Giesbrecht wrote:
 On Mar 3, 2012, at 12:14 PM, Charles Marcus wrote:
 On 2012-03-02 5:13 PM, Robindove...@r.paypc.com  wrote:
 This mailing list is for dovecot, not Thunderbird support.  The lack of
 replies to Thunderbird usage questions no doubt reflects this.
 
 What precisely about a possible bug with *any* IMAP client when
 using dovecot+fts makes you think that this is not on topic for the
 dovecot list?
 
 Show dovecot misbehaving.
 
 The OP showed where *something* was misbehaving - maybe you should read an 
 entire thread before jumping in?

I have been reading this thread from the beginning.

You asked the question:

On Mar 3, 2012, at 12:14 PM, Charles Marcus wrote:
 What precisely about a possible bug with *any* IMAP client when using 
 dovecot+fts makes you think that this is not on topic for the dovecot list?


It has been demonstrated that dovecot+fts is working properly and that this not 
a dovecot issue. At what point should this issue be taken to a Thunderbird 
support venue?

I will butt out now.

Re: [Dovecot] testing fts-solr?

2012-03-03 Thread Bradley Giesbrecht

On Mar 3, 2012, at 12:14 PM, Charles Marcus wrote:

 On 2012-03-02 5:13 PM, Robin dove...@r.paypc.com wrote:
 This mailing list is for dovecot, not Thunderbird support.  The lack of
 replies to Thunderbird usage questions no doubt reflects this.
 
 What precisely about a possible bug with *any* IMAP client when using 
 dovecot+fts makes you think that this is not on topic for the dovecot list?


Show dovecot misbehaving.

On Feb 28, 2012, at 6:57 AM, Timo Sirainen wrote:

 On Tue, 2012-02-28 at 15:47 +0100, kfx wrote:
 Did you enable the 'Run search on server' option in the Advanced Search
 window? Doing this *should* result in Thunderbird using dovecots indexes
 server side.
 
 
 Yes I did.
 
 Some more info:
 
 by telnet'ing directly and issuing:
 c search text pattern
 * SEARCH 1208
 c OK Search completed (0.003 secs).
 
 So, Solr in Dovecot works perfectly.
 
 But the same search in thunderbird return No matches found :(
 
 Thunderbird problem, nothing you can do about it from Dovecot's side.


Regards,
Bradley Giesbrecht

Re: [Dovecot] [Dovecot-news] v2.1.0 released

2012-02-16 Thread Bradley Giesbrecht

On Feb 16, 2012, at 10:20 AM, Daniel J. Luke wrote:

 On Feb 16, 2012, at 12:51 PM, Timo Sirainen wrote:
 On 16.2.2012, at 19.49, Daniel J. Luke wrote:
 
 Feb 16 12:35:42 gandalf dovecot[28047]: master: Fatal: kevent(EV_ADD, 
 READ, 16) failed: Invalid argument
 
 2.0.18 works fine (as has every other 2.0 that I've tried). I've been using 
 the kqueue ioloop on this machine for a long time (pre 1.0, I think).
 
 OK, I bet it's the FIFOs then. See if this helps:
 
 service stats {
 fifo_listener stats-mail {
   mode = 0
 }
 }
 
 That works.

Cool.

I am surprised I missed this thread:
http://dovecot.org/pipermail/dovecot/2011-November/062122.html

Regards,
Bradley Giesbrecht (pixilla)


Re: [Dovecot] Dovecot 2.0.18 build error with pigeonhole

2012-02-12 Thread Bradley Giesbrecht

On Feb 12, 2012, at 2:43 PM, Timo Sirainen wrote:

 On 13.2.2012, at 0.32, Morten Stevens wrote:
 
 It is probably a problem with pigeonhole 0.2.5.
 
 
 Yeah, unfortunately I had to break it to fix a bug.. Although I guess if I 
 really wanted to I could have worked around it also. Anyway, 
 http://hg.rename-it.nl/dovecot-2.0-pigeonhole/rev/58fc2f01c432 fixes it.

Confirmed. Thanks.

Re: [Dovecot] sieve in sql or reporting

2011-12-24 Thread Bradley Giesbrecht

On Dec 23, 2011, at 8:35 PM, Stephan Bosch wrote:

 On 12/24/2011 5:26 AM, Stephan Bosch wrote:
 On 12/24/2011 3:28 AM, Bradley Giesbrecht wrote:
 With dovecot2 and pigeonhole sieve/managesieve is it currently possible to 
 store sieve rules in an sql database?
 Unfortunately, not yet. It is listed somewhere on the TODO list, but it does 
 not have high priority so far.
 
 If not is there a way to query all accounts; looking for things like active 
 vacation rules?
 
 I'm working on an evolution of the sieve_pipe plugin called the 
 sieve_extprograms plugin. One of the things it adds is a new action command 
 called execute, which may suit your needs. It will only be available for 
 Dovecot v2.1 though. You can read the latest version of the specification 
 here (example 4 should match your application):
 
 http://hg.rename-it.nl/pigeonhole-0.3-sieve-extprograms/raw-file/tip/doc/rfc/spec-bosch-sieve-extprograms.txt
  
 
 Oh btw, if you are looking for a way to disable vacation rules after some 
 period of time, you can use the date extension 
 (http://tools.ietf.org/html/rfc5260#section-4). For example:
 
 require [date, relational, vacation];
 
 if currentdate :value le date 2011-12-09 {
   vacation I'm out of office this week. I'll be back on Saturday 10th to 
 reply to your e-mails.;
 }

Stephan, thank you for both responses.

My idea was to add sieve rules to a report so I could look up an email address 
and explain to the user why things happen.

I can read in the users sieve scripts from the file system, or put them into 
sql myself for that matter. If a managesieve query command already existed I 
would use that.


Regards,
Bradley Geisbrecht

[Dovecot] sieve in sql or reporting

2011-12-23 Thread Bradley Giesbrecht
With dovecot2 and pigeonhole sieve/managesieve is it currently possible to 
store sieve rules in an sql database?

If not is there a way to query all accounts; looking for things like active 
vacation rules?


Regards,
Bradley Giesbrecht

[Dovecot] pop3-login Error after dovecot 1.2.11 to dovecot 2.0.13

2011-06-17 Thread Bradley Giesbrecht
I recently upgaded from dovecot 1.2.11 to 2.0.13.
I used this command on my dovecont.conf after the upgrade and then moved the 
new file into place after removing some plugins.
$ sudo doveconf -n -c dovecot-1.conf  dovecot-2.conf

After 24+ hours with no issues I was getting pop3 login failures.
...
/path/to/log/dovecot.log:master: Error: service(pop3): read(status) failed: 
Interrupted system call
...
/path/to/log/dovecot.log:Jun 17 05:25:47 pop3-login: Error: master(pop3): Auth 
request timed out (received 0/12 bytes)
/path/to/log/dovecot.log:Jun 17 05:25:47 pop3-login: Info: Internal login 
failure (pid=1796 id=1) (auth failed, 1 attempts): 
user=rrive...@domainname.com, method=APOP, rip=123.4.5.6, lip=123.7.8.9
/path/to/log/dovecot.log:Jun 17 05:25:47 pop3-login: Error: master(pop3): Auth 
request timed out (received 0/12 bytes)
/path/to/log/dovecot.log:Jun 17 05:25:47 pop3-login: Info: Internal login 
failure (pid=1797 id=1) (auth failed, 1 attempts): user=j...@domainname.com, 
method=APOP, rip=123.4.5.6, lip=123.7.8.9
/path/to/log/dovecot.log:Jun 17 05:25:47 pop3-login: Error: master(pop3): Auth 
request timed out (received 0/12 bytes)
/path/to/log/dovecot.log:Jun 17 05:25:47 pop3-login: Info: Internal login 
failure (pid=1798 id=1) (auth failed, 1 attempts): user=gk...@domainname.com, 
method=APOP, rip=123.4.5.6, lip=123.7.8.9
/path/to/log/dovecot.log:Jun 17 05:25:47 pop3-login: Error: master(pop3): Auth 
request timed out (received 0/12 bytes)
...
/path/to/log/dovecot.log:Jun 17 05:40:34 pop3-login: Error: 
net_connect_unix(pop3) failed: Operation timed out
...

Bouncing dovecot has resolved the login issues for the present.

Reading from the wiki I see my post-login scripts will need changing.
http://wiki2.dovecot.org/Upgrading/2.0

Is there anything else obviously/dangerously wrong with the following doveconf 
output?
I'm am still in the process of moving directives out of dovecot.conf into the 
new conf.d files.

$ doveconf -n
# 2.0.13: /path/to/etc/dovecot/dovecot.conf
# OS: Darwin 9.8.0 Power Macintosh  hfs
auth_mechanisms = plain login cram-md5 ntlm apop
default_internal_user = _dovecot
default_login_user = _dovenull
disable_plaintext_auth = no
log_path = /path/to/log/dovecot.log
mail_location = dbox:/path/to/mail/%d/%n/dbox
mail_max_userip_connections = 30
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character 
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy 
include variables body enotify environment mailbox date
passdb {
  args = /path/to/etc/dovecot/dovecot_mysql.conf
  driver = sql
}
plugin {
  autocreate = Trash
  autocreate2 = Spam
  autosubscribe = Trash
  autosubscribe2 = Spam
}
protocols = imap pop3
service auth {
  unix_listener /path/to/var/spool/postfix/private/auth {
group = _postfix
mode = 0660
user = _postfix
  }
  unix_listener auth-master {
mode = 0600
user = _vmail
  }
  unix_listener auth-userdb {
group = _vmail
user = _vmail
  }
}
service imap {
  executable = /path/to/dovecot/bin/log_imap_login.sh
}
service pop3 {
  executable = /path/to/dovecot/bin/log_pop3_login.sh
}
ssl_cert = /path/to/etc/ssl/certs/dovecot.pem
ssl_key = /path/to/etc/ssl/private/dovecot.pem
userdb {
  driver = prefetch
}
userdb {
  args = /path/to/etc/dovecot/dovecot_mysql.conf
  driver = sql
}



Thanks,
Bradley Giesbrecht



Re: [Dovecot] dovecot-antispam dependencies

2011-05-22 Thread Bradley Giesbrecht

On May 22, 2011, at 4:59 AM, Trever L. Adams wrote:

 On 05/22/2011 01:21 AM, Sven Schwyn wrote:
 Hi
 
 There's currently a version block for the dovecot and dovecot-antispam 
 packages in Gentoo. Dependencies indicate that dovecot-2.0.11 does not 
 accept dovecot-antispam-1.3. Is this correct or should it work? If not: How 
 about the current rc of version 1.4?
 
 Cheers, -sven
 I believe you will find a much cleaned up version here:
 http://hg.dovecot.org/dovecot-antispam-plugin/
 
 It will work. Thanks to Eugene for his work.

It would be nice to make a release of Eugene's dovecot-antispam-plugin so 
packages can be made.

I can find no version or tag info at 
http://hg.dovecot.org/dovecot-antispam-plugin/.

--
Bradley Giesbrecht

Re: [Dovecot] dovecot-antispam dependencies

2011-05-22 Thread Bradley Giesbrecht

On May 22, 2011, at 10:51 AM, Tom Hendrikx wrote:

 On 22/05/11 19:42, Trever L. Adams wrote:
 On 05/22/2011 09:59 AM, Bradley Giesbrecht wrote:
 
 It would be nice to make a release of Eugene's dovecot-antispam-plugin so 
 packages can be made.
 
 I can find no version or tag info at 
 http://hg.dovecot.org/dovecot-antispam-plugin/.
 
 --
 Bradley Giesbrecht
 Bradley,
 
 Just use the latest versions of the files. It works fine (a long time of
 using it on three servers here, one of which sees thousands of emails
 every few hours). If you want a rpm spec, I have made one.
 
 
 I would like to see a tagged version too, but trunk works fine here.
 Since the OP mentions Gentoo, my latest ebuild for dovecot-antispam for
 2.x is attached.

I maintain the MacPorts port of dovecot-antispam. Tags or releases help produce 
packages with consistent build results.

I will go ahead and use a hg changeset and a date for a version to produce my 
package.

--
Bradley Giesbrecht

Re: [Dovecot] sieve not working if i have override

2011-02-08 Thread Bradley Giesbrecht
If you add another table with domain and protocol keys you could more  
easily manage plugins for domain,protocols pairs.


SELECT t1.username as user,t1.password, \
group_concat(t2.plugin seperator ' ' ) as userdb_mail_plugins, \
101 as userdb_uid, 502 as userdb_gid, CONCAT('*:bytes=', CAST(t1.quota  
AS

CHAR)) AS quota_rule
from mailbox t1
left outer join mailbox_plugins t2 on t2.domain = '%d' and t2.protocol  
= '%s'


Could join on username as well, nice for testing.

--
Brad

On Feb 8, 2011, at 1:09 PM, Paul A wrote:

Thank you Timo I got that to work, it's posted below in case some  
searches

the mailing list for something similar.

password_query = SELECT username as user, password, \
if('%d' IN ('virttest1.xxx.net', 'test2000.com') AND '%s'='imap', \
'quota imap_quota trash expire autocreate acl imap_acl',null) as
userdb_mail_plugins, \
101 as userdb_uid, 502 as userdb_gid, CONCAT('*:bytes=', CAST(quota AS
CHAR)) AS quota_rule FROM mailbox WHERE username = '%u'


Tested and working.

paul


-Original Message-
From: dovecot-bounces+razor=meganet@dovecot.org
[mailto:dovecot-bounces+razor=meganet@dovecot.org] On Behalf Of  
Timo

Sirainen
Sent: Tuesday, February 08, 2011 12:34 PM
To: Paul A
Cc: Dovecot Mailing List
Subject: Re: [Dovecot] sieve not working if i have override

Add some more trickyness to your SQL query using another IF(). If '%s'
expands to 'imap', return the imap_* plugins, otherwise don't.

On 8.2.2011, at 16.42, Paul A wrote:

I know that but I need to use the override option on selected  
domains, as

I
don't want all domains to have ACL access. So when I use override I  
need

to
specify all plugins I'm using because the override feature will not  
look

at
the $mail_plugin statement in dovecot.conf and ofcourse when I do  
this I

get
the error below. Is there another method I can use to allow only  
certain

domains ACL access instead of the override. Not sure if Timo has any

ideas.


Thanks, Paul


-Original Message-
From: Stephan Bosch [mailto:step...@rename-it.nl]
Sent: Tuesday, February 08, 2011 3:18 AM
To: Paul A
Cc: 'Dovecot Mailing List'
Subject: Re: [Dovecot] sieve not working if i have override

On 2/8/2011 12:33 AM, Paul A wrote:

Hi,



I have a few domain that I'm overriding the mail_plugins, see  
password

query

below, however when I use this password query everything is working

expect

sieve gives me an error. How can I get around this problem?


[...]

Feb  7 18:28:20 testip5 dovecot: managesieve: Error:
dlopen(/usr/local/lib/dovecot/lib02_imap_acl_plugin.so) failed:
/usr/local/lib/dovecot/lib02_imap_acl_plugin.so: undefined symbol:
client_send_tagline


[...]

It also complains about imap_quota.


You're trying to load the imap_quota and imap_acl plugins into
ManagSieve, which makes no sense. So, your query should not return  
those

plugins when the service (%Ls) is `sieve'.

Regards,

Stephan.







Re: [Dovecot] SSD drives are really fast running Dovecot

2011-01-15 Thread Bradley Giesbrecht


On Jan 15, 2011, at 6:30 AM, Charles Marcus wrote:

One thing we are looking at here (small 50+ userbase) is kind of a  
'best
of both worlds' setup - using SSD's (haven't decided yet to trust a  
bare

striped set or go with a 4 drive RAID10 - probably the latter so I can
sleep at night) for the main OS and a limited amount of storage space
per user (maildir) for active/recent email, then use another namespace
with a much higher quota - I'm thinking about 10GB per user should  
do in

our environment - for 'slow' storage (cheap mechanical RAID10 setup) -
ie, emails that are only accessed on occasion (mdbox).

Then, enforce a smallish per user quota (how much would depend on your
particular environment, but I'm thinking something like 250 or maybe
500MB, since our users do get a lot of large attachments in the course
of doing business) on their INBOX -  Sent, Drafts and Templates  
folders

too, but that's a question on my list of 'how to do' - how to easily
place these 'special' folders on the 'fast' namespace, and all user
created folders in the 'slow' namespace. It would be really nice if
there were some kind of native way that dovecot could 'assign' the
'special' folders to the same namespace as the INBOX, and all other  
user

created folders to another...

Doing this will also help train users in proper email management -
treating their INBOX just like they would a physical INBOX tray on  
their

desk. They wouldn't just let paper pile up there, why do so in their
INBOX (because they 'can')? Ie, it should be something they should
always strive to keep totally EMPTY. Of course this practically never
happens, but the point is, they need to learn to make a decision once
they are finished with it, and most importantly, take said action -
either delete it, or file it.


Sounds like a great idea. I work with media companies where quotas can  
be challenging.


--
Brad


Re: [Dovecot] Dovecot fails after updating MySQL

2011-01-10 Thread Bradley Giesbrecht


On Jan 10, 2011, at 4:19 PM, Jerry wrote:

I just updated MySQL to Server version: 5.5.8 on my FreeBSD-8.2  
system.
Now Dovecot refuses to run. Prior to this, dovecot had been running  
for several

years without a problem.

This is the output of dovecot -n

# 1.2.16: /usr/local/etc/dovecot.conf
# OS: FreeBSD 8.2-PRERELEASE amd64  ufs
log_path: /var/log/dovecot.log
login_dir: /var/run/dovecot/login
login_executable: /usr/local/libexec/dovecot/imap-login
verbose_proctitle: yes
first_valid_uid: 1000
first_valid_gid: 1000
mail_privileged_group: mail
mail_location: maildir:/var/mail/vhost/seibercom.net/gerard
mail_plugins: expire
imap_client_workarounds: delay-newmail netscape-eoh tb-extra-mailbox- 
sep

lda:
 postmaster_address: postmas...@seibercom.net
 mail_plugins: sieve
 sieve_global_path: /usr/local/etc/dovecot/sieve/gerard.sieve
 sendmail_path: /usr/sbin/sendmail
auth default:
 mechanisms: plain login digest-md5 cram-md5
 username_format: %Lu
 verbose: yes
 debug: yes
 debug_passwords: yes
 passdb:
   driver: sql
   args: /usr/local/etc/dovecot-sql.conf
 userdb:
   driver: sql
   args: /usr/local/etc/dovecot-sql.conf
 socket:
   type: listen
   client:
 path: /var/run/dovecot/auth-client
 mode: 432
   master:
 path: /var/run/dovecot/auth-master
 mode: 384
 user: vmail
 group: vmail
plugin:
 expire: Trash 2 Spam/* 2
 expire_dict: proxy::expire
dict:
 expire: mysql:/usr/local/etc/dovecot-dict-expire.conf

The /var/run/dovecot directory looks like this:

drwxr-xr-x   3 root   wheel 512B 2011-01-10 18:49:44 EST ./
drwxr-xr-x  15 root   wheel 1.0K 2011-01-10 18:49:37 EST ../
srw-rw   1 root   wheel   0B 2011-01-10 18:49:37 EST auth- 
client=
srw---   1 vmail  vmail   0B 2011-01-10 18:49:37 EST auth- 
master=
srw---   1 root   wheel   0B 2011-01-10 18:49:37 EST auth- 
worker.34781=
srwxrwxrwx   1 root   wheel   0B 2011-01-10 18:49:37 EST dict- 
server=

lrwx--   1 root   wheel  27B 2011-01-10 18:49:37 EST
dovecot.conf@ - /usr/local/etc/dovecot.conf
drwxr-x---   2 root   dovecot   512B 2011-01-10 18:49:37 EST login/
-rw---   1 root   wheel   6B 2011-01-10 18:49:37 EST  
master.pid


This is the log file output, updated every second (snippet)

Jan 10 18:42:11 dovecot: Info: Dovecot v1.2.16 starting up
Jan 10 18:42:11 dovecot: Error: child 34517 (auth-worker) killed with
signal 11 (core not dumped)
Jan 10 18:42:11 dovecot: Error: child 34521 (auth-worker) killed with
signal 11 (core not dumped)

I have tried deleting and rebuilding dovecot without success. I am  
at a

lose to figure out what the problem is.



What version of mysql were you at before?

Do your mysql logs reveal anything?

Have you turned on mysql query logging?

Can you run the /usr/local/etc/dovecot-sql.conf queries in a mysql  
client successfully?


--
Brad


Re: [Dovecot] Pointers for developing a proper encryption plugin?

2011-01-03 Thread Bradley Giesbrecht


On Jan 3, 2011, at 10:05 AM, dove...@moorooboorai.com wrote:


Hi all,

One thing that's always itching when I think about mail-servers, is  
the storage of e-mail messages in (rather) plain-text.
Meaning, any administrator with sufficient privileges would be able  
to read messages not meant for them.

Of course, PGP alike solutions exist, but that's not for the masses.

In my opinion I would like to have e-mail messages stored encrypted  
using a (strong) user-supplied password.
That password would ideally be the same as the one the user logs in  
with.
So for me it's okay to place and enforce that requirement on any of  
the users.


Would forgotten passwords result in lost emails?

// Brad


Re: [Dovecot] Migration from UW-IMAP

2010-12-13 Thread Bradley Giesbrecht


On Dec 13, 2010, at 9:25 PM, Daniel Senie wrote:

I am attempting to test out dovecot on a server on a separate IP  
address from the live, functioning UW-IMAP. I am having mixed  
results with dovecot. An entirely new account that's never been used  
with UW-IMAP seems to work fine, but that's really not the point of  
the exercise.


If I try changing over an existing account to use dovecot, I get a  
variety of issues. Testing with Apple Mail.app, if I synchronize the  
account, the INBOX stops displaying. So off to plan B, and debug via  
command line commands.


I tried connecting to Dovecot. It was able to list the mailboxes for  
me. I asked for status on INBOX. Sometimes I get an error back in  
the IMAP stream, sometimes not. Either way, the log shows complaints  
about creating mail/.imap and below (we use mbox format, plus /var/ 
mail/%u for inbox).


I have active namespace compatibility recommended by the Wiki so  
that clients specifying mail/ and clients not specifying an imap  
path both work. With the test account, I proved this functionality  
is working.


At this point I clearly have some issues, and could use some help  
figuring out what to ask for help with, i.e. how to proceed to debug  
this without damaging the existing UW-IMAP setup in the process. The  
goal is to cut over to dovecot once I can be sure it really is  
working compatibly, but until then I have a large user base and  
can't blow everything up.


And yes, I really, truly have RTFM (i.e. read the Wiki, the  
troubleshooting pages, the migration pages).


Please supply output of:
dovecot -n


Regards,
Brad


Re: [Dovecot] Dovecot Linux 2 Dovecot OSX migration

2010-10-25 Thread Bradley Giesbrecht


On Oct 25, 2010, at 8:57 AM, Robert M. Münch wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA384

Hi, we are moving all our internal IT to an OSX server. Having used  
Dovecot on Linux for a couple of years now I want to transfer all  
IMAP folders so that users won't see a difference.


Are there are any tips  tricks how to migrate Dovecot to Dovecot? I  
hope this is a simple thing to do.


When I moved from EIMS to Dovecot I used imapsync. It worked well but  
might be an issue if your user base/data is very large.


I help maintain some of the mail related ports at MacPorts.
http://www.macports.org/

Are you going to be using the Dovecot pre-installed on OSX 1.6 and  
manage users with Apples server tools?


If not, consider using MacPorts to install the pieces. Even if you  
want to manually build look at our Portfiles for examples of how to  
get things patched and compiled on OSX.



Regards,

Bradley Giesbrecht

Re: [Dovecot] Dovecot Linux 2 Dovecot OSX migration

2010-10-25 Thread Bradley Giesbrecht


On Oct 25, 2010, at 10:33 AM, Robert M. Münch wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA384

Am 25.10.2010 um 18:14 schrieb Bradley Giesbrecht:

When I moved from EIMS to Dovecot I used imapsync. It worked well  
but might be an issue if your user base/data is very large.


Hi, this is not the case. Maybe around 4GB of data.


I help maintain some of the mail related ports at MacPorts.
http://www.macports.org/


Ah, cool. Yes, I just got my hands on macports. Very nice stuff!  
Open-source with a Apple-Like simple approach.


Are you going to be using the Dovecot pre-installed on OSX 1.6 and  
manage users with Apples server tools?


Yes, exactly. That's the plan. Or is it not wise to do? Any  
reasonable objections against this approach?


There are pros and cons. I have not used OSX Server since 10.4 so I'm  
not a good source on how well current Apple tools work. Generally the  
issue has been when wanting something the GUI tools do not provide  
when editing conf files manually you run the risk of Apple Software  
Updates wiping out the changes to the conf files or the GUI tools not  
parsing them correctly.



If not, consider using MacPorts to install the pieces.


I'm not sure if I can use the MacPorts stuff to update the default  
installed versions of if this would mess up the system completely.  
Overall, I want to keep it as simple as possible.


You can not. MacPorts installs software to a prefix, default /opt/local.

We have a nice email list that would be a better place to talk about  
MacPorts.


http://www.macports.org/contact.php#Lists

I suggest the Users list. This will be a good resource even if you  
decide to do things on a Mac without MacPorts.


I feel I'm straying from Dovecot as a subject so email me directly  
with Mac or MacPorts questions and I will try to get you hooked up  
with the common resources we use.



Bradley Giesbrecht

Re: [Dovecot] dovecot-antispam-plugin problem

2010-10-23 Thread Bradley Giesbrecht

On Oct 23, 2010, at 12:03 PM, Lars Stavholm wrote:


Hi All,

anyone been able to use the dovecot-antispam-plugin from http://hg.dovecot.org 
 with dovecot-2.0.x?


Any input appreciated

R
/Lars Stavholm



+1

Sorry that I have no input other then to add to the interest.

Brad


Re: [Dovecot] sieve rule help

2010-08-21 Thread Bradley Giesbrecht


On Aug 21, 2010, at 10:01 AM, Piyush Joshi wrote:


Dear All,
  I am using dovecot-2.0.0 version and all my sieve
filters are working perfectly except the following one.

I am trying to flag message coming from jagd...@example.net mail id.

require  
[fileinto 
,envelope 
,reject,vacation,imap4flags,relational,comparator-i;ascii- 
numeric,regex,body,date];


if address :contains From jagd...@example.net
{
keep :flags [Flagged]  ;
}

Is it possible to make it work without using addflag to add a flag ?


From a recent thread (pigeonhole sieve imapflags bug):

if allof (header :contains Subject Account Past Due Notice)
{
   fileinto Billing;
   setflag \\Seen;
   stop;
}



Reading http://www.faqs.org/rfcs/rfc5232.html maybe:

if address :contains From jagd...@example.net
{
keep :flags \\Flagged  ;
}

// Brad


Re: [Dovecot] DSYNC needs a lot more documentation

2010-08-21 Thread Bradley Giesbrecht


On Aug 21, 2010, at 11:42 AM, Brandon Lamb wrote:


On Sat, Aug 21, 2010 at 11:00 AM, Charles Marcus
cmar...@media-brokers.com wrote:

On 2010-08-21 12:51 PM, Marc Perkel m...@perkel.com wrote:

When you write software you never have to learn it so you don't have
the perspective of someone who never heard of it before and  
wondering

what is this?


Mark, is this another case of your absolute failure to even *try* to
google the answer for yourself? You do know that man pages are not  
the

only place (and quite often definitely not the best place) to find
documentation for any given software?

http://www.lmgtfy.com/?q=dsync+dovecot+wiki

--

Best regards,

Charles


Haha! That is an awesome link thanks!


Indeed!


Re: [Dovecot] v2.0.0 released

2010-08-17 Thread Bradley Giesbrecht


On Aug 16, 2010, at 7:49 AM, Timo Sirainen wrote:


http://dovecot.org/releases/2.0/dovecot-2.0.0.tar.gz
http://dovecot.org/releases/2.0/dovecot-2.0.0.tar.gz.sig


A new dovecot2 port Mac and/or MacPorts users here.

http://trac.macports.org/ticket/26111


Regards,
Bradley Giesbrecht



Re: [Dovecot] Upgrade to 2.0 - Not so smooth

2010-08-16 Thread Bradley Giesbrecht


On Aug 15, 2010, at 9:04 PM, Jim wrote:


On Aug 15, 2010, at 4:01 PM, Marc Perkel wrote:

Seems to me that it wouldn't take a lot of code to at lease find if  
they have adduser or useradd.


Or in the case of OS X, dscl...

Documenting this is good, but perhaps the configure script could  
check if the user exists, and instruct the user to create this  
manually before going any further?


And some may be building binaries packages for distribution so forcing  
user creation on a build server would be extra unhelpful work.


On thing I was considering was if patching to allow configure to set -- 
default_login_user=_dovenull and --default_internal_user=_dovecot. I  
don't think this is a big deal but it would allow package builders to  
build packages with default names that match their distributions.


BTW, things are fine the way they are. The fewer options that meet the  
needs the better.



Regards,
Bradley Giesbrecht


Re: [Dovecot] Master User Features I'd like to see

2010-08-15 Thread Bradley Giesbrecht


On Aug 15, 2010, at 4:56 PM, Marc Perkel wrote:




On 8/15/2010 3:06 PM, Timo Sirainen wrote:

On 15.8.2010, at 22.46, Marc Perkel wrote:


passdb {
 driver = sql
 args = /etc/dovecot/dovecot-sql-master.conf.ext
 master = yes
 pass = yes
}

..
I'm assuming that the masteruser and masterpass is passed to the  
master passdb and when doing so the variable %u is the master  
user.  I assume that %n and %d also represent the name and domain  
part of the master user.

Yes.

What I need is to also be able to have variables for the loginuser  
passed to the master user query. Something like %lu, %ln, and %ld  
perhaps. That way with MySQL tricks I might be able to see if the  
master user is master for that particular login user. That way I  
can give domain owners or owners of multiple domains the ability  
to manage the email accounts within their scope of permission.


These are available in v2.0:

%{login_user}
%{login_username}
%{login_domain}

I guess they should be added to wiki..


Further testing shows  %{login_domain} returns an empty string.


What was your test? Mysql query log?

Did you add them as '%{login_user}' or '%login_user'?

ChangeLog has:

* src/auth/auth-request.c:
auth: Added %{login_user}, %{login_username} and %{login_domain}
variables that are set for master logins.
[5ae4a5c14f5b]

// Brad

Re: [Dovecot] dovecot 2.0.beta5 convert with doveconf -n -c [Resolved]

2010-08-12 Thread Bradley Giesbrecht


On Aug 11, 2010, at 9:09 AM, Bradley Giesbrecht wrote:



On Aug 10, 2010, at 1:00 PM, Timo Sirainen wrote:


On 10.8.2010, at 18.12, Bradley Giesbrecht wrote:


doveconf: Error: protocols: Unknown protocol: sieve
doveconf: Fatal: Error in configuration file dovecot/dovecot.conf:  
protocols: Unknown protocol: sieve


This looks as if you haven't installed Pigeonhole.. Have you?


Ah, no I don't. I have not advanced that far with dovecot 2.0.beta  
testing.


Thank you for explaining. I'll now move on to dovecot2/Pigeonhole  
implementation.


doveconf -n -c seems to have worked well with Pigeonhole in place.

FYI, I have MacPorts Portfiles for dovecot 2.0.beta5 and Pigeonhole  
Mercurial building on OSX.


Regards,
Bradley Giesbrecht


Re: [Dovecot] dovecot 2.0.beta5 convert with doveconf -n -c [Resolved]

2010-08-12 Thread Bradley Giesbrecht


On Aug 10, 2010, at 1:00 PM, Timo Sirainen wrote:


On 10.8.2010, at 18.12, Bradley Giesbrecht wrote:


doveconf: Error: protocols: Unknown protocol: sieve
doveconf: Fatal: Error in configuration file dovecot/dovecot.conf:  
protocols: Unknown protocol: sieve


This looks as if you haven't installed Pigeonhole.. Have you?


doveconf -n -c seems to have worked well with Pigeonhole in place.

FYI, I have MacPorts Portfiles for dovecot 2.0.beta5 and Pigeonhole  
Mercurial building on OSX.


Regards,
Bradley Giesbrecht


Re: [Dovecot] dovecot 2.0.beta5 convert with doveconf -n -c

2010-08-11 Thread Bradley Giesbrecht


On Aug 10, 2010, at 1:00 PM, Timo Sirainen wrote:


On 10.8.2010, at 18.12, Bradley Giesbrecht wrote:


doveconf: Error: protocols: Unknown protocol: sieve
doveconf: Fatal: Error in configuration file dovecot/dovecot.conf:  
protocols: Unknown protocol: sieve


This looks as if you haven't installed Pigeonhole.. Have you?


Ah, no I don't. I have not advanced that far with dovecot 2.0.beta  
testing.


Thank you for explaining. I'll now move on to dovecot2/Pigeonhole  
implementation.


Regards,
Bradley Giesbrecht


[Dovecot] dovecot 2.0.beta5 convert with doveconf -n -c

2010-08-10 Thread Bradley Giesbrecht
Sorry if I missed the dovecot 2.0.betax managesieve sieve discussions.  
I have been looking in my  list archive and haven't found a reference  
to this yet.


I am trying to convert my dovecot.conf and am getting the following  
Fatal error:

/**
doveconf -n -c dovecot/dovecot.conf  dovecot.converted/dovecot.conf
doveconf: Warning: Obsolete setting in dovecot/dovecot.conf:10:  
protocols=managesieve has been renamed to protocols=sieve
doveconf: Warning: Obsolete setting in dovecot/dovecot.conf:10:  
protocols=imaps is no longer necessary, remove it
doveconf: Warning: Obsolete setting in dovecot/dovecot.conf:10:  
protocols=pop3s is no longer necessary, remove it
doveconf: Warning: Obsolete setting in dovecot/dovecot.conf:14:  
ssl_cert_file has been replaced by ssl_cert = file
doveconf: Warning: Obsolete setting in dovecot/dovecot.conf:15:  
ssl_key_file has been replaced by ssl_key = file
doveconf: Warning: Obsolete setting in dovecot/dovecot.conf:19:  
mail_executable has been replaced by service { executable }
doveconf: Warning: Obsolete setting in dovecot/dovecot.conf:23:  
mail_executable has been replaced by service { executable }
doveconf: Warning: Obsolete setting in dovecot/dovecot.conf:33:  
protocol managesieve {} has been replaced by protocol sieve { }
doveconf: Warning: Obsolete setting in dovecot/dovecot.conf:35:  
listen=..:port has been replaced by service { inet_listener { port } }
doveconf: Warning: Obsolete setting in dovecot/dovecot.conf:35:  
protocol { listen } has been replaced by service { inet_listener  
{ address } }
doveconf: Warning: Obsolete setting in dovecot/dovecot.conf:36:  
login_executable has been replaced by service { executable }
doveconf: Warning: Obsolete setting in dovecot/dovecot.conf:37:  
mail_executable has been replaced by service { executable }
doveconf: Warning: Obsolete setting in dovecot/dovecot.conf:39: add  
auth_ prefix to all settings inside auth {} and remove the auth {}  
section completely
doveconf: Warning: Obsolete setting in dovecot/dovecot.conf:41: passdb  
sql {} has been replaced by passdb { driver=sql }
doveconf: Warning: Obsolete setting in dovecot/dovecot.conf:44: userdb  
prefetch {} has been replaced by userdb { driver=prefetch }
doveconf: Warning: Obsolete setting in dovecot/dovecot.conf:46: userdb  
sql {} has been replaced by userdb { driver=sql }

doveconf: Error: protocols: Unknown protocol: sieve
doveconf: Fatal: Error in configuration file dovecot/dovecot.conf:  
protocols: Unknown protocol: sieve

/**


My current dovecot.conf has these sieve related directives:
/**
protocols = imap imaps pop3 pop3s managesieve
protocol lda {
postmaster_address = postmas...@pixilla.com
hostname = ix.databoost.com
sendmail_path = /opt/local/sbin/sendmail
auth_socket_path = /opt/local/var/run/dovecot/auth-master
log_path = /opt/local/var/serveza/log/mail/dovecot-deliver.log
mail_plugins = sieve
}
protocol managesieve {
disable_plaintext_auth = no
listen = *:2000
login_executable = /opt/local/libexec/dovecot/managesieve-login
mail_executable = /opt/local/libexec/dovecot/managesieve
}
plugin {
sieve_before = /opt/local/var/serveza/mail/filter/sieve/global/ 
before/

sieve = /opt/local/var/serveza/mail/filter/sieve/%d/%n/active.sieve
sieve_global_path = /opt/local/var/serveza/mail/filter/sieve/ 
global/default.sieve

sieve_dir = /opt/local/var/serveza/mail/filter/sieve/%d/%n/sieve
sieve_global_dir = /opt/local/var/serveza/mail/sieve/global/ 
include/
sieve_after = /opt/local/var/serveza/mail/filter/sieve/global/ 
after/


}
**/

I list subject addressing this would help if it's already been worked  
out.



Regards,
Bradley Giesbrecht


[Dovecot] dovecot v2 rc build and run dependencies

2010-08-08 Thread Bradley Giesbrecht

I'm building a dovecot v2 Portfile for MacPorts.

Where can I read up on dovecot v2 build and run dependencies?

Are they the same as dovecot v1?


Regards,
Bradley Giesbrecht


Re: [Dovecot] v2.0.rc4 released

2010-08-05 Thread Bradley Giesbrecht


On Aug 5, 2010, at 7:33 AM, Timo Sirainen wrote:


On Wed, 2010-08-04 at 21:56 -0700, Bradley Giesbrecht wrote:

The configure script allows for user override with MYSQL_CONFIG but
does not use the value in two places.

-MYSQL_INCLUDE=`mysql_config --include`
-MYSQL_LIBS=`mysql_config --libs`
+MYSQL_INCLUDE=`$MYSQL_CONFIG --include`
+MYSQL_LIBS=`$MYSQL_CONFIG --libs`


Uh. This looked good and I even commited it, until I realized that it
doesn't work. $MYSQL_CONFIG value is YES or NO, not the path. Maybe
there's some other way to make this work.


MYSQL_CONFIG looked like it could be yes, no or path.

  if test -n $MYSQL_CONFIG; then
  ac_cv_prog_MYSQL_CONFIG=$MYSQL_CONFIG # Let the user override the  
test.



I add the following to env and configure worked for me.

MYSQL_CONFIG=/opt/local/bin/mysql_config5


Regards,
Bradley Giesbrecht

Re: [Dovecot] v2.0.rc4 released

2010-08-05 Thread Bradley Giesbrecht


On Aug 5, 2010, at 7:33 AM, Timo Sirainen wrote:


On Wed, 2010-08-04 at 21:56 -0700, Bradley Giesbrecht wrote:

The configure script allows for user override with MYSQL_CONFIG but
does not use the value in two places.

-MYSQL_INCLUDE=`mysql_config --include`
-MYSQL_LIBS=`mysql_config --libs`
+MYSQL_INCLUDE=`$MYSQL_CONFIG --include`
+MYSQL_LIBS=`$MYSQL_CONFIG --libs`


Uh. This looked good and I even commited it, until I realized that it
doesn't work. $MYSQL_CONFIG value is YES or NO, not the path. Maybe
there's some other way to make this work.


You could have --with-mysql except a install prefix or path to  
mysql_config, a lot of other configure scripts do this. Makes for a  
simpler build.


--with-mysql=/opt/local/** add this to the beginning of the dirs  
you search for mysql stuff like /usr/local */

or
--with-mysql=/opt/local/bin/mysql_config5


Regards,
Bradley Giesbrecht


Re: [Dovecot] v2.0.rc4 released

2010-08-05 Thread Bradley Giesbrecht


On Aug 5, 2010, at 9:33 AM, Timo Sirainen wrote:


On Thu, 2010-08-05 at 08:38 -0700, Bradley Giesbrecht wrote:

I add the following to env and configure worked for me.

MYSQL_CONFIG=/opt/local/bin/mysql_config5


Here: http://hg.dovecot.org/dovecot-2.0/rev/ebb4362b6d0d


Ok, good, so you fixed postgres too. Done with this one I suppose.


Regards,
Bradley Giesbrecht


Re: [Dovecot] v2.0.rc4 released

2010-08-05 Thread Bradley Giesbrecht


On Aug 5, 2010, at 9:27 AM, Timo Sirainen wrote:


On Thu, 2010-08-05 at 09:15 -0700, Bradley Giesbrecht wrote:

You could have --with-mysql except a install prefix or path to
mysql_config, a lot of other configure scripts do this.


That's exactly why I don't like them. It's a path to somewhere. I
never know what path it wants. And different software might want
different paths. Annoying.


I hear you and agree.

To me it does seem to be a popular trend to have --with-mysql=/path/to/ 
mysql_config.



Regards,
Bradley Giesbrecht



Re: [Dovecot] v2.0.rc4 released

2010-08-04 Thread Bradley Giesbrecht

On Aug 4, 2010, at 12:35 PM, Timo Sirainen wrote:


http://dovecot.org/releases/2.0/rc/dovecot-2.0.rc4.tar.gz
http://dovecot.org/releases/2.0/rc/dovecot-2.0.rc4.tar.gz.sig


The configure script allows for user override with MYSQL_CONFIG but  
does not use the value in two places.


-MYSQL_INCLUDE=`mysql_config --include`
-MYSQL_LIBS=`mysql_config --libs`
+MYSQL_INCLUDE=`$MYSQL_CONFIG --include`
+MYSQL_LIBS=`$MYSQL_CONFIG --libs`


Regards,
Bradley Giesbrecht



patch-configure.diff
Description: Binary data





[Dovecot] antispam plugin troubleshooting

2010-07-25 Thread Bradley Giesbrecht
I built the dovecot antispam plugin and renamed it so I could have  
multiple backends installed at the same time.

http://johannes.sipsolutions.net/Projects/dovecot-antispam

I tried recompiling antispam without renaming the .so and I get the  
same result indicated below.


All other plugins and the system as a whole has been functioning  
normally. Only when I add antispam plugin does dovecot not start and  
perform as expected.


What can I do to find the reason dovecot is not loading  
lib90_antispam_mailtrain_plugin.so successfully?


Below is some info I could think to supply for help.

Regards,
Bradley Giesbrecht

Mac OS X 10.5.8

dovecot antispam plugin 1.3

bash-3.2# tail -f /var/log/system.log | grep dovecot
Jul 25 13:51:07 trex org.macports.dovecot[10354]: ^AILoading modules  
from directory: /opt/local/lib/dovecot/imap
Jul 25 13:51:07 trex org.macports.dovecot[10354]: ^AIModule loaded: / 
opt/local/lib/dovecot/imap/lib20_autocreate_plugin.so
Jul 25 13:51:08 trex org.macports.dovecot[10354]: Error: imap dump- 
capability process killed with signal 11
Jul 25 13:51:08 trex org.macports.dovecot[10354]: Fatal: Invalid  
configuration in /opt/local/etc/dovecot/dovecot.conf


bash-3.2# file /opt/local/lib/dovecot/imap/ 
lib90_antispam_mailtrain_plugin.so
/opt/local/lib/dovecot/imap/lib90_antispam_mailtrain_plugin.so: Mach-O  
executable ppc


bash-3.2# dovecot --version
1.2.11

bash-3.2# dovecot -n
# 1.2.11: /opt/local/etc/dovecot/dovecot.conf
# OS: Darwin 9.8.0 Power Macintosh  hfs
log_path: /opt/local/var/serveza/log/mail/dovecot.log
protocols: imap imaps pop3 pop3s managesieve
listen(default): *
listen(imap): *
listen(pop3): *
listen(managesieve): *:2000
disable_plaintext_auth: no
login_dir: /opt/local/var/run/dovecot/login
login_executable(default): /opt/local/libexec/dovecot/imap-login
login_executable(imap): /opt/local/libexec/dovecot/imap-login
login_executable(pop3): /opt/local/libexec/dovecot/pop3-login
login_executable(managesieve): /opt/local/libexec/dovecot/managesieve- 
login

mail_max_userip_connections: 30
mail_location: dbox:/opt/local/var/serveza/mail/%d/%n/dbox
mail_debug: yes
mail_executable(default): /opt/local/etc/dovecot/bin/log_imap_login.sh
mail_executable(imap): /opt/local/etc/dovecot/bin/log_imap_login.sh
mail_executable(pop3): /opt/local/etc/dovecot/bin/log_pop3_login.sh
mail_executable(managesieve): /opt/local/libexec/dovecot/managesieve
mail_plugins(default): autocreate antispam_mailtrain
mail_plugins(imap): autocreate antispam_mailtrain
mail_plugins(pop3):
mail_plugins(managesieve):
mail_plugin_dir(default): /opt/local/lib/dovecot/imap
mail_plugin_dir(imap): /opt/local/lib/dovecot/imap
mail_plugin_dir(pop3): /opt/local/lib/dovecot/pop3
mail_plugin_dir(managesieve): /opt/local/lib/dovecot/managesieve
lda:
  postmaster_address: postmas...@pixilla.com
  hostname: ix.databoost.com
  sendmail_path: /opt/local/sbin/sendmail
  auth_socket_path: /opt/local/var/run/dovecot/auth-master
  log_path: /opt/local/var/serveza/log/mail/dovecot-deliver.log
  mail_plugins: sieve
auth default:
  mechanisms: plain login cram-md5 ntlm apop
  debug: yes
  passdb:
driver: sql
args: /opt/local/etc/dovecot/dovecot_mysql.conf
  userdb:
driver: prefetch
  userdb:
driver: sql
args: /opt/local/etc/dovecot/dovecot_mysql.conf
  socket:
type: listen
client:
  path: /opt/local/var/spool/postfix/private/auth
  mode: 432
  user: _postfix
  group: _postfix
master:
  path: /opt/local/var/run/dovecot/auth-master
  mode: 384
  user: _vmail
plugin:
  sieve_before: /opt/local/var/serveza/mail/filter/sieve/global/before/
  sieve: /opt/local/var/serveza/mail/filter/sieve/%d/%n/active.sieve
  sieve_global_path: /opt/local/var/serveza/mail/filter/sieve/global/ 
default.sieve

  sieve_dir: /opt/local/var/serveza/mail/filter/sieve/%d/%n/sieve
  sieve_global_dir: /opt/local/var/serveza/mail/sieve/global/include/
  sieve_after: /opt/local/var/serveza/mail/filter/sieve/global/after/
  autocreate: Trash
  autocreate2: Spam
  autosubscribe: Trash
  autosubscribe2: Spam
  antispam_mailtrain_signature: X-DSPAM-Signature
  antispam_mailtrain_signature_missing: error
  antispam_mailtrain_trash_pattern_ignorecase: trash;Deleted *
  antispam_mailtrain_spam_pattern_ignorecase: SPAM*;Junk*
  antispam_mailtrain_dspam_binary: /opt/local/bin/dspam
  antispam_mailtrain_mail_tmpdir: /tmp
  antispam_mailtrain_mail_sendmail: /opt/local/sbin/sendmail
  antispam_mailtrain_crm_binary: /bin/false



Re: [Dovecot] Dovecot sieve support

2010-07-16 Thread Bradley Giesbrecht


On Jul 16, 2010, at 4:37 PM, Timo Sirainen wrote:


On 17.7.2010, at 0.31, Daniel L. Miller wrote:


or at this time is it going to remain an external patch?


No. It no longer requires patching.


I think I asked the wrong question.  Make that, Is Managesieve  
going to be merged in to the main server source


No.


(at least the support for it),


Well .. Isn't the support good enough already?


or at this time is it going to remain an external patch?


Patch is a wrong word. It's not a patch. But it's an external  
plugin, and it's going to stay that way. Dovecot's and Pigeonhole's  
developers are different and they have completely different release  
schedules. I don't think it would even be a good idea to merge them  
into same releases. Nowadays with v2.0 it's easy to compile  
Pigeonhole after installing Dovecot, so I don't even see it as a  
problem.


Daniel may be wanting to know if Dovecot v2 sources have to be patched  
to use managesieve as v1 sources do.


I believe I read that Dovecot v2 will not need to be patched to use  
Pigeonhole Managesieve.


Does Dovecot v2 need to be patched to use either of the Pigeonhole  
sieve or managesieve?



Thanks,
Bradley Giesbrecht


Re: [Dovecot] Help with a generated sieve rule

2010-06-18 Thread Bradley Giesbrecht


On Jun 18, 2010, at 7:57 AM, Marcio Merlone wrote:


Em 18-06-2010 10:23, Marcio Merlone escreveu:
Can some kind soul please help me find why this rule did not work,  
what's wrong? I am using dovecot 1:1.2.10-0xk1.


## Generated by RoundCube Webmail SieveRules Plugin ##
require [vacation,variables];

set subject ;
if header :matches subject * {
   set subject ${1};
}

# rule:[Treinamento]
if anyof (true)
{
   vacation
   :days 1
   :subject Ausência: ${subject}
   text:
Olá!
Estou em treinamento externo durante o período de 21 a 25 de junho.
Att,
.
;
}


Bizarre. Just changed :days 1 to :days 0 and it now worked. That  
was my first message to her and failed. Odd.


I understand that the vacation :days is kept by writing to a file.  
Maybe you were unable to write to this file which killed delivery.  
Changing to 0 ignored the file.


// Brad

Re: [Dovecot] Help with a generated sieve rule

2010-06-18 Thread Bradley Giesbrecht


On Jun 18, 2010, at 9:15 AM, Marcio Merlone wrote:


Em 18-06-2010 12:24, Bradley Giesbrecht escreveu:

On Jun 18, 2010, at 7:57 AM, Marcio Merlone wrote:

Em 18-06-2010 10:23, Marcio Merlone escreveu:
Can some kind soul please help me find why this rule did not  
work, what's wrong? I am using dovecot 1:1.2.10-0xk1.

(...)
Bizarre. Just changed :days 1 to :days 0 and it now worked.  
That was my first message to her and failed. Odd.
I understand that the vacation :days is kept by writing to a file.  
Maybe you were unable to write to this file which killed delivery.  
Changing to 0 ignored the file.


Which file is that?


I'm working through this error in dovecot-deliver.log:

Error: file_dotlock_create(~/.dovecot.lda-dupes) failed: No such file  
or directory



I have virtual users and need to changed this path. My vacation are  
still sent so this may have nothing to do with your problem.


// Brad


Re: [Dovecot] Sieve GUI

2010-06-03 Thread Bradley Giesbrecht


On Jun 2, 2010, at 4:42 AM, Anton Dollmaier wrote:


Hi,


has someone tried this or knows something similar ?


RoundCube in version 0.3 and later supports a plugin system and  
provides actually two different Sieve-plugins, one out of the box,  
the other one is available here:



http://www.tehinterweb.co.uk/roundcube/#pisieverules


This one (sieverules) is based off the out of the box (managesieve)  
plugin and it is the one I chose for the added rules it can produce.


both work and provide a decent GUI with no need to write the sieve- 
syntax directly like the thunderbird-extension.


An example sieve script created by the sieverules plugin shows it  
can't be that bad writing one by hand.


## Generated by RoundCube Webmail SieveRules Plugin ##
require [fileinto];

# rule:[DSPAM]
if anyof (header :contains X-Dspam-Result Spam)
{
fileinto Spam;
stop;
}

// Brad

Re: [Dovecot] dovecot/deliver ... Can't open log file /var/log/dovecot/error.log: Permission denied

2010-05-11 Thread Bradley Giesbrecht


On May 11, 2010, at 11:26 AM, Phil Howard wrote:

On Tue, May 11, 2010 at 12:59, Gerard Seibert dovecot.u...@seibercom.net 
wrote:



Virtual documentaion: http://www.postfix.org/virtual.8.html



This seems to be a delivery agent of its own.  I don't want Postfix  
to do

the delivery.  I want Dovecot to do the delivery so it can create the
additional cache/index files (whatever they were ... Dovecot  
documentation

encourages this).  So that means handing it off to the
/usr/lib/dovecot/deliver program.


Basically postfix just needs to know that a username/email address is  
local and how to deliver.


If you are using virtual users in main.cf this works for me.
virtual_transport= dovecot

In master.cf this works for me.
dovecot  unix-nn--pipe
flags=DRhu user=_vmail:_vmail argv=/opt/local/libexec/dovecot/ 
deliver -d ${recipient}


Now dovecot needs to know where to deliver to. I use a database  
backend so postfix and dovecot can look the information up in the same  
place. They just need queries to return the values they require. In  
dovecot docs look for userdb and passworddb.


777 you log file till you figure out which users need to write to it.  
I have _vmail as my user and group name and my dovecot-deliver.log has  
_vmail:_vmail for owner and group and dovecot.log has root:_vmail for  
owner and group.


// Brad


Re: [Dovecot] Antispam plugin, compile under osx

2010-04-13 Thread Bradley Giesbrecht


On Apr 11, 2010, at 11:53 PM, Johannes Berg wrote:



cc  -fPIC -shared -Wall -Wextra -DPLUGINNAME=antispam - 
DHAVE_CONFIG_H -
I/opt/local/include/dovecot/ -I/opt/local/include/dovecot/src/ -I/ 
opt/

local/include/dovecot/src/lib/ -I/opt/local/include/dovecot/src/lib-
storage/ -I/opt/local/include/dovecot/src/lib-mail/ -I/opt/local/
include/dovecot/src/lib-imap/ -I/opt/local/include/dovecot/src/lib-
dict/ -I/opt/local/include/dovecot/src/lib-index/ -I/opt/local/ 
include/

dovecot/src/imap/ signature.o antispam-plugin.o antispam-storage.o
dspam-exec.o -o lib90_antispam_plugin.so
Undefined symbols:
  _mailbox_get_name, referenced from:
  _mailbox_patternmatch in antispam-plugin.o
  _mailbox_is_spam in antispam-plugin.o
  _mailbox_is_trash in antispam-plugin.o
  _mailbox_is_unsure in antispam-plugin.o


Looks like your linker is prepending _ to each symbol, which probably
don't exist since dovecot itself exports w/o the underscore ... I have
no idea why it's doing that though.

johannes


If someone else stumbles upon this thread.

From unix-port...@lists.apple.com
The underscores are a red herring. If you use nm to look at the  
executables that export mailbox_get_name, for example libexec/ 
dovecot/imap, you see that the symbol is exported with the underscore.


You need to use the appropriate linker flags for your module, like - 
undefined dynamic_lookup. Look at how dovecot's own modules are  
linked when you build dovecot.


Adding 'CFLAGS += -undefined dynamic_lookup' to .config allows for  
make to complete without error.


I have not tested the .so plugin and if there are problems I will  
report it to this thread.



Thanks for the help,
Bradley Giesbrecht

Re: [Dovecot] Antispam plugin, compile under osx

2010-04-13 Thread Bradley Giesbrecht
For those who may be interested I have posted dovecot-antispam plugin  
ports to MacPorts.


http://trac.macports.org/ticket/24474

// Brad


[Dovecot] Antispam plugin, compile under osx

2010-04-11 Thread Bradley Giesbrecht
 in antispam-storage.o
  _antispam_mailbox_open in antispam-storage.o
  _antispam_mail_storage_created in antispam-storage.o
  _t_buffer_get, referenced from:
  _mailbox_patternmatch in antispam-plugin.o
  _t_pop, referenced from:
  _mailbox_patternmatch in antispam-plugin.o
  _get_setting in antispam-plugin.o
  _parse_folder_setting in antispam-plugin.o
  _array_idx_modifiable_i, referenced from:
  _antispam_copy in antispam-storage.o
  _antispam_copy in antispam-storage.o
  _antispam_save_begin in antispam-storage.o
  _antispam_save_begin in antispam-storage.o
  _antispam_save_finish in antispam-storage.o
  _antispam_save_finish in antispam-storage.o
  _antispam_mail_update_keywords in antispam-storage.o
  _antispam_mailbox_transaction_begin in antispam-storage.o
  _antispam_mailbox_transaction_commit in antispam-storage.o
  _antispam_mailbox_transaction_commit in antispam-storage.o
  _antispam_mailbox_transaction_rollback in antispam-storage.o
  _antispam_mailbox_transaction_rollback in antispam-storage.o
  _antispam_mailbox_mail_alloc in antispam-storage.o
  _antispam_mailbox_open in antispam-storage.o
  _pool_alloconly_create, referenced from:
  _antispam_plugin_init in antispam-plugin.o
  _p_strsplit, referenced from:
  _parse_folder_setting in antispam-plugin.o
  _antispam_plugin_init in antispam-plugin.o
  _backend_init in dspam-exec.o
  _backend_init in dspam-exec.o
  _mailbox_equals, referenced from:
  _match_info in antispam-plugin.o
  _mail_free, referenced from:
  _antispam_mailbox_transaction_commit in antispam-storage.o
  _antispam_mailbox_transaction_commit in antispam-storage.o
  _antispam_mailbox_transaction_rollback in antispam-storage.o
  _t_str_ucase, referenced from:
  _get_setting in antispam-plugin.o
  _default_pool, referenced from:
  _default_pool$non_lazy_ptr in signature.o
  _default_pool$non_lazy_ptr in antispam-storage.o
  _default_pool$non_lazy_ptr in dspam-exec.o
  _mail_module_register, referenced from:
  _antispam_mail_module in antispam-storage.o
  _mail_storage_set_error, referenced from:
  _signature_extract_to_list in signature.o
  _signature_extract in signature.o
  _antispam_copy in antispam-storage.o
  _antispam_save_finish in antispam-storage.o
  _antispam_save_finish in antispam-storage.o
  _backend_commit in dspam-exec.o
  _str_array_length, referenced from:
  _backend_init in dspam-exec.o
  _backend_init in dspam-exec.o
  _mail_index_get_keywords, referenced from:
  _antispam_mail_update_keywords in antispam-storage.o
  _mail_storage_module_register, referenced from:
  _antispam_storage_module in antispam-storage.o
  _mail_get_headers, referenced from:
  _get_mail_headers in signature.o
  _get_mail_headers in dspam-exec.o
  _hook_mail_storage_created, referenced from:
  _hook_mail_storage_created$non_lazy_ptr in antispam-plugin.o
  _i_strdup, referenced from:
  _signature_extract_to_list in signature.o
  _mail_alloc, referenced from:
  _antispam_copy in antispam-storage.o
  _antispam_save_begin in antispam-storage.o
ld: symbol(s) not found


Thank you for your consideration,
Bradley Giesbrecht


Re: [Dovecot] New install authentication probs

2010-03-31 Thread Bradley Giesbrecht


On Mar 31, 2010, at 11:18 AM, Andy Smith wrote:


Hi,

 Im attempting to configure dovecot for the first time, Im trying to  
use a MySQL DB that is currently used by tpop3d as Ive read they  
support the same password format.
My main prob currently, apart from that it doesnt work lol, is that  
Ive enabled the following debugging in dovecot.conf


auth_debug = yes
auth_debug_passwords = yes
auth_verbose = yes

But Im getting basically zero info on why my authentication is  
failing. In my log (which for testing Ive defined as a file in /tmp  
to make sure Im getting all the info logged to one place) I see just:


Mar 31 19:00:17 dovecot: Info: Dovecot v1.2.10 starting up
Mar 31 19:00:17 auth-worker(default): Info: mysql: Connected to  
localhost (ukgri  d_vmail)

Mar 31 19:00:18 auth(default): Info: new auth connection: pid=64188
Mar 31 19:00:18 auth(default): Info: new auth connection: pid=64186
Mar 31 19:00:18 auth(default): Info: new auth connection: pid=64187

each time I attempt to connect via IMAP it adds another new auth  
connection line to the log but doesnt tell me anything else :(. So  
Im stuck debugging my authentication due to lack of info. BTW Im  
testing IMAP via telnet, telnet to IMAP port and attempt LOGIN (I  
have this working to a courier IMAP installation). Have I done  
something wrong? Any help appreciated!


thanks Andy.


Pleas post the result of:

# dovecot -n


// Brad


Re: [Dovecot] dovecot user

2010-03-27 Thread Bradley Giesbrecht


On Mar 27, 2010, at 3:59 AM, Timo Sirainen wrote:


On 27.3.2010, at 12.32, Patrick Wallura wrote:


What about dovedevil and doveangel. Sorry just kidding


Even if not, the problem with those is that the name is longer than  
8 characters, which makes them not show up in all ps outputs.


doveun or doveup

dovecot un-priviledged

// Brad

Re: [Dovecot] dovecot user

2010-03-25 Thread Bradley Giesbrecht


On Mar 25, 2010, at 9:48 PM, Stan Hoeppner wrote:


Timo Sirainen put forth on 3/25/2010 1:30 PM:

I think the next v2.0 release (rc1?) will include the new changed
default_login_user. I'm still not completely sure what it is  
though. Two

more ideas:

dovenest (by Pascal Volk) - although reminds me a bit too much of
lovenest :)

dovehole - you go inside dovecot via a hole, right?


That is downright pornographic.  dovehole - lovehole?

dovenest isn't totally horrible (close), but dovehole is ...  
just not

right at all.


dovetail


Re: [Dovecot] Using MySQL For Mailboxes?

2010-03-08 Thread Bradley Giesbrecht


On Mar 8, 2010, at 8:00 AM, Carlos Mennens wrote:


On Mon, Mar 8, 2010 at 10:55 AM, Timo Sirainen t...@iki.fi wrote:

Dovecot supports looking up user information from MySQL, but not
actually storing mails there. If you really wanted to store mails on
MySQL, you'd have to use dbmail instead of Dovecot.


Is it even worth it with less than 500 users? I mean I don't have any
problems right now creating individual users and their home
directories in Linux but I have never used MySQL for mail so can't
differentiate the two. I guess I don't even know if this worth the
effort to change my configuration especially if it involves changing
out my IMAP server for 'dbmail' which I know nothing about until you
mentioned it.



No one will be able to answer what something is worth to you.

If your 500 users are mostly email only then you will probably enjoy  
storing email addresses, passwords, paths to mailboxes, quotes etc...  
in mysql.


This is how you can use mysql with dovecot. The emails will still be  
stored on a file system in one of the popular mailbox formats like  
mbox, maildir, etc


// Brad


Re: [Dovecot] Could use some help setting Dovecot up for the first time

2010-03-07 Thread Bradley Giesbrecht


On Mar 7, 2010, at 11:18 AM, joe wrote:


Hi Everyone,

I've managed to get most of postfix and dovecot running using the  
howto located on dovecot.org.


So, I went to go test sending a email locally and i am getting this  
error which i cannot seem to resolve. Any help would be welcomed.



Mar 07 19:14:55 deliver(t...@fasti.net): Info: auth input: home=/var/vmail/t...@fasti.net 
/
Mar 07 19:14:55 deliver(t...@fasti.net): Info: auth input:  
mail=maildir:/var/vmail/t...@fasti.net/

Mar 07 19:14:55 deliver(t...@fasti.net): Info: auth input: uid=101
Mar 07 19:14:55 deliver(t...@fasti.net): Info: auth input: gid=12
Mar 07 19:14:55 deliver(t...@fasti.net): Info: auth input:  
quota=maildir:storage=0
Mar 07 19:14:55 deliver(t...@fasti.net): Fatal: setgid(12) failed  
with euid=101(vmail), gid=6(mail), egid=6(mail): Operation not  
permitted


I usually find this type of message Operation not permitted to be a  
permissions issue. Check that the user deliver running as has the  
needed permissions to work in your directories /var/vmail.


// Brad


Re: [Dovecot] Quota plugin and SQL

2010-03-06 Thread Bradley Giesbrecht


On Mar 6, 2010, at 2:12 PM, David wrote:

I have read through http://wiki.dovecot.org/Quota/Dict, which  
suggests a database schema for using quota.  For 1.2, this includes  
a username, bytes and messages.


Is there any way to modify the queries used to split out username  
into localpart and domain?  This would enable me to put the current  
quota information in my main mailbox table and display it to users  
in my admin interface.


Or possibly it should be in a separate table for a reason, and I  
should be look there for the values?


Know nothing about the quota plugin as I work in media and don't use  
quotes but why not just concat the localpart and domain into an  
additional column or query against a view?


// Brad


Re: [Dovecot] any limitations running on a Mac?

2010-02-25 Thread Bradley Giesbrecht


On Feb 25, 2010, at 9:42 PM, Timo Sirainen wrote:


On 26.2.2010, at 3.50, Terry Barnum wrote:

I looked at the wiki on dbox but shied away from it because the  
compatibility matrix said postfix didn't like it. Did I read that  
wrong?


You need to be delivering mails with Dovecot LDA when using dbox.  
And that might help improve performance even when you're using  
maildir.



Did you use macports to build dovecot?


Yes. 1.2.10.


You could try if maildir_very_dirty_syncs=yes helps.

With v2.0+ mdbox will probably work very nicely. dbox (with v1.x or  
v2.0) still uses one file/message and I guess if you had trouble  
with 5k+ messages in a mailbox with Maildir, you'll probably hit the  
same slowness with dbox.


Will there be a way to convert from dbox t mdbox in version v2.0+?

// Brad


[Dovecot] managesieve build error

2010-02-22 Thread Bradley Giesbrecht

Hello,


dovecot-1.2.10
dovecot-sieve-0.1.14
dovecot-managesieve-0.11.11

I believe I patched dovecot successfully and compiled the dovecot and  
dovecot-sieve source tress.


patching file README.managesieve
patching file dovecot-example.conf
patching file src/master/child-process.c
patching file src/master/child-process.h
patching file src/master/listener.c
patching file src/master/login-process.c
patching file src/master/mail-process.c
patching file src/master/main.c
patching file src/master/master-settings-defs.c
patching file src/master/master-settings.c
patching file src/master/master-settings.h


Then I configure dovecot-managesieve and this completes without error.

But when I make dovecot-managesieve I get this error:
#
Making all in managesieve

main.c:195: error: variable 'managesieve_sieve_env' has initializer  
but incomplete type

#


Where should I be looking for a solution?


Thank you,

Bradley Giesbrecht


Re: [Dovecot] Upgrade 1.0-1.2 dbox mysql

2009-12-18 Thread Bradley Giesbrecht


On Dec 18, 2009, at 7:26 AM, Benny Pedersen wrote:


On tor 17 dec 2009 21:30:37 CET, Bradley Giesbrecht wrote

Most everything seems to work but my webmail (roundcube) clients  
are not seeing their subscribed folders.


roundcube 0.3.1  settings  server settings  Use IMAP  
Subscriptions (togle)


Thank you.

The problem ended up being that since my upgrade from 1.1x to 1.2x  
yesterday the mail box locations have moved inside a directory named  
mailboxes. I don't have the word mailboxes in any configuration I  
set so dovecot 1.2 must have added this. This was not the case with my  
dovecot 1.1 before the upgrade.


I had:

/opt/local/var/mail/domain/user/dbox/INBOX

now:

/opt/local/var/mail/domain/user/dbox/mailboxes/INBOX

Since I could not figure out how to stop this behavior I just went  
with it and moved everyones old mailboxes to the new location in the  
wee hours of this morning.
I renamed the mailboxes that were created yesterday before doing so.  
Thank goodness I have less then a hundred imap users.


I wish I understood dovecots directory vars better.

What is mail_location used for?

What is the userdb_home returned from my passdb and userdb used for?

Would userdb_home ever not start with the complete mail_location path?

Reading the docs leaves me puzzled and I end up just trying things  
till something works.


I'm updating the MacPorts dovecot port to 1.2 and I'd like to be able  
to explain to the MacPorts user base the changes to dovecot 1.1x  
configurations needed for a easy upgrade.



Regards,
Bradley Giesbrecht


[Dovecot] Upgrade 1.0-1.2 dbox mysql

2009-12-17 Thread Bradley Giesbrecht

Hi,


I just upgraded to from dovecot v1.1.15 to v1.2.9 so I can use dovecot- 
sieve.


Most everything seems to work but my webmail (roundcube) clients are  
not seeing their subscribed folders.


Reading over the upgrade docs at http://wiki.dovecot.org/Upgrading/1.2  
I'm wondering if I have the two settings below configured correctly.


dovecot.conf:
mail_location = dbox:/opt/local/var/mail/%d/%n/dbox

dovecot_mysql.conf user_query homedir result:
/opt/local/var/mail/example.com/foo



bash-3.2# dovecot -n
# 1.2.9: /opt/local/etc/dovecot/dovecot.conf
# OS: Darwin 9.8.0 Power Macintosh  hfs
log_path: /opt/local/var/serveza/log/mail/dovecot.log
protocols: imap imaps pop3 pop3s
disable_plaintext_auth: no
verbose_ssl: yes
login_dir: /opt/local/var/run/dovecot/login
login_executable(default): /opt/local/libexec/dovecot/imap-login
login_executable(imap): /opt/local/libexec/dovecot/imap-login
login_executable(pop3): /opt/local/libexec/dovecot/pop3-login
login_greeting: now what?
mail_location: dbox:/opt/local/var/serveza/mail/%d/%n/dbox
mail_debug: yes
mail_executable(default): /opt/local/etc/dovecot/bin/log_imap_login.sh
mail_executable(imap): /opt/local/etc/dovecot/bin/log_imap_login.sh
mail_executable(pop3): /opt/local/etc/dovecot/bin/log_pop3_login.sh
mail_plugin_dir(default): /opt/local/lib/dovecot/imap
mail_plugin_dir(imap): /opt/local/lib/dovecot/imap
mail_plugin_dir(pop3): /opt/local/lib/dovecot/pop3
lda:
  log_path: /opt/local/var/serveza/log/mail/dovecot-deliver.log
  auth_socket_path: /opt/local/var/run/dovecot/auth-master
  postmaster_address: postmas...@pixilla.com
auth default:
  mechanisms: plain login cram-md5 ntlm apop
  verbose: yes
  debug: yes
  debug_passwords: yes
  passdb:
driver: sql
args: /opt/local/etc/dovecot/dovecot_mysql.conf
  userdb:
driver: prefetch
  userdb:
driver: sql
args: /opt/local/etc/dovecot/dovecot_mysql.conf
  socket:
type: listen
client:
  path: /opt/local/var/spool/postfix/private/auth
  mode: 432
  user: _postfix
  group: _postfix
master:
  path: /opt/local/var/run/dovecot/auth-master
  mode: 384
  user: _vmail



Thanks for any clues,
Bradley Giesbrecht


[Dovecot] Upgrade 1.0-1.2 dbox mysql

2009-12-17 Thread Bradley Giesbrecht

Hi,


I just upgraded to from dovecot v1.1.15 to v1.2.9 so I can use dovecot- 
sieve.


Most everything seems to work but my webmail (roundcube) clients are  
not seeing their subscribed folders.


Reading over the upgrade docs at http://wiki.dovecot.org/Upgrading/1.2  
I'm wondering if I have the two settings below configured correctly.


dovecot.conf:
mail_location = dbox:/opt/local/var/mail/%d/%n/dbox

dovecot_mysql.conf user_query homedir result:
/opt/local/var/mail/example.com/foo



bash-3.2# dovecot -n
# 1.2.9: /opt/local/etc/dovecot/dovecot.conf
# OS: Darwin 9.8.0 Power Macintosh  hfs
log_path: /opt/local/var/serveza/log/mail/dovecot.log
protocols: imap imaps pop3 pop3s
disable_plaintext_auth: no
verbose_ssl: yes
login_dir: /opt/local/var/run/dovecot/login
login_executable(default): /opt/local/libexec/dovecot/imap-login
login_executable(imap): /opt/local/libexec/dovecot/imap-login
login_executable(pop3): /opt/local/libexec/dovecot/pop3-login
login_greeting: now what?
mail_location: dbox:/opt/local/var/serveza/mail/%d/%n/dbox
mail_debug: yes
mail_executable(default): /opt/local/etc/dovecot/bin/log_imap_login.sh
mail_executable(imap): /opt/local/etc/dovecot/bin/log_imap_login.sh
mail_executable(pop3): /opt/local/etc/dovecot/bin/log_pop3_login.sh
mail_plugin_dir(default): /opt/local/lib/dovecot/imap
mail_plugin_dir(imap): /opt/local/lib/dovecot/imap
mail_plugin_dir(pop3): /opt/local/lib/dovecot/pop3
lda:
 log_path: /opt/local/var/serveza/log/mail/dovecot-deliver.log
 auth_socket_path: /opt/local/var/run/dovecot/auth-master
 postmaster_address: postmas...@pixilla.com
auth default:
 mechanisms: plain login cram-md5 ntlm apop
 verbose: yes
 debug: yes
 debug_passwords: yes
 passdb:
   driver: sql
   args: /opt/local/etc/dovecot/dovecot_mysql.conf
 userdb:
   driver: prefetch
 userdb:
   driver: sql
   args: /opt/local/etc/dovecot/dovecot_mysql.conf
 socket:
   type: listen
   client:
 path: /opt/local/var/spool/postfix/private/auth
 mode: 432
 user: _postfix
 group: _postfix
   master:
 path: /opt/local/var/run/dovecot/auth-master
 mode: 384
 user: _vmail



Thanks for any clues,
Bradley Giesbrecht


[Dovecot] Upgrade 1.0-1.2 dbox mysql

2009-12-17 Thread Bradley Giesbrecht

Hi,


I just upgraded to from dovecot v1.1.15 to v1.2.9 so I can use dovecot- 
sieve.


Most everything seems to work but my webmail (roundcube) clients are  
not seeing their subscribed folders.


Reading over the upgrade docs at http://wiki.dovecot.org/Upgrading/1.2  
I'm wondering if I have the two settings below configured correctly.


dovecot.conf:
mail_location = dbox:/opt/local/var/mail/%d/%n/dbox

dovecot_mysql.conf user_query homedir result:
/opt/local/var/mail/example.com/foo



bash-3.2# dovecot -n
# 1.2.9: /opt/local/etc/dovecot/dovecot.conf
# OS: Darwin 9.8.0 Power Macintosh  hfs
log_path: /opt/local/var/serveza/log/mail/dovecot.log
protocols: imap imaps pop3 pop3s
disable_plaintext_auth: no
verbose_ssl: yes
login_dir: /opt/local/var/run/dovecot/login
login_executable(default): /opt/local/libexec/dovecot/imap-login
login_executable(imap): /opt/local/libexec/dovecot/imap-login
login_executable(pop3): /opt/local/libexec/dovecot/pop3-login
login_greeting: now what?
mail_location: dbox:/opt/local/var/serveza/mail/%d/%n/dbox
mail_debug: yes
mail_executable(default): /opt/local/etc/dovecot/bin/log_imap_login.sh
mail_executable(imap): /opt/local/etc/dovecot/bin/log_imap_login.sh
mail_executable(pop3): /opt/local/etc/dovecot/bin/log_pop3_login.sh
mail_plugin_dir(default): /opt/local/lib/dovecot/imap
mail_plugin_dir(imap): /opt/local/lib/dovecot/imap
mail_plugin_dir(pop3): /opt/local/lib/dovecot/pop3
lda:
log_path: /opt/local/var/serveza/log/mail/dovecot-deliver.log
auth_socket_path: /opt/local/var/run/dovecot/auth-master
postmaster_address: postmas...@pixilla.com
auth default:
mechanisms: plain login cram-md5 ntlm apop
verbose: yes
debug: yes
debug_passwords: yes
passdb:
  driver: sql
  args: /opt/local/etc/dovecot/dovecot_mysql.conf
userdb:
  driver: prefetch
userdb:
  driver: sql
  args: /opt/local/etc/dovecot/dovecot_mysql.conf
socket:
  type: listen
  client:
path: /opt/local/var/spool/postfix/private/auth
mode: 432
user: _postfix
group: _postfix
  master:
path: /opt/local/var/run/dovecot/auth-master
mode: 384
user: _vmail



Thanks for any clues,
Bradley Giesbrecht


[Dovecot] Upgrade 1.0-1.2 dbox mysql

2009-12-17 Thread Bradley Giesbrecht
Seems to work but it's weird that I lost my subscribed folders. Also  
the perl script imapsync is only seeing an inbox and no other folders.


I seem to be creating a lot of name mailboxes where my INBOX and other  
folders are located.


/opt/local/var/mail/domain.com/username/dbox/mailboxes
This dir is getting populated with new INBOX and default folders.


(domain.com and username are substitutes for the real users domain and  
username)


dovecot.log:

Dec 17 12:29:17 IMAP(usern...@domain.com): Info: Effective uid=5000,  
gid=5000, home=/opt/local/var/mail/domain.com/username
Dec 17 12:29:17 IMAP(usern...@domain.com): Info: dbox: data=/opt/local/ 
var/mail/domain.com/username/dbox
Dec 17 12:29:17 IMAP(usern...@domain.com): Info: fs: root=/opt/local/ 
var/mail/username.com/username/dbox, index=, control=, inbox=


dovecot-deliver.log:
Dec 17 12:35:08 deliver(usern...@domain.com): Info: auth input: home=/ 
opt/local/var/mail/domain.com/username

Dec 17 12:35:08 deliver(usern...@domain.com): Info: auth input: uid=5000
Dec 17 12:35:08 deliver(usern...@domain.com): Info: auth input: gid=5000
Dec 17 12:35:08 deliver(usern...@domain.com): Info: dbox: data=/opt/ 
local/var/mail/domain.com/username/dbox
Dec 17 12:35:08 deliver(usern...@domain.com): Info: fs: root=/opt/ 
local/var/mail/domain.com/username/dbox, index=, control=, inbox=
Dec 17 12:35:08 deliver(usern...@domain.com): Info: msgid=e5136d91-256c-4fd8-87ae-065c95dea...@gmail.com 
: saved mail to INBOX



Could someone confirm that this looks right?

Thank you,
Bradley Giesbrecht


Re: [Dovecot] Upgrade 1.0-1.2 dbox mysql

2009-12-17 Thread Bradley Giesbrecht


On Dec 17, 2009, at 1:18 PM, Charles Marcus wrote:


On 12/17/2009 4:00 PM, Bradley Giesbrecht wrote:
Seems to work but it's weird that I lost my subscribed folders.  
Also the

perl script imapsync is only seeing an inbox and no other folders.


Bradley,

Please stop sending the same message over and over. You have a gmail
account. GMail does not show you list messages that you SEND, only
replies. This is a longstanding issue - go complain to gmail


Please pardon my ignorance.

//Bradley

[Dovecot] something similar to last login but for aliases

2009-10-31 Thread Bradley Giesbrecht

I'm using dovecot deliver with postfix.

Is there a place to hook in a db update when an alias is hit?

I'm wanting to delete aliases that haven't been used in x time.


Thank you,

Brad


[Dovecot] ampersand in local-part

2009-04-01 Thread Bradley Giesbrecht
I have a new email server (postfix/dovecot/mysql) with accounts  
migrated from another server (different platform) and email addresses  
with ampersands like rd...@domain.com that worked on my old email  
server are not working now.


I'd like some help tracking this issue down.

Can anyone tell me if this looks like a postfix, dovecot or mysql issue?

Some log info follows. For brevity I'm just posting this log snip as  
I'm thinking I will get a simple answer to this but I will be happy to  
post postfix, dovecot or mysql settings in detail if they are required.



Thank you, Brad

dovecot.log file:
[...]
dovecot: Mar 27 16:37:23 Info: auth(default): auth(?,216.111.149.248):  
Invalid username: rd...@domain.com
dovecot: Mar 27 16:37:23 Info: auth(default): cram-md5(?, 
216.111.149.248): Username contains disallowed character: 0x26
dovecot: Mar 27 16:37:24 Info: auth(default): new auth connection:  
pid=68420

dovecot: Mar 27 16:37:25 Info: auth(default): client out: FAIL  1
dovecot: Mar 27 16:37:25 Info: auth(default): client in: AUTH   2 []
dovecot: Mar 27 16:37:25 Info: auth(default): auth(?,216.111.149.248):  
Invalid username: rd...@domain.com
dovecot: Mar 27 16:37:25 Info: auth(default): plain(?, 
216.111.149.248): Username contains disallowed character: 0x26

dovecot: Mar 27 16:37:27 Info: auth(default): client out: FAIL  2
dovecot: Mar 27 16:37:27 Info: imap-login: Disconnected (auth failed,  
2 attempts): method=PLAIN, rip=216.111.149.248, lip=216.111.149.248,  
secured

[...]



Re: [Dovecot] dovecot/postfix on Mac (was: tls and auth plain login)

2009-03-04 Thread Bradley Giesbrecht


On Mar 4, 2009, at 9:36 AM, Edgar Fuß wrote:

A  couple of us are working on a macports project for dovecot,  
postfix,

mysql, bind9 dlz etc... virtual everything.

pkgsrc has all of these.


Also, the way we are building should easily move to bsd's and linux
distros.

pkgsrc already does that (and even Solaris, Irix and HP-UX).


I know there are a bunch of these types of things out there but
I didn't find one that was what I was looking for.

Did you try pkgsrc?


What is pkgsrc?

Re: [Dovecot] OT: pkgsrc (was: dovecot/postfix on Mac)

2009-03-04 Thread Bradley Giesbrecht

On Mar 4, 2009, at 11:22 AM, Edgar Fuß wrote:


What is pkgsrc?

A package system (see www.pkgsrc.org)

Originally the package system of NetBSD, but then ported to 13 other  
platforms, Darwin being the second one. Extremly flexible, quarterly  
stable branches, 7300 packages.


It's really nice to have the same package system on my Macs and  
NetBSD machines.


I bet it is. I may have to reconsider.

//Brad

[Dovecot] tls and auth plain login

2009-03-03 Thread Bradley Giesbrecht

Hello List,


I want to allow plain text passwords only on ssl/tls.

Is it possible to have:
auth default {
mechanisms = cram-md5 ntlm
..
}

and then over-ride this when connection is ssl/tls to allow plain and  
login?


I have tried adding mechanisms = plain login cram-md5 ntlm to  
protocol imaps{} as an example but I get an error that the protocol  
does not exist.


I read somewhere today that dovecot enables plain automatically over  
secure connections (ssl/tls) but I'm not seeing it.


Also, auth default suggests that auth something_else is possible.  
I'm probably just doing a poor job of research but I'm not finding the  
answers I'm seeking.



Using postfix and lda.

# openssl s_client -connect localhost:993
# a01 capability
* CAPABILITY IMAP4rev1 SASL-IR SORT THREAD=REFERENCES MULTIAPPEND  
UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS UIDPLUS LIST- 
EXTENDED I18NLEVEL=1 AUTH=CRAM-MD5 AUTH=NTLM

a01 OK Capability completed.


Note about below, fd limit is increased management script.
# dovecot -n
# 1.1.3: /opt/local/etc/dovecot/dovecot.conf
Warning: fd limit 256 is lower than what Dovecot can use under full  
load (more than 768). Either grow the limit or change  
login_max_processes_count and max_mail_processes settings

log_path: /opt/local/var/ispbox/log/mail/dovecot.log
protocols: imap imaps pop3 pop3s
ssl_cert_file: /opt/local/etc/ssl/certs/dovecot.pem
ssl_key_file: /opt/local/etc/ssl/private/dovecot.pem
login_dir: /opt/local/var/run/dovecot/login
login_executable(default): /opt/local/libexec/dovecot/imap-login
login_executable(imap): /opt/local/libexec/dovecot/imap-login
login_executable(pop3): /opt/local/libexec/dovecot/pop3-login
mail_location: dbox:/opt/local/var/ispbox/mail/%d/%n/dbox
mail_executable(default): /opt/local/libexec/dovecot/imap
mail_executable(imap): /opt/local/libexec/dovecot/imap
mail_executable(pop3): /opt/local/libexec/dovecot/pop3
mail_plugin_dir(default): /opt/local/lib/dovecot/imap
mail_plugin_dir(imap): /opt/local/lib/dovecot/imap
mail_plugin_dir(pop3): /opt/local/lib/dovecot/pop3
auth default:
  mechanisms: cram-md5 ntlm
  passdb:
driver: sql
args: /opt/local/etc/dovecot/dovecot_mysql.conf
  userdb:
driver: prefetch
  userdb:
driver: sql
args: /opt/local/etc/dovecot/dovecot_mysql.conf
  socket:
type: listen
client:
  path: /opt/local/var/spool/postfix/private/auth
  mode: 432
  user: _postfix
  group: _postfix
master:
  path: /opt/local/var/run/dovecot/auth-master
  mode: 384
  user: _vmail


Thanks for any tips,
//Bradley



Re: [Dovecot] tls and auth plain login

2009-03-03 Thread Bradley Giesbrecht


On Mar 3, 2009, at 2:37 PM, Timo Sirainen wrote:


On Tue, 2009-03-03 at 10:48 -0800, Bradley Giesbrecht wrote:

I want to allow plain text passwords only on ssl/tls.


The default settings do that.


Is it possible to have:
auth default {
mechanisms = cram-md5 ntlm


mechanisms = plain cram-md5 ntlm

And then verify that you have disable_plaintext_auth=yes, which is  
also

the default.


Thank you Timo.

I had removed disable_plaintext_auth from my conf because with it in  
place it failed to show up in dovecot -n.

I figured I had it in the wrong place.

Should disable_plaintext_auth show in dovecot -n?


When testing make sure you don't test it from local server, because
Dovecot treats local IPs as trusted.


I'll make sure I test from remotes going forward. Thanks.


A  couple of us are working on a macports project for dovecot,  
postfix, mysql, bind9 dlz etc... virtual everything.


If we are successful in producing something of value I'll send you a  
link to the port. Maybe you would want to add it to some part of your  
wiki.


Also, the way we are building should easily move to bsd's and linux  
distros. I know there are a bunch of these types of things out there  
but I didn't find one that was what I was looking for.


//Brad