Re: [Dovecot] How to troubleshoot LDA or LMTP?
Gnus supports IMAP natively, and even ManageSieve. Use that, don't run a proxy, it's a lot easier. On Thu, Aug 8, 2013 at 4:19 AM, Steffen Kaiser skdove...@smail.inf.fh-brs.de wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 8 Aug 2013, John Williams wrote: in order to not filter the same message twice or re-filter messages, you've moved around manually? That is not a problem. The filtering process works perfectly when I manually invoke dovecot-lda. My problem is that I have followed the instructions here: http://wiki2.dovecot.org/LDA/ and here: http://wiki2.dovecot.org/LDA/Sendmail and here: http://wiki2.dovecot.org/LMTP but neither dovecot-lda nor LMTP seem to be triggered whenever I send email from my MUA (Gnus). At least, I *think* I have followed the instructions correctly. Would you like me to post my dovecot config again, and the relevant portion of sendmail.cf? Thank you very much for your help, I truly appreciate it. As Stan already pointed out: a local delivery takes place only, when the mail arrives via a MTA. offlineimap synchronizes two IMAP folders, there is no local delivery at your side at all. Hence, neither LDA nor LMTP is invoked. So I see two ways: 1) keep offlineimap to resync your local store back to the server and keep both in-sync. Then you can: 1a) run offlineimap to get new messages from the upstream server and sync current local messages. 1b) remove the new ones from the local store and feed them _manually_ to the LDA or LMTP. Now the filtering takes place and they are re-added to the mail storage. 1c) maybe: re-run the process until no new messages got downloaded, in order to keep the server in-sync 2) no need for server messages in-sync with local message store 2a) setup a local MTA that accepts your domain and drops messages via Dovecot LDA or LMTP. Then get the new messages via fetchmail on a regular basis and hand the messages over to the local MTA. 2b) use fetchmail in combination with Dovecot LDA/LMTP. No local MTA necessary. fetchmail will see only messages in INBOX as far as I know. So no filtering on the server must take place. - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBUgNiqV3r2wJMiz2NAQISSAgAnSWnyf4kzNrbEd/+UcZGvmeegCWp4QY3 TWAIh8V8vbo+FyKyYomvRLt1mmq5CKJNwOUdz+A3u5R6XT25JZKxA5yYhUKlLNEU n05zIsmWvKV6DWahdTv7GL84kmyETqp7zYo5pBWRf9SqwGFH8+KcBGh1U3MTaKhQ QfzIj3eYk7a1DQld7u3ZaLSiKCBadWCakgNscY2mX+gzoN4EXt+X1zMO52uaZpJ3 QkJyd2AHrnpYgBbmr2maneYox3+67IyQChnzZ0t2c9uPodT4ukEkZFYjrucEGlfv JEUaOaVnuzx/Wi7gxSUL/agSiaksLaEkT/KMWS6wQMSI0NxUaGIHjQ== =f/Uy -END PGP SIGNATURE- -- Sam Flint flintfam.org/~swflint
Re: [Dovecot] How to troubleshoot LDA or LMTP?
Sam Flint harmonicn...@gmail.com writes: Gnus supports IMAP natively, and even ManageSieve. Use that, don't run a proxy, it's a lot easier. I know. I'm using dovecot because I'm getting mail from an extremely slow connection, so Gnus blocks the Emacs UI for several seconds, making Emacs unusable. Using a local server eliminates that problem. On Thu, Aug 8, 2013 at 4:19 AM, Steffen Kaiser skdove...@smail.inf.fh-brs.de wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 8 Aug 2013, John Williams wrote: in order to not filter the same message twice or re-filter messages, you've moved around manually? That is not a problem. The filtering process works perfectly when I manually invoke dovecot-lda. My problem is that I have followed the instructions here: http://wiki2.dovecot.org/LDA/ and here: http://wiki2.dovecot.org/LDA/Sendmail and here: http://wiki2.dovecot.org/LMTP but neither dovecot-lda nor LMTP seem to be triggered whenever I send email from my MUA (Gnus). At least, I *think* I have followed the instructions correctly. Would you like me to post my dovecot config again, and the relevant portion of sendmail.cf? Thank you very much for your help, I truly appreciate it. As Stan already pointed out: a local delivery takes place only, when the mail arrives via a MTA. offlineimap synchronizes two IMAP folders, there is no local delivery at your side at all. Hence, neither LDA nor LMTP is invoked. So I see two ways: 1) keep offlineimap to resync your local store back to the server and keep both in-sync. Then you can: 1a) run offlineimap to get new messages from the upstream server and sync current local messages. 1b) remove the new ones from the local store and feed them _manually_ to the LDA or LMTP. Now the filtering takes place and they are re-added to the mail storage. 1c) maybe: re-run the process until no new messages got downloaded, in order to keep the server in-sync 2) no need for server messages in-sync with local message store 2a) setup a local MTA that accepts your domain and drops messages via Dovecot LDA or LMTP. Then get the new messages via fetchmail on a regular basis and hand the messages over to the local MTA. 2b) use fetchmail in combination with Dovecot LDA/LMTP. No local MTA necessary. fetchmail will see only messages in INBOX as far as I know. So no filtering on the server must take place. - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBUgNiqV3r2wJMiz2NAQISSAgAnSWnyf4kzNrbEd/+UcZGvmeegCWp4QY3 TWAIh8V8vbo+FyKyYomvRLt1mmq5CKJNwOUdz+A3u5R6XT25JZKxA5yYhUKlLNEU n05zIsmWvKV6DWahdTv7GL84kmyETqp7zYo5pBWRf9SqwGFH8+KcBGh1U3MTaKhQ QfzIj3eYk7a1DQld7u3ZaLSiKCBadWCakgNscY2mX+gzoN4EXt+X1zMO52uaZpJ3 QkJyd2AHrnpYgBbmr2maneYox3+67IyQChnzZ0t2c9uPodT4ukEkZFYjrucEGlfv JEUaOaVnuzx/Wi7gxSUL/agSiaksLaEkT/KMWS6wQMSI0NxUaGIHjQ== =f/Uy -END PGP SIGNATURE- -- Lecturer Department of Marketing University of Otago Dunedin, New Zealand
Re: [Dovecot] How to troubleshoot LDA or LMTP?
Steffen Kaiser skdove...@smail.inf.fh-brs.de writes: On Tue, 6 Aug 2013, John Williams wrote: dovecot-lda -c config-file -d user mailfile Aha! Piping a message to the process was the step I was not aware of. does offlineimap provides logs to get to know what mails are newly arriving to your local mail storage, Yes. in order to not filter the same message twice or re-filter messages, you've moved around manually? That is not a problem. The filtering process works perfectly when I manually invoke dovecot-lda. My problem is that I have followed the instructions here: http://wiki2.dovecot.org/LDA/ and here: http://wiki2.dovecot.org/LDA/Sendmail and here: http://wiki2.dovecot.org/LMTP but neither dovecot-lda nor LMTP seem to be triggered whenever I send email from my MUA (Gnus). At least, I *think* I have followed the instructions correctly. Would you like me to post my dovecot config again, and the relevant portion of sendmail.cf? Thank you very much for your help, I truly appreciate it.
Re: [Dovecot] How to troubleshoot LDA or LMTP?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 8 Aug 2013, John Williams wrote: in order to not filter the same message twice or re-filter messages, you've moved around manually? That is not a problem. The filtering process works perfectly when I manually invoke dovecot-lda. My problem is that I have followed the instructions here: http://wiki2.dovecot.org/LDA/ and here: http://wiki2.dovecot.org/LDA/Sendmail and here: http://wiki2.dovecot.org/LMTP but neither dovecot-lda nor LMTP seem to be triggered whenever I send email from my MUA (Gnus). At least, I *think* I have followed the instructions correctly. Would you like me to post my dovecot config again, and the relevant portion of sendmail.cf? Thank you very much for your help, I truly appreciate it. As Stan already pointed out: a local delivery takes place only, when the mail arrives via a MTA. offlineimap synchronizes two IMAP folders, there is no local delivery at your side at all. Hence, neither LDA nor LMTP is invoked. So I see two ways: 1) keep offlineimap to resync your local store back to the server and keep both in-sync. Then you can: 1a) run offlineimap to get new messages from the upstream server and sync current local messages. 1b) remove the new ones from the local store and feed them _manually_ to the LDA or LMTP. Now the filtering takes place and they are re-added to the mail storage. 1c) maybe: re-run the process until no new messages got downloaded, in order to keep the server in-sync 2) no need for server messages in-sync with local message store 2a) setup a local MTA that accepts your domain and drops messages via Dovecot LDA or LMTP. Then get the new messages via fetchmail on a regular basis and hand the messages over to the local MTA. 2b) use fetchmail in combination with Dovecot LDA/LMTP. No local MTA necessary. fetchmail will see only messages in INBOX as far as I know. So no filtering on the server must take place. - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBUgNiqV3r2wJMiz2NAQISSAgAnSWnyf4kzNrbEd/+UcZGvmeegCWp4QY3 TWAIh8V8vbo+FyKyYomvRLt1mmq5CKJNwOUdz+A3u5R6XT25JZKxA5yYhUKlLNEU n05zIsmWvKV6DWahdTv7GL84kmyETqp7zYo5pBWRf9SqwGFH8+KcBGh1U3MTaKhQ QfzIj3eYk7a1DQld7u3ZaLSiKCBadWCakgNscY2mX+gzoN4EXt+X1zMO52uaZpJ3 QkJyd2AHrnpYgBbmr2maneYox3+67IyQChnzZ0t2c9uPodT4ukEkZFYjrucEGlfv JEUaOaVnuzx/Wi7gxSUL/agSiaksLaEkT/KMWS6wQMSI0NxUaGIHjQ== =f/Uy -END PGP SIGNATURE-
Re: [Dovecot] How to troubleshoot LDA or LMTP?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, 5 Aug 2013, John Williams wrote: Please forgive me if these are silly questions. I am a normal user, not a system administrator. I am using Dovecot as a kind of IMAP caching proxy, i.e. reading IMAP mail via Gnus + Dovecot + Offlineimap. I am trying to enable sieve functionality. Offlineimap is to replicate two IMAP instances, so it believes that the message had been already delivered (and filtered). Usually one would use fetchmail and stuffs the messages into a local MTA. But then, the message are gone from the upstream server. - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBUgD2UV3r2wJMiz2NAQL63gf7BrTcvMLWubqC/eYIgB88TJCA5l3uNzcV D0mklPNy05PiocFUqwIwTkq/1MNSg0yplO2zTHLLNwUiB9YIX1IBj8ojTN037LcE EYtwNGUR5eBYatw7z9w/uIzkHtJlTf+7jOtpOoqJbD19a0pujUxP5/rCtmLv/6br R0oK0IXHsLIxchA5sftWBSq+JLPcFQEbStWp+WPtJ4QJP3B2UCD7CHjqBMHhbA2g iQRZ8EfHKoc2g96DbGnTQvDNwNv/HaWeU345zMXuguKw2EhbH05/T3JaOm9BSFn1 MoHBkhmiIv2udU+x/ArqGpw0VCY2ssN+sYrJ2FGvj16qIyVGlR5edw== =3l4v -END PGP SIGNATURE-
Re: [Dovecot] How to troubleshoot LDA or LMTP?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 6 Aug 2013, John Williams wrote: dovecot-lda -c config-file -d user mailfile Aha! Piping a message to the process was the step I was not aware of. does offlineimap provides logs to get to know what mails are newly arriving to your local mail storage, in order to not filter the same message twice or re-filter messages, you've moved around manually? - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBUgD3WF3r2wJMiz2NAQLsuggAk+leb2Hyc3F1B5A55gWd3GTuVmIzz2zH GXskHepwo3BgcdKTae6XY/XNP6tMRnG1UsLzq18HcvA8uCGzB3vKo1iM8fVPsHLV 0DDlYOxBUd8HRuCPB++AA41y66lppPUIqF1be1ILPJ56Jd6nEI2e/YB8vlOyagut 4WhsJK8Ruo+biDG++UFYZERFsI7xzvjawdtMGZto9lzYomZUP5Ig5DsXso28Y1by aRHOWzkMZYvNWGj3JDqxy4ePjzsM97QHKtOOmXNiDvyxwDQ3zMsUB+VBEjDq7z0k n491Hp9fCNyZ4SYtQhjSjeO6J4WKpcFxeaPdLvrB3JUH5moCNNDh9Q== =uBA2 -END PGP SIGNATURE-
[Dovecot] How to troubleshoot LDA or LMTP?
Please forgive me if these are silly questions. I am a normal user, not a system administrator. I am using Dovecot as a kind of IMAP caching proxy, i.e. reading IMAP mail via Gnus + Dovecot + Offlineimap. I am trying to enable sieve functionality. *Desired behaviour* When Gnus (or whatever MUA) asks for new mail from Dovecot, that before Dovecot returns and answer, the sieve rules are executed. Please tell me if I completely misunderstand how the mail system works in this instance. *Actual behaviour* As far as I can tell, not only are the sieve rules not executed, but also neither LDA or LMTP is invoked. *What works* Running the scripts manually via `sieve-filter` works fine. The next time I read from my local dovecot server the mail is all in the desired place. Also, the LMTP service is running, listening on port 24. *What doesn't work* I thought the next step would be to execute dovecot-lda manually (as is suggested on the wiki and in numerous newsgroup posts), but I can't figure out how to do this. When I execute it as root and provide my non-root username via the -u option, it hangs. I can see that it spawns a child process that executes as the non-root user (specified with the -u option). So, could someone tell how to execute dovecot-lda manually please? Also, when does LMTP process messages? When sending mail via SMTP, or when reading mail via IMAP? I would prefer to use LMTP rather than LDA. *My environment* Fedora 19 sendmail. Is any other information relevant, apart from the dovecot configuration? Thank you, John .2.4: /etc/dovecot/dovecot.conf # OS: Linux 3.10.4-300.fc19.x86_64 x86_64 Fedora release 19 (Schrödinger’s Cat) auth_socket_path = /var/run/dovecot/auth-userdb debug_log_path = /var/log/dovecot-debug.log disable_plaintext_auth = no hostname = falcon.novoalexandrovsk.ru info_log_path = /var/log/dovecot-info.log lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes login_greeting = Dovecot ready, folks! mail_access_groups = mail mail_debug = yes mail_location = mbox:~/mail/mailboxes:DIRNAME=mBoX-MeSsAgEs:INDEX=~/mail/index:CONTROL=~/mail/control:INBOX=/var/spool/mail/%u managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave mbox_write_locks = fcntl namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox Sent Messages { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { driver = pam } plugin { sieve = ~/.dovecot.sieve sieve_dir = ~/sieve sieve_global_dir = /var/lib/dovecot/sieve/global/ sieve_global_path = /var/lib/dovecot/sieve/default.sieve } postmaster_address = johnfrombl...@gmail.com protocols = imap lmtp sieve service auth { unix_listener auth-userdb { mode = 0600 user = mail } } service lmtp { executable = lmtp -L inet_listener lmtp { address = 192.168.0.101 127.0.0.1 ::1 port = 24 } user = mail } service managesieve-login { inet_listener sieve { port = 4190 } process_min_avail = 1 service_count = 1 vsz_limit = 64 M } service managesieve { process_limit = 10 } ssl = required ssl_cert = /etc/pki/dovecot/certs/dovecot.pem ssl_key = /etc/pki/dovecot/private/dovecot.pem userdb { driver = passwd } protocol lmtp { info_log_path = /var/log/dovecot-lmtp-info.log log_path = /var/log/dovecot-lmtp-debug.log mail_plugins = sieve } protocol lda { info_log_path = /var/log/dovecot-lda-info.log log_path = /var/log/dovecot-lda-errors.log mail_plugins = sieve } protocol sieve { mail_max_userip_connections = 10 managesieve_implementation_string = Dovecot Pigeonhole, Asshole! managesieve_logout_format = bytes=%i/%o managesieve_max_compile_errors = 5 managesieve_max_line_length = 65536 }
Re: [Dovecot] How to troubleshoot LDA or LMTP?
On 8/5/2013 4:28 AM, John Williams wrote: *Desired behaviour* When Gnus (or whatever MUA) asks for new mail from Dovecot, that before Dovecot returns and answer, the sieve rules are executed. Please tell me if I completely misunderstand how the mail system works in this instance. Sieve is invoked by LDA or LMTP during delivery from the upstream MTA. The purpose of this is to sort the mail into the appropriate folder during delivery, and update the Dovecot indexes at this time. ... *What doesn't work* I thought the next step would be to execute dovecot-lda manually (as is suggested on the wiki and in numerous newsgroup posts), but I can't figure out how to do this. When I execute it as root and provide my non-root username via the -u option, it hangs. I can see that it spawns a child process that executes as the non-root user (specified with the -u option). So, could someone tell how to execute dovecot-lda manually please? I don't have the answer to this question. You desire to use Dovecot in a manner likely not anticipated by its designer. What you want may/not be possible. Also, when does LMTP process messages? When the upstream MTA connects and delivers a message. LMTP is identical to SMTP but for a few commands, thus transmission of messages occurs in an almost identical manner to SMTP, over a network socket. The socket connection can be local to a host, or over a network between two hosts. -- Stan
Re: [Dovecot] How to troubleshoot LDA or LMTP?
John Williams writes: *What doesn't work* I thought the next step would be to execute dovecot-lda manually (as is suggested on the wiki and in numerous newsgroup posts), but I can't figure out how to do this. When I execute it as root and provide my non-root username via the -u option, it hangs. I can see that it spawns a child process that executes as the non-root user (specified with the -u option). So, could someone tell how to execute dovecot-lda manually please? Maybe use -d? I had no trouble invoking dovecot-lda -c config-file -d user mailfile If it doesn't work for you, I suggest process tracing it. Also, when does LMTP process messages? When sending mail via SMTP, or when reading mail via IMAP? I would prefer to use LMTP rather than LDA. The former. Joseph Tam jtam.h...@gmail.com
Re: [Dovecot] How to troubleshoot LDA or LMTP?
Joseph Tam jtam.h...@gmail.com writes: John Williams writes: *What doesn't work* I thought the next step would be to execute dovecot-lda manually (as is suggested on the wiki and in numerous newsgroup posts), but I can't figure out how to do this. When I execute it as root and provide my non-root username via the -u option, it hangs. I can see that it spawns a child process that executes as the non-root user (specified with the -u option). So, could someone tell how to execute dovecot-lda manually please? Maybe use -d? D'oh! I meant -d. *hangs head in shame* I had no trouble invoking dovecot-lda -c config-file -d user mailfile Aha! Piping a message to the process was the step I was not aware of. Thanks Joseph!