[Dovecot] LMTP over STDIN/STDOUT (non root user)
Is it possible to get LMTP session over STDIN/STDOUT (for non root user)?
I have configured dovecot to allow "server less" access to my mailbox using IMAP over STDIN/STDOUT. I would like to complete the setup by making fetchmail deliver fetched messages via LMTP over STDIN/STDOUT.
-- [pl>en: Andrew] Andrzej Adam Filip : anfi@onet.eu There is only one way to kill capitalism -- by taxes, taxes, and more taxes. -- Karl Marx
Timo Sirainen tss@iki.fi wrote:
On Tue, 2011-08-09 at 17:29 +0200, Andrzej Adam Filip wrote:
Is it possible to get LMTP session over STDIN/STDOUT (for non root user)?
Yeah. Just run it.
Step 1: OK/CLOSED Step 2: lmtp program seems to accept custom configuration file (-c _file_). The file specifies both passdb and userdb using Passwd-file. How to make lmtp skip attempts to contact auth server?
P.S. I want to achieve personal (single user) "server less" IMAP&LMTP over STDIN&STDOUT configuration.
Now I see: Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: Permission denied ... Fixing/changing socket permissions is no solutuion for me because I want to avoid need for any permanently running server.
-- [pl>en: Andrew] Andrzej Adam Filip : anfi@onet.eu The whole history of computers is rampant with cheerleading at best and bigotry at worst. -- Larry Wall in 199702111730.JAA28598@wall.org
On Sun, 2011-08-14 at 23:34 +0200, Andrzej Adam Filip wrote:
lmtp program seems to accept custom configuration file (-c _file_). The file specifies both passdb and userdb using Passwd-file. How to make lmtp skip attempts to contact auth server?
Well, since LMTP by design is intended to deliver mails to multiple users, which requires userdb lookup, this is kind of a kludgy way to use it. If you really want to, you can do it by patching the LMTP sources: --- a/src/lmtp/main.c Mon Aug 15 01:18:01 2011 +0300 +++ b/src/lmtp/main.c Mon Aug 15 01:24:39 2011 +0300 @@ -81,7 +81,6 @@ enum master_service_flags service_flags = 0; enum mail_storage_service_flags storage_service_flags = MAIL_STORAGE_SERVICE_FLAG_DISALLOW_ROOT | - MAIL_STORAGE_SERVICE_FLAG_USERDB_LOOKUP | MAIL_STORAGE_SERVICE_FLAG_TEMP_PRIV_DROP | MAIL_STORAGE_SERVICE_FLAG_NO_LOG_INIT | MAIL_STORAGE_SERVICE_FLAG_NO_IDLE_TIMEOUT;
Timo Sirainen
On Sun, 2011-08-14 at 23:34 +0200, Andrzej Adam Filip wrote:
lmtp program seems to accept custom configuration file (-c _file_). The file specifies both passdb and userdb using Passwd-file. How to make lmtp skip attempts to contact auth server?
Well, since LMTP by design is intended to deliver mails to multiple users, which requires userdb lookup, this is kind of a kludgy way to use it.
LMTP offers *also* a sensible way to reduce number of execution of deliver program, does not it? :-) Such use does make sense when retrieving messages from high volume mailing lists even after "half day break".
If you really want to, you can do it by patching the LMTP sources:
--- a/src/lmtp/main.c Mon Aug 15 01:18:01 2011 +0300 +++ b/src/lmtp/main.c Mon Aug 15 01:24:39 2011 +0300 @@ -81,7 +81,6 @@ enum master_service_flags service_flags = 0; enum mail_storage_service_flags storage_service_flags = MAIL_STORAGE_SERVICE_FLAG_DISALLOW_ROOT | - MAIL_STORAGE_SERVICE_FLAG_USERDB_LOOKUP | MAIL_STORAGE_SERVICE_FLAG_TEMP_PRIV_DROP | MAIL_STORAGE_SERVICE_FLAG_NO_LOG_INIT | MAIL_STORAGE_SERVICE_FLAG_NO_IDLE_TIMEOUT;
Thank for the patch/consideration. Do you intend to include it into official code base sometime in the (near) future? -- [pl>en: Andrew] Andrzej Adam Filip : anfi@onet.eu We gave you an atomic bomb, what do you want, mermaids? -- I. I. Rabi to the Atomic Energy Commission
On 15.8.2011, at 11.30, Andrzej Adam Filip wrote:
Timo Sirainen
wrote: On Sun, 2011-08-14 at 23:34 +0200, Andrzej Adam Filip wrote:
lmtp program seems to accept custom configuration file (-c _file_). The file specifies both passdb and userdb using Passwd-file. How to make lmtp skip attempts to contact auth server?
Well, since LMTP by design is intended to deliver mails to multiple users, which requires userdb lookup, this is kind of a kludgy way to use it.
LMTP offers *also* a sensible way to reduce number of execution of deliver program, does not it? :-)
Depends on how you're intending to run it. If you can manage to keep the session open between mail deliveries, then it'll work, but I don't really know how you could do that.
If you really want to, you can do it by patching the LMTP sources:
--- a/src/lmtp/main.c Mon Aug 15 01:18:01 2011 +0300 +++ b/src/lmtp/main.c Mon Aug 15 01:24:39 2011 +0300 @@ -81,7 +81,6 @@ enum master_service_flags service_flags = 0; enum mail_storage_service_flags storage_service_flags = MAIL_STORAGE_SERVICE_FLAG_DISALLOW_ROOT | - MAIL_STORAGE_SERVICE_FLAG_USERDB_LOOKUP | MAIL_STORAGE_SERVICE_FLAG_TEMP_PRIV_DROP | MAIL_STORAGE_SERVICE_FLAG_NO_LOG_INIT | MAIL_STORAGE_SERVICE_FLAG_NO_IDLE_TIMEOUT;
Thank for the patch/consideration.
Do you intend to include it into official code base sometime in the (near) future?
No.
Timo Sirainen tss@iki.fi wrote:
On 15.8.2011, at 11.30, Andrzej Adam Filip wrote:
Timo Sirainen tss@iki.fi wrote:
On Sun, 2011-08-14 at 23:34 +0200, Andrzej Adam Filip wrote:
lmtp program seems to accept custom configuration file (-c _file_). The file specifies both passdb and userdb using Passwd-file. How to make lmtp skip attempts to contact auth server?
Well, since LMTP by design is intended to deliver mails to multiple users, which requires userdb lookup, this is kind of a kludgy way to use it.
LMTP offers *also* a sensible way to reduce number of execution of deliver program, does not it? :-)
Depends on how you're intending to run it. If you can manage to keep the session open between mail deliveries, then it'll work, but I don't really know how you could do that. [...]
MTA operating in normal mode of accepting messages over SMTP can hardly benefit without significant delivery delays.
Fetchmail polling other POP/IMAP accounts can achieve multiple messages over single LMTP session (to one recipient) especially after "overnight break".
MTA perspective is not the only one even if it is the most important.
-- [pl>en: Andrew] Andrzej Adam Filip : anfi@onet.eu It's possible that I'm just an idiot, and don't recognize a sleepy slavemaster when I see one. -- Larry Wall in 199708040319.UAA16213@wall.org
participants (3)
-
Andrzej Adam Filip
-
Andrzej Adam Filip
-
Timo Sirainen