[Dovecot] different mail_locations
Hi all
I've mounted a cluster ACTIVE-PASIVE, with the mailbox in a SAN. The user's home are: /Correo/mail/foo/home
I use: Postfix, dovecot and dovecot_lda.
The folder /san/mail is only show in the active node (switch the virtual ip, filesystem and daemons).
How i configure dovecot mail_location?? Now i have: mail_location: maildir:/Correo/mail/%n
The problem is that the admin mails in pasive node are in enqueued and not arrive.
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/..
Have you any idea?
# dovecot -n # 1.0.10: /etc/dovecot.conf log_path: /var/log/dovecot/dovecot.log info_log_path: /var/log/dovecot/dovecot.info protocols: imap imaps pop3 managesieve ssl_cert_file: /etc/pki/dovecot/certs/imap.ual.es.crt ssl_key_file: /etc/pki/dovecot/private/imap.ual.es.key login_dir: /var/run/dovecot/login login_executable(default): /usr/libexec/dovecot/imap-login login_executable(imap): /usr/libexec/dovecot/imap-login login_executable(pop3): /usr/libexec/dovecot/pop3-login login_executable(managesieve): /usr/libexec/dovecot/managesieve-login mail_location: maildir:/Correo/mail/%n mail_executable(default): /usr/local/sbin/post-login-imap-dovecot mail_executable(imap): /usr/local/sbin/post-login-imap-dovecot mail_executable(pop3): /usr/local/sbin/post-login-pop3-dovecot mail_executable(managesieve): /usr/libexec/dovecot/managesieve mail_plugins(default): quota imap_quota mail_plugins(imap): quota imap_quota mail_plugins(pop3): quota mail_plugins(managesieve): mail_plugin_dir(default): /usr/lib64/dovecot/imap mail_plugin_dir(imap): /usr/lib64/dovecot/imap mail_plugin_dir(pop3): /usr/lib64/dovecot/pop3 mail_plugin_dir(managesieve): /usr/lib64/dovecot/managesieve namespace: type: private separator: / location: maildir:/Correo/mail/%n inbox: yes auth default: passdb: driver: pam userdb: driver: passwd plugin: quota: maildir:storage=1048576
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.
Timo Sirainen escribió:
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.
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)
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
Hi Timo
Timo Sirainen escribió:
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
I did:
# echo hello | /usr/libexec/dovecot/deliver Fatal: destination user parameter (-d user) not given
# 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
foo$ echo hello | /usr/libexec/dovecot/deliver foo$ more foo/cur/1204638363.P28199Q0M553430.blade25,S=11:2,S hello
It haven't headers :(
-----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: me@example.com To: foo@example.com Subject: Dumm Di Dumm Reply-To: other@example.com 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-----
participants (3)
-
Antonio Casado Rodríguez
-
Steffen Kaiser
-
Timo Sirainen