[Dovecot] ssh tunneling and maildir
Hello everyone, please keep my CC'd, I'm not on the list. I've been using dovecot happily via an ssh tunnel. My mutt is configured to use IMAP, and the tunnel is as follows in my muttrc:
set tunnel="ssh -q mymailhost 'MBOX_LOCKS=fcntl MAIL=/home/jlbec/mail /usr/libexec/dovecot/imap'"
It should be pretty obvious that this logs into mymailhost as me
(via SSH keyauth) and runs /usr/libexec/dovecot/imap directly as a foreground process. Setting MAIL, it points dovecot imap to my mbox folders. dovecot imap speaks imap over stdin/out, this goes over the ssh to mutt. It works great. Really great. I don't need root access at all, the server isn't running dovecot globally, and I get IMAP through firewalls if I can ssh through a firewall/vpn. I'm using mbox and fcntl, so my MTA has no trouble working in concert. However, this doesn't appear to be documented anywhere. A friend showed it to me, and I don't even remember who that was. I'm now considering changing to maildir folders. I figure dovecot imap might figure out a folder is maildir when stat says S_IFDIR, but without documentation, I can't figure out how to tell dovecot imap to use maildir when I create a folder. I'm also unsure how this will interact with my MTA. For the latter, I'm thinking I just need to configure my MTA to use dovecot's deliver program. For the former, is there some magic environment variable I need to add to my tunnel command line?
Thanks Joel
--
"The first requisite of a good citizen in this republic of ours is that he shall be able and willing to pull his weight." - Theodore Roosevelt
http://www.jlbec.org/
jlbec@evilplan.org
On Tue, 2007-07-10 at 23:31 -0700, Joel Becker wrote:
However, this doesn't appear to be documented anywhere. A friend showed it to me, and I don't even remember who that was.
:)
You should really just configure dovecot as though you wanted to run the daemon and then run /usr/sbin/dovecot --exec-mail imap
That'll give you all the environment you need.
johannes
On Wed, Jul 11, 2007 at 11:58:10AM +0200, Johannes Berg wrote:
On Tue, 2007-07-10 at 23:31 -0700, Joel Becker wrote:
However, this doesn't appear to be documented anywhere. A friend showed it to me, and I don't even remember who that was.
:)
You should really just configure dovecot as though you wanted to run the daemon and then run /usr/sbin/dovecot --exec-mail imap
Ok. How do I configure it if I cannot modify /etc?
/usr/sbin/dovecot -c /home/jlbec/.dovecotrc. I also assume I need -F to run it as a foreground process? Will I need any auth? I don't right now?
Thanks Joel
Joel
That'll give you all the environment you need.
johannes
--
Life's Little Instruction Book #237
"Seek out the good in people."
http://www.jlbec.org/
jlbec@evilplan.org
On Wed, 2007-07-11 at 08:57 -0700, Joel Becker wrote:
Ok. How do I configure it if I cannot modify /etc?
Ah, good question.
/usr/sbin/dovecot -c /home/jlbec/.dovecotrc
Sounds good.
. I also assume I need -F to run it as a foreground process?
No, with --exec-mail imap it automatically runs in the foreground
Will I need any auth? I don't right now?
No, with --exec-mail imap it gives you a preauth imap session.
johannes
On Thu, Jul 12, 2007 at 11:49:14AM +0200, Johannes Berg wrote:
/usr/sbin/dovecot -c /home/jlbec/.dovecotrc
Sounds good.
Will I need any auth? I don't right now?
No, with --exec-mail imap it gives you a preauth imap session.
Ok, with "/usr/sbin/dovecot -c /home/jlbec/.dovecotrc --exec-mail
imap" I now have it working successfully against my existing mbox setup. Thank you! I can take it from here.
Joel
--
"Every day I get up and look through the Forbes list of the richest people in America. If I'm not there, I go to work." - Robert Orben
http://www.jlbec.org/
jlbec@evilplan.org
On Fri, 2007-07-13 at 14:11 -0700, Joel Becker wrote:
Will I need any auth? I don't right now?
No, with --exec-mail imap it gives you a preauth imap session.
Ok, with "/usr/sbin/dovecot -c /home/jlbec/.dovecotrc --exec-mail imap" I now have it working successfully against my existing mbox setup. Thank you! I can take it from here.
Great, glad I could help.
johannes
Hi, my mail server is running fine. But not sure if I am doing right with "mail_location" in dovecot.conf
I am using dovecot-1.0.0-8_56 on RHEL AS 4 Update 5. Our users have a "mail" directory under their home directory(~/mail). I thought the "mail_location" line should be:
mail_location = mbox:%h/mail:INBOX=/var/mail/%u:INDEX=/var/mail_indexes/%d/%n
but if I do this, all the mailboxes in the "mail" directory won't show, and a new "mail" folder will be created under "~/mail/", so it is "~/mail/mail" now.
if I change it to this:
mail_location = mbox:%h:INBOX=/var/mail/%u:INDEX=/var/mail_indexes/%d/%n
Everything is fine, is this the supposed behavior?
Thanks CY
=========================================== Yu Chen Howard Hughes Medical Institute Chemistry Building, Rm 182 University of Maryland at Baltimore County 1000 Hilltop Circle Baltimore, MD 21250
phone: (410)455-6347 (primary) (410)455-2718 (secondary) fax: (410)455-1174 email: chen@hhmi.umbc.edu
Yu Chen spake the following on 8/16/2007 10:41 AM:
Hi, my mail server is running fine. But not sure if I am doing right with "mail_location" in dovecot.conf
I am using dovecot-1.0.0-8_56 on RHEL AS 4 Update 5. Our users have a "mail" directory under their home directory(~/mail). I thought the "mail_location" line should be:
mail_location = mbox:%h/mail:INBOX=/var/mail/%u:INDEX=/var/mail_indexes/%d/%n
but if I do this, all the mailboxes in the "mail" directory won't show, and a new "mail" folder will be created under "~/mail/", so it is "~/mail/mail" now.
if I change it to this:
mail_location = mbox:%h:INBOX=/var/mail/%u:INDEX=/var/mail_indexes/%d/%n
Everything is fine, is this the supposed behavior?
Do your clients have a mail directory configured in them like ~/mail? It was a common practice on older systems using other imap servers.
--
MailScanner is like deodorant... You hope everybody uses it, and you notice quickly if they don't!!!!
Yu Chen spake the following on 8/16/2007 10:41 AM:
Hi, my mail server is running fine. But not sure if I am doing right with "mail_location" in dovecot.conf
I am using dovecot-1.0.0-8_56 on RHEL AS 4 Update 5. Our users have a "mail" directory under their home directory(~/mail). I thought the "mail_location" line should be:
mail_location = mbox:%h/mail:INBOX=/var/mail/%u:INDEX=/var/mail_indexes/%d/%n
but if I do this, all the mailboxes in the "mail" directory won't show, and a new "mail" folder will be created under "~/mail/", so it is "~/mail/mail" now.
if I change it to this:
mail_location = mbox:%h:INBOX=/var/mail/%u:INDEX=/var/mail_indexes/%d/%n
Everything is fine, is this the supposed behavior?
Do your clients have a mail directory configured in them like ~/mail? It was a common practice on older systems using other imap servers.
Yes, that is it. Thanks.
CY
=========================================== Yu Chen Howard Hughes Medical Institute Chemistry Building, Rm 182 University of Maryland at Baltimore County 1000 Hilltop Circle Baltimore, MD 21250
phone: (410)455-6347 (primary) (410)455-2718 (secondary) fax: (410)455-1174 email: chen@hhmi.umbc.edu
participants (4)
-
Joel Becker
-
Johannes Berg
-
Scott Silva
-
Yu Chen