Re: pigeonhole/lda accessing -m folder

2015-08-07 Thread matthias lay
fixed my problem.

if somebody is interested.
I added an variable to the environment extension, which is quite easy.
And the value of the folder is already there. so this is all:


src/lib-sieve/plugins/environment/ext-environment-common.c

static const char *envit_spfolder_get_value
(struct sieve_instance *svinst,
const struct sieve_script_env *senv)
{
return senv-default_mailbox;
}

const struct sieve_environment_item spfolder_env_item = {
.name = spfolder,
.get_value = envit_spfolder_get_value,
};


after that the variable can easily be used in a script like

if anyof ( environment :matches spfolder *) {
set myfolder ${1};
}









On 08/07/2015 12:40 PM, matthias lay wrote:
 hi jost thx for the reply,
 
 by access I mean to read the variable
 
 
 require [fileinto, variables, ?destfolder? ];
 
 if anyof ( destfolder :matches *) {
 
 fileinto ${1}/subfolder;
 
 }else{
 
   fileinto INBOX/subfolder;
 
 }
 
 
 
 On 08/07/2015 12:26 PM, Jost Krieger wrote:
 On Fri Aug  7 12:19:22 2015, matthias lay wrote:
  
 anybody knows, if there is a way to acces the folder from a call like this

 deovecot-lda -m destfolder

 from within a sieve script?

 Depending on what you mean by access, this could be as easy as

  require fileinto;

  fileinto destfolder;
  
 Yours
 Jost Krieger



opening a maildir ?

2015-08-07 Thread Kevin Laurie
Hello,
I have a maildir on my Ubuntu PC. I used imapsync + dovecot to copy all my
emails on it.
What would be a convenient way to access all the emails ( I want to go
through and download all attachments). So a tool with some GUI will be
nice.
Appreciate if someone could help here.

Thanks
Kevin


Re: opening a maildir ?

2015-08-07 Thread Marc Stürmer


Zitat von Kevin Laurie superinterstel...@gmail.com:


What would be a convenient way to access all the emails ( I want to go
through and download all attachments). So a tool with some GUI will be
nice.


Thunderbird with spool access.

https://addons.mozilla.org/de/thunderbird/addon/attachmentextractor/


Re: pigeonhole/lda accessing -m folder

2015-08-07 Thread Jost Krieger
On Fri Aug  7 12:19:22 2015, matthias lay wrote:
 
 anybody knows, if there is a way to acces the folder from a call like this
 
 deovecot-lda -m destfolder
 
 from within a sieve script?

Depending on what you mean by access, this could be as easy as

 require fileinto;

 fileinto destfolder;
 
Yours
Jost Krieger
-- 
| jost.krieger+...@ruhr-uni-bochum.de  Please help stamp out spam! |
| Postmaster, JAPH, resident answer machineat RUB Comp. Center |
| Sincere words are not sweet, sweet words are not sincere.|
|  Lao Tse, Tao Te King 81 |


smime.p7s
Description: S/MIME cryptographic signature


Re: pigeonhole/lda accessing -m folder

2015-08-07 Thread matthias lay
hi jost thx for the reply,

by access I mean to read the variable


require [fileinto, variables, ?destfolder? ];

if anyof ( destfolder :matches *) {

fileinto ${1}/subfolder;

}else{

  fileinto INBOX/subfolder;

}



On 08/07/2015 12:26 PM, Jost Krieger wrote:
 On Fri Aug  7 12:19:22 2015, matthias lay wrote:
  
 anybody knows, if there is a way to acces the folder from a call like this

 deovecot-lda -m destfolder

 from within a sieve script?
 
 Depending on what you mean by access, this could be as easy as
 
  require fileinto;
 
  fileinto destfolder;
  
 Yours
 Jost Krieger
 


Using a separate passdb per service

2015-08-07 Thread Gerry
Situation: one front-facing server running Dovecot as IMAP/POP3/
ManageSieve proxy, a mixture of IMAP servers (Dovecot, Exchange, ...)
in the back-end. Dovecot's passdb does lookups against MySQL which
contains a simple user/host mapping, the actual authentication happens
on the back-end IMAP servers. The configuration is more or less as
described here: http://wiki2.dovecot.org/PasswordDatabase/ExtraFields/Proxy

Now I would like to add a Postfix instance on the front-facing server
which listens on the submission port and authenticates users via SASL
using the local Dovecot's UNIX socket. The idea being that a user only
needs to remember one single hostname, one username and one password
for all mail-related services.

The problem is that Dovecot is operating in proxy mode, which means
that the password_query returns NULL as the password and explicitly
returns a field nopasswd containing Y. Thus, users can not
authenticate against the UNIX socket.

What I think I want to do is convince Dovecot to use one passdb for the
imap/pop3/managesieve services and different one for the auth service.

