Re: [Dovecot] different mail_locations

2008-03-04 Thread Timo Sirainen

On Mar 3, 2008, at 12:45 PM, Antonio Casado Rodríguez wrote:


Yes, it work well. But the mail still not arrived.

How do I configure /bin/mail to arrive mails with postfix and  
dovecot off? I use dovecot-lda


# su - myuser -c 'echo $MAIL; echo $HOME'
/var/spool/mail/myuser
/var/spool/mail/myuser/home

# echo hello | mail myuser(work if postfix is on and dovecot  
is off)


Why do you want to do that? It's Postfix that receives the mails.

If you really want to deliver mails while Postfix isn't running, run  
Dovecot's deliver directly:


echo hello | /usr/local/libexec/dovecot/deliver



PGP.sig
Description: This is a digitally signed message part


Re: [Dovecot] different mail_locations

2008-03-04 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 4 Mar 2008, Antonio Casado Rodríguez wrote:


# echo hello | /usr/libexec/dovecot/deliver
Fatal: destination user parameter (-d user) not given


Deliver cannot know where to deliver to, if you run it as root.


# echo hello | /usr/libexec/dovecot/deliver -d foo
# tail /var/log/dovecot/dovecot-deliver.log
deliver(foo): Mar 04 14:36:27 Error: Can't connect to auth server at 
/var/run/dovecot/auth-master: No such file or directory


Ran as root, deliver must know where the homedirectory of foo is, because 
Deliver uses the Dovecot authentification framework, Dovecot must be 
running and configured to expose the auth socket.



foo$ echo hello | /usr/libexec/dovecot/deliver
foo$ more  foo/cur/1204638363.P28199Q0M553430.blade25,S=11:2,S
hello

It haven't headers  :(


Well, where should be headers come from? You tell deliver to put the 
single line message hello\n into the mail storage of foo. No more no 
less.


MUAs (like mail command) require a working MTA they connect to. However, 
you can create the headers yourself, e.g.:


echo From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Dumm Di Dumm
Reply-To: [EMAIL PROTECTED]
X-Header: Dunno
Preference: junk

Hello | su foo -c deliver

Though, running deliver without Dovecot auth socket makes no sense to me 
with Maildir. Just generate a new filename and put the message right into 
the Maildir/new of the user. Because deliver relies on the Dovecot 
framework it does not perform LDAP queries or the like on its own.


Bye,

- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHzk3dVJMDrex4hCIRAjXuAKCM6zOOWkRxOcjdSF7QHyrzY0OBLwCg03cD
rE70t2y0EZFqGWFQXmhg8nw=
=H+og
-END PGP SIGNATURE-

Re: [Dovecot] different mail_locations

2008-02-29 Thread Timo Sirainen
On Fri, 2008-02-29 at 12:52 +0100, Antonio Casado Rodríguez wrote:

 I need a user with mail_location in /var/spool/mail/foo (in aliases,  
 root: foo)and the rest users in /Correo/mail/
 
 I have seen override mail_executable, but it not work with dovecot_lda 
 and postfix (local mailer).
 
 I have thinked about:   mail_location: maildir:%h/..

That should work if your home directories are set correctly.

   userdb:
 driver: passwd

Alternatively you could use something else as passwd as userdb (e.g.
passwd-file generated from passwd) and override mail field in it for
the one user.



signature.asc
Description: This is a digitally signed message part