Re: [Dovecot] Dovecot Virtual Users with Sendmail
Well our situation is kind of like this: We've been using UW-Imap for 12-15 years, and have loved it. It has a beauty and simplicity to it that is simply wonderful. We're located in a remote part of the Rocky Mountains, and the only internet connection we can get that's faster than a dial-up is a satellite. Lousy upload speeds. Can't host our own sites here. We've been hosting our sites on one of our parishioner's servers for years; but through the years, that's become more and more problematic, and we'd like to do more with it than we currently can. We'd like to set up our own server at our guest house in town. I wanted to use OpenIndiana (Solaris) to take advantage of some of the really amazing features it has. So, I set up UW-Imap on it. Works great. Glory be to our holy God. The problem is, after I got all that working, I went to set up the users for it, and discovered the GUI for creating the users won't allow me to add any users with usernames longer than eight characters. I'm not real dependent on GUI's, and a quick search on the net told me that I can easily add the users with the long user names from the command line. So, I asked on the UW-Imap and on the OpenIndiana list for people's experience about this. Two people said they'd been using long user names on Solaris and BSD for years without any problems, while two others recommended changing to an IMAP server that supports virtual users. One of those recommended Dovecot. So I started looking at Dovecot. I'm not real keen on Sendmail, but to make matters worse, we host our own email on our server here in the mountains. Since we can't get reverse DNS set up for our satellite connection, we have to relay our emails through our parishioner's server, which does have reverse DNS, or else most people's email servers reject them as spam. We also need to be able to send and receive emails from multiple domains. So, I have to be able to figure out how to do both parts of the relay -- our part where we tell our MTA to relay it through the other host, and what will become the server at our guest house to accept those emails and relay them on to the recipients. And the multiple domain issue. I can do all this with UW-Imap and Sendmail, because we've already done all the fighting necessary to get it to work. We've been doing it for years. It just leaves us with the question of whether it's better to go with using UW-Imap on a system that's not designed to support long user names, and possibly getting bit by that, or whether it's better to fight it out trying to learn all this other stuff with a different IMAP server and MTA? Fun! I could probably get Cyrus IMAP to work with Sendmail, because I tried it briefly years ago and already have gone through the grief of figuring that out. But I didn't particularly care for it. One of the things I like most about UW-Imap -- and Dovecot shares this -- is that it's easy to backup, restore inadvertently deleted directories, and to move emails from one server to another. From what I remember, Cyrus wasn't so friendly about that. And it was more difficult to administer than UW-Imap and Dovecot. After reading the 13-page article Ken posted this afternoon, I started looking at Postfix. My impression is, that maybe this might be a good route to try. Dovecot - PostFix - and if I'm going to go through all that, I might as well go with Sieve, instead of Procmail, like we've been using for years. I used Sieve briefly with Cyrus. I've never been thrilled with Procmail. So, with all that background, if anyone would like to share any suggestions or advice, I would certainly appreciate it. Cordially, Peter, hieromonk On Dec 31, 2012, at 8:34 PM, Noel Butler wrote: > On Mon, 2012-12-31 at 16:52 -0700, dormitionsk...@hotmail.com wrote: >> >> Thank you very much for the article. It was quite interesting. All >> thirteen pages! >> >> Unless somebody else posts that they've managed to get Sendmail to work with >> Dovecot virtual users, then I think your suggestion to look at a different >> MTA might just be the best route to take. >> >> Thank you again. I do appreciate it. >> >> I hope you have a happy new year! -- All year long!! >> >> fp >> >> > Hi, > Years (well decade) ago we used Sendmail, then we started having more > domains, it was getting very messy, the choice was move to Cyrus or change > our MTA,Cyrus was a maze of bdb hell it was very picky, so it never made it > off the dev box, moved to qmail with vpopmail , but then qmail was useless as > a . on a bull, so we used sendmail up front redirecting to qmail, in 2008 > we re structured and moved to postfix and dovecot and never looked back since. > > If you don't have a central portal, there is code out there to allow you and > your domain managers and their users to manage their mail, postfixadmin (I > never really liked) or vmail manager GRS from grsoft, wr
Re: [Dovecot] Vacation Notice Not Working
Ch Chai skrev den 2012-12-31 08:11: * found this path when by run this command : doveadm log find Debug: /var/log/dovecot-debug.log Info: /var/log/dovecot-info.log above 2 is a good example on how to make it logs Warning: /var/log/dovecot.log Error: /var/log/dovecot.log Fatal: /var/log/dovecot.log nothing works here since there is 2 filelooks on the first one so no important error fatal is logged make them as seperate log files should resolve that Warning: /var/log/dovecot-warning.log Error: /var/log/dovecot-error.log Fatal: /var/log/dovecot-fatal.log nope ?
Re: [Dovecot] From Sendmail to Dovecot mdbox, what is missing.
At 5PM -0600 on 31/12/12 you (Torpey List) wrote: > Sendmail 8.14.4 > dovecot 2.0.9 > > I have sendmail working and it is sending mail to /var/mail/%u. > I have dovecot working in that I can move emails into IMAP folders and > I can send email through IMAP. I have set up dovecot to use mdbox > based on the following: > mail_location = mdbox:~/mail > > However, I seem to be lacking a key piece of information. > Sendmail is sending the mail to /var/mail/%u as a mbox (single file > for all emails) format. > Dovecot wants to read the mail in mdbox (Multiple messages per file, > but unlike mbox multiple files per mailbox.) So the two programs are > not working together. > > So, I cannot get dovecot to read new emails at /var/mail/%u. > So I tried changing to the following: > mail_location = mdbox:~/mail:INBOX=/var/mail/%u > However, dovecot complains that it is NOT a directory. That is > because sendmail is sending as mbox format. > > I have tried two lines of “mail_location” but that did not work. > example > mail_location = mdbox:~/mail > for dovecot > mail_location = mbox:INBOX=/var/mail/%u-> for sendmail No, that doesn't work: in fact, the second line will completely override the first. If you run 'doveconf -n' or 'doveconf mail_location' you will see that the first line doesn't have any effect. If you want to keep INBOX delivery to mboxes in /var/mail, you can do this using two namespaces. One points to mdbox:~/mail, and holds the users' ordinary IMAP folders in mdbox format, and the other has INBOX=/var/mail/%u and just holds the INBOX. There is an example in http://wiki2.dovecot.org/Namespaces of doing this with Maildir and mbox; adjusting it for mdbox shouldn't be hard. You will find you need a directory for each user to hold the other folders in the INBOX namespace, since Dovecot doesn't know there won't ever be any. This directory is also used to store Dovecot's index files for that namespace, and it should *not* be the same as the mdbox directory. According to http://wiki2.dovecot.org/MailLocation/mbox , you can skip this if you use location = mbox:/var/empty:INBOX=/var/mail/%u:INDEX=MEMORY (assuming /var/empty is a readonly root-owned empty directory), but since this tells Dovecot not to store index files on disk it may make INBOX access less efficient. If you use a real directory rather than /var/empty you may want to consider enabling the acl plugin and setting up a global ACL which prevents users from creating additional folders in the INBOX namespace. It's probably also a good idea to set mail_location = mdbox:~/mail and omit the location parameter from the mdbox namespace, since IIRC otherwise commands like 'doveadm purge' won't work correctly. > I have tried LMTP and dovecot-lda. If you want to deliver mail into the mdbox INBOX, and forget about /var/mail altogether, you will need to get one of these two working since Sendmail doesn't understand mdbox. This is probably the best option in the long run, unless you have other software which relies on mail being in /var/mail. If you pick this option you need to remove all references to /var/mail from dovecot.conf; with the two lines you had above Dovecot will simply carry on delivering into /var/mail just as Sendmail had been. > LMTP – I could not see any difference with this added or not. If you had configured Dovecot to deliver into /var/mail, that's hardly surprising. Otherwise, are you sure you were delivering mail to the LMTP server? If you were you should have seen entries in Dovecot's log file, and the delivered mail should have ended up with a Received header from the LMTP server. > Dovecot-lda – I have had issues getting it configured. What issues? If you were trying to get the LDA to deliver to /var/mail, it's possible you were running into permissions problems. The best solution is to deliver into the mdbox instead, or just leave Sendmail to deliver to /var/mail. > Sendmail changes > FEATURE(`local_procmail', > `/usr/libexec/dovecot/dovecot-lda',`/usr/libexec/dovecot/dovecot-lda > -d $u') > MODIFY_MAILER_FLAGS(`LOCAL', `-f') > MAILER(procmail)dnl I know nothing at all about Sendmail configuration, but going by the Dovecot wiki that looks correct. Are you sure mail for the appropriate users was actually getting routed through that mailer? What did you see in the logs (you need to check both Dovecot's and Sendmail's logs, wherever they may be). Ben
Re: [Dovecot] Vacation Notice Not Working
Hi, Happy new year to everyone on this list :) Ch Chai wrote: > >> >> When I try to active Vacation Notice using Egroupware, I can see > >> >> (.sieve) > >> >> generated in mail server. but not working. > >> > > >> > * Which sieve related lines can you see in your dovecot logfiles? > > You can find the log file locations by running: > > doveadm log find > * found this path when by run this command : doveadm log find > Debug: /var/log/dovecot-debug.log > Info: /var/log/dovecot-info.log > Warning: /var/log/dovecot.log > Error: /var/log/dovecot.log > Fatal: /var/log/dovecot.log So what can you find in /var/log/dovecot-info.log and /var/log/dovecot.log when a mail is delivered to the test account? > * When I vim /var/www/web1/user/(user name)/.dovecot.sieve ,it will point to > my sieve file e.g /var/www/web1/user/web1_test/sieve/test_felamimail.sieve Seems correct. Can you see any .dovecot.sieve.log in the same directory as .dovecot.sieve, there sieve related errors would be written, if any. > * I check back [test_felamimail.sieve] this line ( vacation :days 1 > :addresses ["t...@acelsys.com "] text: ) there is no space after .com, I > don't know why when I 1st time paste into egroupware it will add space for > me. I can send/receive mail, just can't activate Vacation Notice. Whats wrong > ? The vacation notice seems to be activated, but does not work. We will need some relevant logfile output and doveconf -n output as well as dovecot and pigeonhole version you are using, otherwise it will be difficult to help you. Regards Daniel -- https://plus.google.com/103021802792276734820
Re: [Dovecot] Dovecot Virtual Users with Sendmail
Thank you very much for the article. It was quite interesting. All thirteen pages! Unless somebody else posts that they've managed to get Sendmail to work with Dovecot virtual users, then I think your suggestion to look at a different MTA might just be the best route to take. Thank you again. I do appreciate it. I hope you have a happy new year! -- All year long!! fp On Dec 31, 2012, at 12:14 PM, Ken A wrote: > Dovecot has no problem with virtual users, but Sendmail's idea of > virtual users is not quite as 'virtual'. > > One possible solution: http://www.cs.fsu.edu/~langley/USVH-tr.pdf > That was 2007.. so perhaps somebody has written this up in a more > concise way.. > > or you can wrestle with ldap. :-( > > or switch MTAs. > > Ken A. > > On 12/30/2012 9:19 PM, dormitionsk...@hotmail.com wrote: >> I'm trying to get Dovecot working with Virtual Users and Sendmail on >> OpenIndiana 151a7. OpenIndiana is the Open Source continuation of >> OpenSolaris after Oracle tried to kill it off a couple of years ago shortly >> after acquiring Sun Microsystems. >> >> I'm not sure if this is so much a Dovecot problem, as much of a Sendmail >> problem. I thought this would probably be a better list to start with, >> though. If not, please let me know. >> >> I initially used this Dovecot wiki page to approach this: >> Simple Virtual User Installation >> >> http://wiki2.dovecot.org/HowTo/SimpleVirtualInstall >> >> I had to make few minor changes, but I don't think anything significant to >> the problem I'm having. >> >> I can log into SquirrelMail with both virtual users, and with system users. >> >> I can send mail to system users from both virtual and system users. >> >> I can see the mail that I sent in the Sent Messages folder for both types of >> users. >> >> I just can't send mail to virtual users. When I try to, I get the following >> message: >> >> ERROR: >> Message not sent. Server replied: >> Requested action not taken: mailbox unavailable >> 550 5.1.1 ... User unknown >> My configuration info is as follows: >> >> systemuser@openindiana:~# /usr/local/sbin/dovecot --version >> 2.1.12 >> >> systemuser@openindiana:~# /usr/local/sbin/dovecot -n >> # 2.1.12: /usr/local/etc/dovecot/dovecot.conf >> # OS: SunOS 5.11 i86pc >> auth_verbose = yes >> base_dir = /var/run/dovecot/ >> disable_plaintext_auth = no >> first_valid_uid = 101 >> info_log_path = /var/log/dovecot-info.log >> log_path = /var/log/dovecot.log >> mail_location = mbox:/home/vmail/%u/mail:INBOX=/var/mail/%u >> passdb { >> args = /usr/local/etc/dovecot/passwd >> driver = passwd-file >> } >> pop3_uidl_format = %g >> protocols = imap pop3 >> service auth { >> unix_listener auth-userdb { >>group = vmail >>mode = 0600 >>user = vmail >> } >> } >> ssl = no >> userdb { >> args = uid=vmail gid=vmail home=/home/vmail/%u >> driver = static >> } >> protocol lda { >> postmaster_address = systemuser@localhost >> } >> >> --- >> >> My dovecot password file looks something like this, though changed for >> obvious security reasons: >> >> systemuser:{PLAIN} systemuserPASS >> virtualuser1:{PLAIN}virtualuser1PASS >> virtualuser2:{PLAIN}virtualuser2PASS >> >> >> --- >> >> I read on this page that I needed to put the following in my sendmail >> dovecot.m4 file: >> >> Dovecot LDA with Sendmail >> http://wiki2.dovecot.org/LDA/Sendmail >> >> So this is my dovecot.m4 file, which shows up in my sendmail.cf file after >> recompiling my sendmail.mc file. >> >> ##*## >> ### DOVECOT Mailer specification ### >> ##*## >> Mdovecot, P=/usr/local/libexec/dovecot/dovecot-lda, F=DFMPhnu9, >> S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP, >> T=DNS/RFC822/X-Unix, >> A=/usr/local/libexec/dovecot/dovecot-lda -d $u >> >> >> --- >> >> Finally, this is my sendmail.mc file: >> >> divert(-1) >> # >> # Copyright (c) 1983 Eric P. Allman >> # Copyright (c) 1988, 1993 >> #The Regents of the University of California. All rights reserved. >> # >> # Copyright 2009 Sun Microsystems, Inc. All rights reserved. >> # Use is subject to license terms. >> # >> # This is a configuration file for SunOS 5.8 (a.k.a. Solaris 8) and later >> # subsidiary machines. It has support for local and SMTP mail. The >> # confFALLBACK_SMARTHOST macro is enabled, which means that messages will >> # be sent to that host (which is set to mailhost.$m [$m is the local >> domain]) >> # if MX records are unavailable. A short-cut rule is also defined, which >> # says if the recipient host is in the local domain, send to it directly >> # instead of the smart host. >> # >> # If you want to customize this further, copy it to a name appropriate >> # for your environment and do the modifications there. >> # >> >> divert(0)dnl >> VERSIONID(`sendmail.mc (Sun)') >> OSTYPE(`solaris8')dnl >> DOMAIN
[Dovecot] From Sendmail to Dovecot mdbox, what is missing.
Sendmail 8.14.4 dovecot 2.0.9 I have sendmail working and it is sending mail to /var/mail/%u. I have dovecot working in that I can move emails into IMAP folders and I can send email through IMAP. I have set up dovecot to use mdbox based on the following: mail_location = mdbox:~/mail However, I seem to be lacking a key piece of information. Sendmail is sending the mail to /var/mail/%u as a mbox (single file for all emails) format. Dovecot wants to read the mail in mdbox (Multiple messages per file, but unlike mbox multiple files per mailbox.) So the two programs are not working together. So, I cannot get dovecot to read new emails at /var/mail/%u. So I tried changing to the following: mail_location = mdbox:~/mail:INBOX=/var/mail/%u However, dovecot complains that it is NOT a directory. That is because sendmail is sending as mbox format. I have tried two lines of “mail_location” but that did not work. example mail_location = mdbox:~/mail > for dovecot mail_location = mbox:INBOX=/var/mail/%u-> for sendmail I have tried LMTP and dovecot-lda. LMTP – I could not see any difference with this added or not. Dovecot-lda – I have had issues getting it configured. Thanks for any help! Sendmail changes FEATURE(`local_procmail', `/usr/libexec/dovecot/dovecot-lda',`/usr/libexec/dovecot/dovecot-lda -d $u') MODIFY_MAILER_FLAGS(`LOCAL', `-f') MAILER(procmail)dnl Here is dovecot configuration [root@nala mail]# dovecot -n # 2.0.9: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-279.14.1.el6.x86_64 x86_64 Scientific Linux release 6.3 (Carbon) auth_mechanisms = plain login mail_gid = mail mail_location = mdbox:~/mail mail_uid = mail mbox_write_locks = fcntl passdb { driver = pam } plugin { mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename mail_log_group_events = yes } service auth { unix_listener auth-userdb { mode = 0600 user = mail } } service lmtp { inet_listener lmtp { address = 192.168.1.185 127.0.0.1 ::1 port = 24 } user = mail } ssl_cert =
Re: [Dovecot] Dovecot Virtual Users with Sendmail
Dovecot has no problem with virtual users, but Sendmail's idea of virtual users is not quite as 'virtual'. One possible solution: http://www.cs.fsu.edu/~langley/USVH-tr.pdf That was 2007.. so perhaps somebody has written this up in a more concise way.. or you can wrestle with ldap. :-( or switch MTAs. Ken A. On 12/30/2012 9:19 PM, dormitionsk...@hotmail.com wrote: > I'm trying to get Dovecot working with Virtual Users and Sendmail on > OpenIndiana 151a7. OpenIndiana is the Open Source continuation of > OpenSolaris after Oracle tried to kill it off a couple of years ago shortly > after acquiring Sun Microsystems. > > I'm not sure if this is so much a Dovecot problem, as much of a Sendmail > problem. I thought this would probably be a better list to start with, > though. If not, please let me know. > > I initially used this Dovecot wiki page to approach this: > Simple Virtual User Installation > > http://wiki2.dovecot.org/HowTo/SimpleVirtualInstall > > I had to make few minor changes, but I don't think anything significant to > the problem I'm having. > > I can log into SquirrelMail with both virtual users, and with system users. > > I can send mail to system users from both virtual and system users. > > I can see the mail that I sent in the Sent Messages folder for both types of > users. > > I just can't send mail to virtual users. When I try to, I get the following > message: > > ERROR: > Message not sent. Server replied: > Requested action not taken: mailbox unavailable > 550 5.1.1 ... User unknown > My configuration info is as follows: > > systemuser@openindiana:~# /usr/local/sbin/dovecot --version > 2.1.12 > > systemuser@openindiana:~# /usr/local/sbin/dovecot -n > # 2.1.12: /usr/local/etc/dovecot/dovecot.conf > # OS: SunOS 5.11 i86pc > auth_verbose = yes > base_dir = /var/run/dovecot/ > disable_plaintext_auth = no > first_valid_uid = 101 > info_log_path = /var/log/dovecot-info.log > log_path = /var/log/dovecot.log > mail_location = mbox:/home/vmail/%u/mail:INBOX=/var/mail/%u > passdb { > args = /usr/local/etc/dovecot/passwd > driver = passwd-file > } > pop3_uidl_format = %g > protocols = imap pop3 > service auth { > unix_listener auth-userdb { > group = vmail > mode = 0600 > user = vmail > } > } > ssl = no > userdb { > args = uid=vmail gid=vmail home=/home/vmail/%u > driver = static > } > protocol lda { > postmaster_address = systemuser@localhost > } > > --- > > My dovecot password file looks something like this, though changed for > obvious security reasons: > > systemuser:{PLAIN} systemuserPASS > virtualuser1:{PLAIN}virtualuser1PASS > virtualuser2:{PLAIN}virtualuser2PASS > > > --- > > I read on this page that I needed to put the following in my sendmail > dovecot.m4 file: > > Dovecot LDA with Sendmail > http://wiki2.dovecot.org/LDA/Sendmail > > So this is my dovecot.m4 file, which shows up in my sendmail.cf file after > recompiling my sendmail.mc file. > > ##*## > ### DOVECOT Mailer specification ### > ##*## > Mdovecot, P=/usr/local/libexec/dovecot/dovecot-lda, F=DFMPhnu9, > S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP, > T=DNS/RFC822/X-Unix, > A=/usr/local/libexec/dovecot/dovecot-lda -d $u > > > --- > > Finally, this is my sendmail.mc file: > > divert(-1) > # > # Copyright (c) 1983 Eric P. Allman > # Copyright (c) 1988, 1993 > # The Regents of the University of California. All rights reserved. > # > # Copyright 2009 Sun Microsystems, Inc. All rights reserved. > # Use is subject to license terms. > # > # This is a configuration file for SunOS 5.8 (a.k.a. Solaris 8) and later > # subsidiary machines. It has support for local and SMTP mail. The > # confFALLBACK_SMARTHOST macro is enabled, which means that messages will > # be sent to that host (which is set to mailhost.$m [$m is the local domain]) > # if MX records are unavailable. A short-cut rule is also defined, which > # says if the recipient host is in the local domain, send to it directly > # instead of the smart host. > # > # If you want to customize this further, copy it to a name appropriate > # for your environment and do the modifications there. > # > > divert(0)dnl > VERSIONID(`sendmail.mc (Sun)') > OSTYPE(`solaris8')dnl > DOMAIN(`solaris-generic')dnl > define(`confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnl > > define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl > FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl > > MAILER(`local')dnl > MAILER(`smtp')dnl > > MAILER(`procmail')dnl > MAILER(`dovecot')dnl > > > LOCAL_NET_CONFIG > R$* < @ $* .$m. > $* $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3 > > > --- > > I think it is obvious that it is a problem with Sendmail not recognizing > Dovecot's virtual users. But how do I fix it? > > If anyone could help me with t