The configuration snippet below doesn't work, but it should illustrate
what I want to achieve:

 protocols = imap pop3 sieve
 
 service auth {
 passdb sql {
 driver = sql
 args = /etc/dovecot/mysql-auth-sasl.conf.ext
 }
 
 unix_listener /var/spool/postfix/private/auth {
 user = postfix
 group = postfix
 mode = 0666
 }
 }
 
 # IMAP/POP3/ManageSieve auth against MySQL
 passdb sql {
 driver = sql
 args = /etc/dovecot/mysql-auth-default.conf.ext
 }

Example mysql-auth-sasl.conf.ext

 driver = mysql
 connect = host=127.0.0.1 dbname=mail user=mail password=somethingrandom
 password_query = SELECT password AS password FROM users WHERE login = '%u'

Example mysql-auth-default.conf.ext:

 driver = mysql
 connect = host=127.0.0.1 dbname=mail user=mail password=somethingrandom
 password_query = SELECT NULL AS password, 'Y' as nopassword, host, 'Y' AS 
 proxy FROM users WHERE login = '%u'

Any pointers?

Gerry


Re: Using a separate passdb per service

2015-08-07 Thread Edgar Pettijohn
I'm not sure if this would work, but possibly having two separate 
instances of dovecot with separate configs running may work for you.


http://wiki2.dovecot.org/RunningDovecot

On 08/07/15 11:04, Gerry wrote:

Situation: one front-facing server running Dovecot as IMAP/POP3/
ManageSieve proxy, a mixture of IMAP servers (Dovecot, Exchange, ...)
in the back-end. Dovecot's passdb does lookups against MySQL which
contains a simple user/host mapping, the actual authentication happens
on the back-end IMAP servers. The configuration is more or less as
described here: http://wiki2.dovecot.org/PasswordDatabase/ExtraFields/Proxy

Now I would like to add a Postfix instance on the front-facing server
which listens on the submission port and authenticates users via SASL
using the local Dovecot's UNIX socket. The idea being that a user only
needs to remember one single hostname, one username and one password
for all mail-related services.

The problem is that Dovecot is operating in proxy mode, which means
that the password_query returns NULL as the password and explicitly
returns a field nopasswd containing Y. Thus, users can not
authenticate against the UNIX socket.

What I think I want to do is convince Dovecot to use one passdb for the
imap/pop3/managesieve services and different one for the auth service.

The configuration snippet below doesn't work, but it should illustrate
what I want to achieve:


protocols = imap pop3 sieve

service auth {
 passdb sql {
 driver = sql
 args = /etc/dovecot/mysql-auth-sasl.conf.ext
 }

 unix_listener /var/spool/postfix/private/auth {
 user = postfix
 group = postfix
 mode = 0666
 }
}

# IMAP/POP3/ManageSieve auth against MySQL
passdb sql {
 driver = sql
 args = /etc/dovecot/mysql-auth-default.conf.ext
}

Example mysql-auth-sasl.conf.ext


driver = mysql
connect = host=127.0.0.1 dbname=mail user=mail password=somethingrandom
password_query = SELECT password AS password FROM users WHERE login = '%u'

Example mysql-auth-default.conf.ext:


driver = mysql
connect = host=127.0.0.1 dbname=mail user=mail password=somethingrandom
password_query = SELECT NULL AS password, 'Y' as nopassword, host, 'Y' AS proxy 
FROM users WHERE login = '%u'

Any pointers?

Gerry


backing up email / saving maildir on external hard drives

2015-08-07 Thread Kevin Laurie
Hello,
Yesterday I tried to back up a 40GB maildir .
I tried to move the maildir from home to external HDD but failed. Decided
then to compress it(which took several hours). Now changing the disk format
from FAT to exFAT to allow the transfer for the large compressed file.

How does one back up emails on a external drive?
Some advice would be greatly appreciated.


Re: backing up email / saving maildir on external hard drives

2015-08-07 Thread Christian Kivalo


Am 08. August 2015 06:56:55 MESZ, schrieb Kevin Laurie 
superinterstel...@gmail.com:
Hello,
Yesterday I tried to back up a 40GB maildir .
I tried to move the maildir from home to external HDD but failed.
Decided
then to compress it(which took several hours). Now changing the disk
format
from FAT to exFAT to allow the transfer for the large compressed file.

How does one back up emails on a external drive?
Some advice would be greatly appreciated.

i backup my maildir with rsync to my home nas.

i assume you are using linux or similar, so when backing up to an external hdd 
i'd also use rsync to copy over the maildir as is to the external hdd but use a 
different filesystem n that hdd like ext4 or xfs or anything else than 
fat/vfat/exfat.

when something goes wrong you can just copy the files back.

what was the error message you got when you tried to copy to the ext. hdd?

regards
- c