Re: sieve problems (continued)
Bob Tito wrote: I replied to fast ;-( .. Forgot to restart imap, and for me the old problem is back again.. For now i'll go back to Christian's patch. Hmm...there is no big difference with Ken's patch. Its more a thing that I needed to change three files where only one was really needed to be changed. The change itself should be the same! Are you really shure Ken's patch does not work for you ? This is what I got during patching... patching file lmtp_sieve.c Hunk #1 FAILED at 830. Hunk #2 FAILED at 839. 2 out of 2 hunks FAILED -- saving rejects to file lmtp_sieve.c.rej ...I then added the lines by hand. Verifying my new diff again with Ken's patch shows no difference with it. -- Christian --- Cyrus Home Page: http://asg.web.cmu.edu/cyrus Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: sieve problems (continued)
Bob Tito wrote: Christian Schulte wrote: Bob Tito wrote: I replied to fast ;-( .. Forgot to restart imap, and for me the old problem is back again.. For now i'll go back to Christian's patch. Hmm...there is no big difference with Ken's patch. Its more a thing that I needed to change three files where only one was really needed to be changed. The change itself should be the same! Are you really shure Ken's patch does not work for you ? This is what I got during patching... patching file lmtp_sieve.c Hunk #1 FAILED at 830. Hunk #2 FAILED at 839. 2 out of 2 hunks FAILED -- saving rejects to file lmtp_sieve.c.rej ...I then added the lines by hand. Verifying my new diff again with Ken's patch shows no difference with it. Euh... ahum.. Same for me... but we also talked about doing things to early in the morning :-) It does seem to work here as well now .. Puh. It would have become quite interesting if it would not work now. -- Christian --- Cyrus Home Page: http://asg.web.cmu.edu/cyrus Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: sieve problems (continued)
Ken Murchison wrote: Please try this patch instead. I don't think we need to pass the namespace to run_sieve() as an additional argument since its already part of sieve_msgdata_t. Damn. Did not notice that. Applied the patch and it works. -- Christian --- Cyrus Home Page: http://asg.web.cmu.edu/cyrus Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: sieve problems (continued)
Bob Tito wrote: Christian Schulte wrote: Bob Tito wrote: Does the attached patch fix the problem ? At least it was reproduceable now and the patch fixed it here. Hi Christian, For starters it is good the hear that you are able to reproduce the problem... to finish it.. *IT WORKS* Thanks a lot!! But... bacause of the limited amount of people with this problem is very specific to my config ? Hi, its a general problem with unixhierarchysep and sieve fileinto for users with dots in theire names. The cause I did not notice it earlier was that I never really updated from 2.2.3 to 2.2.4 or 2.2.5. Starting with 2.2.3 I made a link from /usr/local/cyrus22 - /usr/local/cyrus2.2.3 so that I do not have to touch the configfiles for any updates but then just forgot to update the link to /usr/local/cyrus2.2.4 and /usr/local/cyrus2.2.5. Updating cyrus mainly is very early in the morning. That could explain that :-) The patch looks to me more like a workaround and just fixes the problem. Maybe Ken or Rob will come up with a much more elegant solution. -- Christian --- Cyrus Home Page: http://asg.web.cmu.edu/cyrus Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: sieve problems (continued)
Bob Tito wrote: Hi, For now cyrus-imapd-2.2.3 is the last version where sieve fileinto worked ;-( I have tried 2.2.4 and 2.2.5, both from the FreeBSD ports. I a NOT claiming the problem is in the source, it could also be a problem with the port, but i need some help putting my finger on it.. The portmaintainer did not have other complaints. using unixhierarchysep and altnamespace together. perl 5.8.2 also from the ports. The error is that the folder used with fileinto is not found, but when i switch back to 2.2.3 (no change in the configfiles) it works again. i also tried to change the foldername into INBOX.foldername and INBOX/foldername .. i *think* it might have something to do with altnamespace and/or unixhierarchysep, but .. i cannot tell for sure. Hi, I just wanted to mention that I was also using 2.2.3 with altnamespace and unixhierarchysep before. Updating to 2.2.4 and 2.2.5 did not make anything stop working. Fileinto works for me also with 2.2.4 and 2.2.5. The quota problem mentioned a few days ago with 2.2.4 also was not reproduceable here. You say that your problems go away when downgrading to 2.2.3 again. Please post your config so that I can see what may be the difference with my working setup since things here are totally un-reproduceable and I think there is a difference in the setup when things are working here but not working for you. -- Christian --- Cyrus Home Page: http://asg.web.cmu.edu/cyrus Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: sieve problems (continued)
Bob Tito wrote: Here's the config: configdirectory: /var/imap partition-default: /var/spool/imap unixhierarchysep: yes altnamespace: yes allowplaintext: yes quotawarn: 90 imapidlepoll: 60 admins: cyrus singleinstancestore: yes duplicatesuppression: yes sieveusehomedir: false sievedir: /var/imap/sieve sendmail: /usr/sbin/sendmail postmaster: postmaster sasl_mech_list: PLAIN LOGIN sasl_pwcheck_method: auxprop sasl_auxprop_plugin: sql sasl_password_format: crypt sasl_sql_user: someuser ;-) sasl_sql_passwd: somepassword ;-) sasl_sql_hostnames: localhost sasl_sql_database: mail sasl_sql_select: SELECT password FROM accountuser WHERE username = '%u' tls_cert_file: /var/imap/server.pem tls_key_file: /var/imap/server.pem tls_ca_file: /var/imap/server.pem tls_ca_path: /var/imap/server.pem lmtp_overquota_perm_failure: yes lmtp_over_quota_perm_failure: yes lmtp_downcase_rcpt: yes Does the attached patch fix the problem ? At least it was reproduceable now and the patch fixed it here. -- Christian --- cyrus-imapd-2.2.5.old/imap/lmtpd.c 2004-05-22 05:45:51.0 +0200 +++ cyrus-imapd-2.2.5/imap/lmtpd.c 2004-05-29 17:51:43.0 +0200 @@ -410,7 +410,8 @@ #ifdef USE_SIEVE mydata.cur_rcpt = n; - r = run_sieve(user, domain, mailbox, sieve_interp, mydata); + r = run_sieve(user, domain, mailbox, sieve_interp, mydata, + lmtpd_namespace); /* if there was no sieve script, or an error during execution, r is non-zero and we'll do normal delivery */ #else --- cyrus-imapd-2.2.5.old/imap/lmtp_sieve.c 2004-05-22 05:45:51.0 +0200 +++ cyrus-imapd-2.2.5/imap/lmtp_sieve.c 2004-05-29 17:54:44.0 +0200 @@ -821,7 +821,8 @@ } int run_sieve(const char *user, const char *domain, const char *mailbox, - sieve_interp_t *interp, sieve_msgdata_t *msgdata) + sieve_interp_t *interp, sieve_msgdata_t *msgdata, + struct namespace *lmtpd_namespace) { char fname[MAX_MAILBOX_PATH+1]; int r = 0; @@ -830,6 +831,7 @@ script_data_t *sdata = NULL; sieve_bytecode_t *bc = NULL; char userbuf[MAX_MAILBOX_NAME+1]; + char authuserbuf[MAX_MAILBOX_NAME +1]; sdata = (script_data_t *) xmalloc(sizeof(script_data_t)); @@ -838,9 +840,16 @@ strlcat(userbuf, @, sizeof(userbuf)); strlcat(userbuf, domain, sizeof(userbuf)); } +strlcpy(authuserbuf, userbuf, sizeof(authuserbuf)); + if (config_getswitch(IMAPOPT_UNIXHIERARCHYSEP)) { + mboxname_hiersep_toexternal(lmtpd_namespace, authuserbuf, + (domain ? +strcspn(authuserbuf, @) +: strlen(authuserbuf))); + } sdata-username = userbuf; sdata-mailboxname = mailbox; - sdata-authstate = auth_newstate(userbuf); + sdata-authstate = auth_newstate(authuserbuf); r = sieve_script_load(fname, bc); if (r == SIEVE_OK) { --- cyrus-imapd-2.2.5.old/imap/lmtp_sieve.h 2004-02-12 03:32:23.0 +0100 +++ cyrus-imapd-2.2.5/imap/lmtp_sieve.h 2004-05-29 17:51:25.0 +0200 @@ -70,6 +70,7 @@ sieve_interp_t *setup_sieve(void); int run_sieve(const char *user, const char *domain, const char *mailbox, - sieve_interp_t *interp, sieve_msgdata_t *mydata); + sieve_interp_t *interp, sieve_msgdata_t *mydata, + struct namespace *lmtpd_namespace); #endif /* LMTP_SIEVE_H */
Re: Fw: Re: Virtual domains, user@domain.com: Mailbox unknown
Am Donnerstag, 19. Februar 2004 16:09 schrieb Christopher Paluch: -Forwarded Message- From: Christopher Paluch [EMAIL PROTECTED] Sent: Feb 19, 2004 8:50 AM To: Mike O'Rourke [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: Virtual domains, [EMAIL PROTECTED]: Mailbox unknown [config] Again I ask, when I read Configuring Virtual Domains it says I don't have to specify multiple IP addresses. Is that correct or do I have to do that to get this to work? Thanks, Chris Paluch Virtual domain support does not require multiple IP addresses. Does sendmail reach to lmtpd and thus is lmtpd rejecting with User unknown or is it sendmail not talking lmtp ? What do telemetry logs say for lmtpd ? What happens in the output of sendmail started with -X ? man sendmail: -X logfile Log all traffic in and out of mailers in the indicated log file. This should only be used as a last resort for debugging mailer bugs. It will log a lot of data very quickly. And from cyrus' overview.html: log Directory The subdirectory log under the configuration directory permits administrators to keep protocol telemetry logs on a per-user basis. If a subdirectory of log exists with the same name as a user, the IMAP and POP3 servers will keep a telemetry log of protocol sessions authenticating as that user. The telemetry log is stored in the subdirectory with a filename of the server process-id and starts with the first command following authentication. -- Christian --- Home Page: http://asg.web.cmu.edu/cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: Fw: Re: Virtual domains, user@domain.com: Mailbox unknown
Am Donnerstag, 19. Februar 2004 17:00 schrieb Christopher Paluch: This is the output from the maillog: Feb 19 09:22:54 ecnsrc01 sendmail[4856]: i1JFMsuJ004856: to=[EMAIL PROTECTED], delay=00:00:00, xdelay=00:00:00, mailer=cyrusv2, pri=31408, relay=localhost [[UNIX: /var/imap/socket/lmtp]], dsn=5.1.1, stat=User unknown Feb 19 09:22:54 ecnsrc01 sendmail[4856]: i1JFMsuJ004856: i1JFMsuK004856: return to sender: User unknown From this I assumed it was getting to Cyrus and he was rejecting it, but I will try your suggestions and see what else I can find. Thanks. /etc/mail/mailertable: test.com cyrusv2:/var/imap/socket/lmtp Maybe you want to also put your servers name in there as well ? Like ecnsrc01.rm.posnetservices.com cyrusv2:/var/imap/socket/lmtp After cm user/[EMAIL PROTECTED] root should be able to receive mail. Of course this depends on other things and is more a guess than a solution but may work. Do you also get User unknown for a mail delivery for [EMAIL PROTECTED] ? Does delivery in test.com domain work ? -- Christian --- Home Page: http://asg.web.cmu.edu/cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: CYRUS = GARBAGE
Am Dienstag, 3. Februar 2004 10:50 schrieb Simon Matter: Am Dienstag, 3. Februar 2004 01:53 schrieb Edward Rudd: That's not correct.. You can use mysql and have accounts automatically created.. If you install the autocreate patches.. http://email.uoa.gr/download/cyrus/cyrus-imapd-2.2.3/ I think you do not need to even patch 2.2.3 for this to work! For 'createonpost' and 'createonlogin', you need the patch AFAIK. I've included them in my rpms and they work pretty well. Simon I just took a look at the patches and I am wondering if they could replace the autocreatequota: option which I am using right now. Do these patches support creation of initial quota on user inboxes ? Just curious. -- Christian
Re: Kill this thread, it shouldn't have been one ( was: Re: CYRUS = ....)
Am Dienstag, 3. Februar 2004 15:53 schrieb Peter P. Benac: I did mention the Documents could use a bit more polish, and Ken has asked me to update the documents with the issues I had and how I overcame them. I will do this, and I challenge each of you to do the same thing. And that is the way it should be! There are so many different approaches on setting up cyrus that you really cannot ask the cyrus developers to write documentation for each. Btw. Show me a list on which someone gets answers although he is totally inpolite like David! He got answers! Unbelievable! If these solutions were put into print or FAQ format then perhaps David wouldn't have to be so angry and the stupid questions that nobody wants to answer will have a place to be sent. The problem with David is that he did not mention one single argument why he thinks cyrus is garbage! Only saying cyrus is garbage because I say so is not really an argumentation. I would not ask a MySQL developer to make his database administrateable via IMAP but that's exactly what he is asking for. Administration of cyrus only via SQL ? Sounds totally incorrect for me. Of course the correct way in his particular situation would be to add user inboxes to cyrus via IMAP and then let cyrus add the users to the SQL database automatically with some default password. Of cou I for one would love to be able to use a SQL like MySQL to backend this software. Backend the mailboxes.db in a SQL database ? There are threads on the list which explain why this is not a good idea, I think. I don't have a problem with Berkeley DB, but I know MySQL, Oracle, and Postgres to whole lot better. If I knew which routines actually did the database work I don't think I'd have much trouble converting them to use an SQL. It would save me a ton of time if these routines were documented. I understand that developers who write really well documented sourcecode are not very pleased to write the same documentation again only putting it in files not ending in .h or .c replacing C-code with spoken-language! Did you take a look at the sourcecode ? Would you say that it is not well documented ? Nearly all problems can be solved by looking at the sources. I agree that for only doing a basic cyrus setup you do not want to have to read sourcecode but then I would suggest using pre-compiled packages appropriate for your system. Why do you want to compile it yourself if you do not want to change anything with it ? If you say that you would not have much trouble in converting the existing routines to use a SQL database then I must say that you should be able to figure out which routines that are. This mainly ends up in not wanting to change anything :-) ! -- Christian
Re: [POLL] Cyrus 2.2 virtdomains behavior (Was: global admin without defaultdomain?)
Am Mittwoch, 31. Dezember 2003 02:47 schrieb Jure Pear: On Tue, 30 Dec 2003 13:33:37 -0500 Ken Murchison [EMAIL PROTECTED] wrote: Its not a problem to implement it. I'd like to get some more discussion on how the two methods can/should interact. Let me share my point of view: virtdomains=off: server accepts authenticates usernames without @domain on any interface it is configured to listen on. this is basically the 2.1 behaviour, so let say the handling of [EMAIL PROTECTED] kind of usernames is undefined (because there were some early 3rd party patches to handle them). admin is only one, so no need for global admins. Handling of [EMAIL PROTECTED] kind of usernames is defined by: loginrealms: empty string The list of remote realms whose users may log in using cross-realm authentications. Seperate each realm name by a space. (A cross-realm identity is considered any identity returned by SASL with an @ in it.) So every fully-qualified username gets its @domain part stripped no matter what it contains if its mentioned in loginrealms otherwise the username is rejected. This makes @domain logins possible without the need for virtdomains so that someone planning to migrate to virtdomains already has fully qualified usernames in use which will make things easier during the update. virtomains=userid server server accepts authenticates usernames without @domain on any interface it is configured to listen on only if the defaultdomain is set... All unqualified usernames are treated as @defaultdomain. Usernames @loginrealms are also treated as @defaultdomain (@loginrealms part gets also stripped to un-qualify the userid) ? without defaultdomain server accepts authenticates only usernames in the form [EMAIL PROTECTED], where domain specifies the hirearchy tree the user belongs to. global admin should be specified without the @domain and admin users with @domain should only have rights over their domain tree. Here the only existing un-qualified usernames are global admins ? loginrealms has no effect ? virtdomains=ipaddr (or something) here we need to teach server the ip-domain mapping. reverse dns? most likely. server accepts authenticates usernames without @domain on appropriate interfaces (ip adresses) and it searches for username only in the domain the ip adress the user is coming from belongs. [EMAIL PROTECTED] usernames should be rejected IMHO. global admin should be specified without the @domain and authenticated on any ip address. per domain admin users should be specified with @domain and should only authenticate when coming to the right ip address... ...where they will login with an un-qualified username. Completely no @domain usernames nowhere but in the admins line. loginrealms also has no effect ? How are loginrealms handled if virtdomain-support gets enabled when it was in use before without virtdomains ? -- Christian
Re: global admin without defaultdomain?
Kendrick Vargas schrieb: Well, I gave you all the details about my setup. Please tell me what it'll take to convince you that my setup isn't screwed (at least from my end). -peace man getnameinfo: FILES /etc/hosts /etc/nsswitch.conf /etc/resolv.conf It all mainly depends on getnameinfo() returning a fully qualified hostname so that a domain-part exists for further processing. Somewhere after getnameinfo() the hostpart will get stripped and that only works if getnameinfo() returns a fully qualified hostname and not just a unqualified name like localhost. So if getnameinfo returns localhost.somedomain.com for your locally bound imapd and outside.somedomain.com for your public accessible imapd everything should be fine if you have defaultdomain: somedomain.com Btw. did you try commenting out the servername option in your imapd.conf ? Would that change the mysql-queries to other lookups ? I just saw that you are using auxprop mysql and I remember now that auxprop mysql sets the domain to the servername for unqualified users for the lookup if you have %r somewhere in sasl_mysql_statement (that is /etc/hostname or the servername option in imapd.conf for me) ! So how does your sasl_mysql_statement config look like exactly ? Does it contain %r ? Does the value substituted for %r for _unqualified_ users match your defaultdomain :-) ? What happens if you set servername: somedomain.com (which looks incorrect but could make things work here...definetly breaks with murder however...) in imapd.conf ? At the point you are using %r there are not any unqualified users anywhere and %r gets the servername automatically for unqualified users! Will the default-servername used by cyrus be fully qualified or not (/etc/hostname I think) ? Do you have nsswitch.conf setup to use /etc/hosts ? At least there seems to not be a ptr record for the IP of toy.hudat.com in DNS but that may be ignored if getnameinfo() honours your local configuration. I bet you also ran into the auxprop mysql %r thing here just like me. I remember there was something confusing with %r and global admin/defaultdomain. At least it was my problem that days and took me hours to figure out :-) -- Christian
Re: global admin without defaultdomain?
Kendrick Vargas schrieb: On Fri, 26 Dec 2003, Christian Schulte wrote: Kendrick Vargas schrieb: I tried adding defaultdomain: fakedomain.com and even setting servername: fakedomain.com without it making a difference. Any other suggestions? I have servername: imap.somename.com admins: someadmin and no default domain! If I login as someadmin mysql auxprop plugin will query for [EMAIL PROTECTED] and after authentication this will be the global admin someadmin from the admins line with all rights. This tends to go against the docs (as well as what everyone else is saying). However, I decided to try it, and it just doesn't work for me. I can log in as the user, but I can't create miscellaneous mailboxes. Which server version are you using? I'm on 2.2.2-BETA. -peace The imapd with which I do this is bound to localhost 127.0.0.1 and there this works. You are right that if I change it to bind to a public accessible interface it does not work anymore for some reason. When I change it to a public interface login-lookups will be done by the domain of the reverse-dns domain from that interface or taken from the servername configuration if no lookup succeedes. For me the servername directive played a role and I think /etc/hostname also had influence here if it is not fully qualified (mainly running hostname did not show a domain) ! Say if I bind imapd to 1.2.3.4 and reverse-dns tells 1.2.3.4 has name imap.somedomain.com the lookup will be done to [EMAIL PROTECTED] for unqualified logins (host gets stripped). If 1.2.3.4 reverse-dns name would be something unqualified so that the host-name stripping mechanism cannot correctly construct the domain, behaviour again changes but I do not remember what then happens exactly. I really tried a lot to get global admin rights from the outside one year ago. I ran the relevant code under gdb many times trying to understand what exactly changes if connections do not come from localhost anymore and I remember I somehow could prove that nobody ever will be able to get global admin rights from the outside for me. At this point I somehow liked the possibility to not let a global admin login when not connecting to localhost for security reasons that much that I did not want to change that behaviour anymore :-) Since you enabled virtdomains why do you still want unqualified logins if not due upgrading reasons from an old installation with unqualified logins ? This all only has to do with unqualified logins which I do not want/need except for the global admin. If someone plans on changing the behaviour with the global admin and defaultdomain I would really like to keep the ability to not let a global admin in if not connecting to localhost and of course there should be a note about the change so that next time updating cyrus I do not open up a security hole I spent hours to prove that its greatly closed and safe :-) -- Christian
Re: more virtual domain funnyness
Kendrick Vargas schrieb: Hi folks, Ok, Igor, Ken, you both must be growing to hate me, but I'm starting to understand the present need for the defaultdomain paramater. I'm sorry :-) I have a question. Lets say I have a realm example.com and I have the defaultdomain paramater set to example.com, and I also have domain.com and otherdomain.com on the system. Now, lets say I have cyrus users in each of those realms, and lets say I have the admins paramater set to cyrus. Will the cyrus user from any of those domains be able to administrate the system, or will it just be the one from the default domain? It should be only the unqualified cyrus user specified in the admins line which can administrate the system. How the login of this unqualified userid looks like is determined by defaultdomain setting and by reverse-dns or servername. Try it out. All others are normal mailboxes [EMAIL PROTECTED] without any admin rights. I'm starting to think that maybe there should be two different paramaters, admins (analogous to domain admins) and globaladmins (global admins) to allow more explicit declaration of who has which rights. Why ? You can simply specifiy userids in the admins line. Unqualified userids are global admins and fully-qualified userids only have admin rights in theire domain. I do not know if [EMAIL PROTECTED] also is a global admin...logging in as [EMAIL PROTECTED] will lead to defaultdomain getting stripped, I think, so that [EMAIL PROTECTED] in the admins line will not work with defaultdomain beeing set to defaultdomain but I did not test that. -- Christian
Re: global admin without defaultdomain?
Kendrick Vargas schrieb: I tried adding defaultdomain: fakedomain.com and even setting servername: fakedomain.com without it making a difference. Any other suggestions? I have servername: imap.somename.com admins: someadmin and no default domain! If I login as someadmin mysql auxprop plugin will query for [EMAIL PROTECTED] and after authentication this will be the global admin someadmin from the admins line with all rights. -- Christian
Re: problem sending mail to shared mailbox
Erik Myllymaki schrieb: I created a shared mailbox but I cannot send mail to it. I get [EMAIL PROTECTED] 550 Unknown User? Is this a message from the MTA or from lmtpd ? cyradmcm bblist1 If you are using 2.2 this will create a shared folder in the defaultdomain which then does not seem to be example.com. So in 2.2 you would have to cm [EMAIL PROTECTED] for it to work. -- Christian
Re: auxprop mysql plugin
Try: pwcheck_method: auxprop auxprop_plugin: mysql mysql_hostnames: localhost mysql_user: db_user mysql_passwd: db_pass mysql_database: db_name mysql_statement: (as above) At least for recent versions of sasl2. MfG, Ulrich Hi, For sasl-2.1.17 it should look different, I think. This only works when linking cyrus to sasl dynamically for me. When I try to link cyrus --with-staticsasl as I did before with sasl-2.1.15 (which works out of the box), no matter what I do, it won't find auxprop sql which it finds if the plugins exist in /usr/lib/sasl2 what I do not want (that's why I do it statically). I already checked if there are any missing symbols in the binaries (..there seem to be...) and even doing it like -Wl,-whole-archive /bla/libsasl2.a -Wl,-no-whole-archive in the link, which adds the missing sql_auxprop_* symbols to the resulting binaries, does not solve this. pwcheck_method: auxprop auxprop_plugin: sql sql_engine: mysql sql_hostnames: localhost sql_user: db_user sql_passwd: db_pass sql_database: db_name sql_select: (as above) -- Christian
Re: auxprop mysql plugin
This accidentely went off to cyrus instead of sasl list...
Re: Mailbox hierarchy separator for MUPDATE ?
Etienne Goyer schrieb: Hi, What I conclude is that the '.' is always the hierarchy separator, whatever the value of unixhierarchysep is. If this is true, does that mean that it is not legal to have mailbox name with '.' in them in Cyrus Murder ? No! This is possible. From doc/altnamespace.html: ... When the UNIX hierarchy convention is used, the . character MAY be used in mailbox names, including user names. In order to maintain backwards compatibility with the internal namespace, all . characters are translated to a benign character (currently ^) before any data is stored to disk. For example, if user elmer.fudd had a personal rabbit.holes mailbox, it would be stored as user.elmer^fud.rabbit^holes in the internal namespace. It is important to remember this phenomenon if/when reverting back to the netnews hierarchy convention. ... Do you have altnamespace set also ? Would that change anything for you turning it on/off ? Keep in mind that in a murder, all single installations have to have the same settings for unixhierarchysep and altnamespace. You cannot set unixhierarchysep: no on the backend but yes on mupdate-master or the frontend. -- Christian
Re: Return permanent failure on quota
Ramprasad A Padmanabhan wrote: I want to bounce back mails immediately if the mailbox quota is exceeded. Can I do this with just some parameter change Thanks Ram Enable lmtp_over_quota_perm_failure: 1 in imapd.conf. --Christian
Re: [QUESTION] Per-user altnamespace
Ken Murchison wrote: Does anybody see the need or usefulness for allowing users to select their own namespace (altnamespace on/off)? I can implement this pretty trivially in v2.2 with a private mailbox annotation on the user's INBOX, but I'm not going to bother unless people will use it. How would that incorporate with sieve ? Would it break things with e.g. avelsieve or websieve ? --Christian
Re: RE : RE : Problem moving mailboxes under murder
Luc Germain schrieb: Actually, I'm pretty sure this has been fixed in 2.1.14 (now that I've done the research and couldn't come up with a code path that would cause this ;-). Could you try the new version and let me know? I installed 2.1.14 on all servers in the murder, and now I can successfully do a rename of a user between the backend servers (good!) BUT only if the user doesn't have subdirectories in his mailbox. Are the changes from 2.1.13 to 2.1.14 also in 2.2-cvs ? I setup a test-murder with two backends, one frontend and one mupdate-master. Everything seems to work except renaming/transferring mailboxes with similar behaviour. cyradm on the frontend (this is unchanged; its a test-setup): frontendlm user/test/Folder1/Folder2/[EMAIL PROTECTED] (\HasNoChildren) user/test/Folder1/[EMAIL PROTECTED] (\HasChildren) user/test/[EMAIL PROTECTED] (\HasChildren) user/[EMAIL PROTECTED] (\HasNoChildren) user/[EMAIL PROTECTED] (\HasChildren) user/[EMAIL PROTECTED] frontendrename user/[EMAIL PROTECTED] user/[EMAIL PROTECTED] linux2 renamemailbox: Mailbox does not exist frontendrename user/[EMAIL PROTECTED] user/[EMAIL PROTECTED] linux2!default renamemailbox: Mailbox does not exist frontendxfermailbox user/[EMAIL PROTECTED] linux2 xfermailbox: Unrecognized command frontend cyradm on the first backend: linux1lm user/test/Folder1/Folder2/[EMAIL PROTECTED] (\HasNoChildren) user/test/Folder1/[EMAIL PROTECTED] (\HasChildren) user/test/[EMAIL PROTECTED] (\HasChildren) user/[EMAIL PROTECTED] (\HasNoChildren) user/[EMAIL PROTECTED] (\HasChildren) linux1rename user/[EMAIL PROTECTED] user/[EMAIL PROTECTED] linux2 renamemailbox: Unknown/invalid partition linux1xfer user/[EMAIL PROTECTED] linux2 xfermailbox: Mailbox does not exist cyradm on the second backend: linux2lm user/[EMAIL PROTECTED] (\HasNoChildren) linux2rename user/[EMAIL PROTECTED] user/[EMAIL PROTECTED] linux1 renamemailbox: Unknown/invalid partition linux2xfer user/[EMAIL PROTECTED] linux1 xfermailbox: Mailbox does not exist I have allowusermoves: 1 in all imapd.conf files and virtual domain support and altnamespace and unixhierarchysep all turned on. What could be the problem ? All servers authenticate against each other as a global admin using auxprop mysql and everything else seems to work as expected but xfer and rename! Renaming a mailbox without moving it to another server also works: linux1rename user/[EMAIL PROTECTED] user/[EMAIL PROTECTED] linux1lm user/another-name/Folder1/Folder2/[EMAIL PROTECTED] (\HasNoChildren) user/another-name/Folder1/[EMAIL PROTECTED] (\HasChildren) user/another-name/[EMAIL PROTECTED] (\HasChildren) user/[EMAIL PROTECTED] (\HasChildren) user/[EMAIL PROTECTED] (\HasNoChildren) linux1rename user/[EMAIL PROTECTED] user/[EMAIL PROTECTED] linux1lm user/another-name/Folder1/Folder2/[EMAIL PROTECTED] (\HasNoChildren) user/another-name/Folder1/[EMAIL PROTECTED] (\HasChildren) user/another-name/[EMAIL PROTECTED] (\HasChildren) user/[EMAIL PROTECTED] (\HasChildren) user/[EMAIL PROTECTED] (\HasNoChildren) --Christian -- cyrus Mon Sep 22 16:50:28 2003 10642422284 RLIST 1064242228* LIST (\Noselect) / 4 OK Completed 10642422305 RLIST * 1064242230* LIST (\HasChildren) / user/[EMAIL PROTECTED] * LIST (\HasChildren) / user/test/[EMAIL PROTECTED] * LIST (\HasChildren) / user/test/Folder1/[EMAIL PROTECTED] * LIST (\HasNoChildren) / user/test/Folder1/Folder2/[EMAIL PROTECTED] * LIST (\HasNoChildren) / user/[EMAIL PROTECTED] * LIST (\HasNoChildren) / user/[EMAIL PROTECTED] 5 OK Completed 10642422836 RENAME user/[EMAIL PROTECTED] user/[EMAIL PROTECTED] linux2 10642422836 NO Mailbox does not exist 10642422997 RENAME user/[EMAIL PROTECTED] user/[EMAIL PROTECTED] linux2!default 10642422997 NO Mailbox does not exist 10642423078 XFER user/[EMAIL PROTECTED] linux2 10642423078 BAD Unrecognized command 10642423169 XFER user/[EMAIL PROTECTED] linux2!default 10642423169 BAD Unrecognized command -- cyrus Mon Sep 22 16:51:07 2003 1064242267C1 Capability 1064242267* CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ MAILBOX-REFERRALS NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE IDLE LOGINDISABLED MUPDATE=mupdate://192.168.1.56/ LISTEXT LIST-SUBSCRIBED X-NETSCAPE C1 OK Completed 10642422676 XFER {17+} user/[EMAIL PROTECTED] {6+} linux2 10642422676 NO Mailbox does not exist 10642422827 XFER {17+} user/[EMAIL PROTECTED] {6+} linux2 {7+} default 10642422827 NO Mailbox does not exist 1064242300Q01 LOGOUT 1064242301* BYE LOGOUT received Q01 OK Completed
Re: RE : RE : Problem moving mailboxes under murder
Christian Schulte schrieb: Are the changes from 2.1.13 to 2.1.14 also in 2.2-cvs ? I setup a test-murder with two backends, one frontend and one mupdate-master. Everything seems to work except renaming/transferring mailboxes with similar behaviour. Could it be that in imapd.c = function cmd_xfer() it should call mboxname_tointernal() instead of mboxname_hiersep_tointernal() ? The problem seems to be that imapd does not correctly transform the mailbox-name to the internal representation in cmd_xfer() and thus mlookup fails to find a mailbox like [EMAIL PROTECTED] There seems to be 'confusion' in imapd.c when to call mboxname_tointernal() and when mboxname_hiersep_tointernal() ! Could it also be that nearly any call to mboxname_hiersep_tointernal() could be replaced with mboxname_tointernal() in imapd.c ? I did not recompile the whole installation right now but I could bet that this causes my problems during rename and xfer somewhere (at least in cmd_xfer)... --Christian
Re: Conditional unixhierarchysep ?
Jason Fesler schrieb: Is it possible to, for some clients, have unixhierarchysep be enabled, but not touch other clients? I only have one single machine for testing, and I'm loathe to change things on everyone without testing things out myself (specifically, the user pain of migration). Alternately, can this be done on a per instance of imapd basis, ie on a different port number? Why not simply add another imapd on another port in cyrus.conf which gets its own imapd.conf file with the -C option ? --Christian
connecting to localhost or outside-IP makes difference with global admins ?
I have a question regarding cyrus 2.2 and virtual-domains turned on. It seems that the behaviour of how global admins get authenticated changed somehow. Connecting with cyradm to localhost (cyradm localhost) =auxprop mysql will lookup the domain with the fqdn of the server Connecting with cyradm to IP (cyradm real-outside-ip) =auxprop mysql will lookup the domain with the host-name stripped off of the fqdn Why ? I did not set defaultdomain in imapd.conf but even changing anything with it does not change that behaviour. I am pretty shure this got changed a few weeks ago because it worked before no matter to where cyradm connected. How can I get the old behaviour back so that I do not have to maintain two different rows in the usertable one with the fqdn and another with the stripped-host-from-fqdn domain ? --Christian imapd.conf: configdirectory: /var/imap partition-default: /var/spool/imap sievedir: /var/spool/sieve servername: host.domain.tld admins: admin #defaultdomain: host.domain.tld (gets stripped to just domain.tld during authentication if connecting to the outside IP but not if connecting to localhost with cyradm) Its commented out for me. Is that correct ? sasl_pwcheck_method: auxprop sasl_auxprop_plugin: mysql sasl_allowanonymouslogin: no sasl_allowplaintext: yes (Currently Outlook stops working for me if I set it to 'no'. Other clients I tested supported DIGEST-MD5 and CRAM-MD5 correctly and so I think its an OE-issue...) sasl_mech_list: PLAIN LOGIN CRAM-MD5 DIGEST-MD5 ---snip--- sasl_mysql_statement: select password from SASLUser where login='%u' and domain='%r' and IMAP='YES' connecting to localhost the query will be like: select password from SASLUser where login='admin' and domain='host.domain.tld' connecting to the outside IP (even from localhost) the query will be like: select password from SASLUser where login='admin' and domain='domain.tld' and IMAP='YES' --snip idlesocket: /var/imap/socket/idle unixhierarchysep: yes virtdomains: yes altnamespace: on unix_group_enable: 0 imapidresponse: no logtimestamps: 1 lmtp_over_quota_perm_failure: 1 autocreatequota: -1 timeout: 15 notifysocket: /var/imap/socket/notify
imtest -z ?
What are good results for imtest -z ? I get took 10 seconds and I think this is awfully slow. Is it ? --Christian
Re: connecting to localhost or outside-IP makes difference with global admins ?
Am Sonntag, 14. September 2003 15:12 schrieb Ken Murchison: I haven't touched the virtdomain code in weeks/months. My guess is that something in the SASL SQL plugin changed, or something in your DNS changed. The thing is I did not use cyradm for a longer time and using it the way I used to use it does not work any more if not connecting to localhost... It took quite some time to figure out what is going on and I definetly can reproduce the behaviour which somehow is confusing. I can live with having to connect locally :-) DNS did not change and SASL also did not change because I use the debian sasl2 packages by Henrique which havent changed since I started using them. The only thing I compile myself is cyrus-2.2 from cvs and so something therein must have changed somehow OR maybe I used to cyradm localhost before and never did cyradm outside-ip-address so that I did not notice this behaviour earlier. Also there are no patches applied to the cvs sources. This all makes me think that something is really broken with my installation. Everything works. Even cyradm works if I add a second admin-user into the mysql-table for beeing able to cyradm ip-address but it is annoying somehow that after not using cyradm for a longer time I first have to debug my installation for hours just to be able to create a new mailbox which took less than a minute before... Do you think there is something wrong with my installation ? As said: Everything works (seems to) except cyradm ip-address instead of cyradm localhost with this strange behaviour which definetly is reproducable ! I am using libsasl2-modules-mysql 2.1.15-0.woody.5.0 on the system. --Christian
Re: cvt_cyrusdb_all
Am Mittwoch, 6. August 2003 00:31 schrieb Norman Zhang: Hi, After installing cyrus-imapd, I was prompted to convert the /var/lib/imap/mailboxes.db. But I get the following error not being able convert db3 to flat. Would someone please tell me how can I fix this? Regards, Norman [EMAIL PROTECTED] root]# rpm -Uvh cyrus-imapd-2.1.13-1mdk.i586.rpm Preparing...###[100%] 1:cyrus-imapd ###[100%] This is the first time that this package is being installed but there's an existing /var/lib/imap/mailboxes.db file so it's not possible to know if the current configuration of the various cyrus databases corresponds to the compiled in options. Please BACK UP your configuration and spool directory and run the /usr/lib/cyrus-imapd/cvt_cyrusdb_all utility. Remember to assign a password to user cyrus in order to administer the server. [EMAIL PROTECTED] root]# /usr/lib/cyrus-imapd/cvt_cyrusdb_all chmod: changing permissions of `/var/lib/imap/tmp': Operation not permitted -bash: line 1: cd: /root: Permission denied file: Using regular magic file `/usr/share/cyrus-imapd/rpm/magic' Converting from /var/lib/imap/mailboxes.db (db3) to /var/lib/imap/mailboxes.db.flat (flat) fatal error: can't initialize old database ERROR: unable to convert /var/lib/imap/mailboxes.db from db3 to flat file: Using regular magic file `/usr/share/cyrus-imapd/rpm/magic' Maybe you have to run cvt_cyrusdb_all as the cyrus user ? --Christian
Re: Remote Client Access
My users and aliases, with passwords, are stored in MySQL and retrieved by PAM with SASL. I believe this is the an error with my PAM or SASL, but I wanted to make sure I had configured the remote clients correctly. Thanks! David W Why not simply use SASL auxprop mysql bypassing PAM ? In my imapd.conf: sasl_pwcheck_method: auxprop sasl_auxprop_plugin: mysql sasl_allowanonymouslogin: no sasl_allowplaintext: yes sasl_mech_list: PLAIN LOGIN sasl_mysql_user: a user sasl_mysql_passwd: a password sasl_mysql_hostnames: localhost sasl_mysql_database: a database name sasl_mysql_statement: select password from users where login='%u' and domain='%r' --Christian
Re: creating users
Am Dienstag, 12. August 2003 02:58 schrieb Ken Murchison: Christian Schulte wrote: Am Montag, 11. August 2003 23:50 schrieb Norman Zhang: Hi, I'm a little confused on the process of creating users. First I su cyrus then I typed the following commands, cyradm localhost cm user.joebob quit exit (back as root) saslpasswd joebob Now does joebob require an account on my Linux box? That depends on how you configured SASL! If you use PAM with SASL yes otherwise you should not need to. Why would PAM require him to have local user accounts? I use PAM and don't have local accounts. You are right! After re-reading several parts of documentation I am pretty shure I totally misunderstood PAM ;-) It does not require him to use local accounts but enables the possibility to do so. Btw: I am using auxprop mysql. How do I have to create the shared secrets in mysql database for CRAM-MD5 and DIGEST-MD5 correctly (the values for the cmusaslsecret fields) ? For cmusaslsecretPLAIN everything works fine. I tried mysql MD5() function but I think the secrets cannot be produced by some mysql function and need special processing. Any pointers ? --Christian
Re: creating users
Am Montag, 11. August 2003 23:50 schrieb Norman Zhang: Hi, I'm a little confused on the process of creating users. First I su cyrus then I typed the following commands, cyradm localhost cm user.joebob quit exit (back as root) saslpasswd joebob Now does joebob require an account on my Linux box? That depends on how you configured SASL! If you use PAM with SASL yes otherwise you should not need to. Also if the email address for joebob is [EMAIL PROTECTED], do I use postfix alias mapping to pass mail to joebob? Just another solution which should work. To allow users' to change password on their own do I need web-cyradm? Also depends on how you configured SASL. Its mainly a question of where you store your user accounts. If e.g. using auxprop mysql you could easily use a squirrelmail plugin which knows how to update your database. But that really depends on your setup! --Christian
Re: Could not complete request over quota errors
Am Mittwoch, 6. August 2003 01:12 schrieb John Wade: diff index.c index.c.org 1220,1228c1220 /* next lines changed to allow copy to Trash when usr over quota */ /* jwidera jwade 6/27/03 lets users move to Trash when over quota */ if ( strstr(name,.Trash) ) { r = append_setup(append_mailbox, name, MAILBOX_FORMAT_NORMAL, imapd_userid, imapd_authstate, ACL_INSERT, -1); } else { r = append_setup(append_mailbox, name, MAILBOX_FORMAT_NORMAL, --- r = append_setup(append_mailbox, name, MAILBOX_FORMAT_NORMAL, 1230d1221 } Does it support unixhierarchysep ? Can you tell me the difference to just setting an infinite quota on the trash folder ? What do you win with it ? I cannot see any improvement to what is possible with quota... If you would set an infinite quota on the trash folder, whouldn't that behave exactly the same ? --Christian
Re: Could not complete request over quota errors
according the rfc: Each mailbox has zero or more implementation-defined named quota roots. Each quota root has zero or more resource limits. All mailboxes that share the same named quota root share the resource limits of the quota root. that make me think that INBOX and INBOX.Trash share the same named quota as long as you only have a quota set on INBOX (that is only one quota-root for the complete account-hierarchy at toplevel) and therefor raising the quota on inbox.Trash doesn't help. It does! It sets a new root for all folders under inbox.Trash and inbox.Trash itself overwriting the quota-root set one level higher on inbox! But to come back to the QUOTA idea. It's probably not a good idea. Much better would be to write an RFC for IMAP MOVE. But that's discussed before if I'm correct. Setting a quota-root explicitly on the trash folder solves your problem! You could even set the quota of inbox.Trash to 0 which means infinite. --Christian
Re: Newbie Cyrus Configuration
Am Samstag, 26. Juli 2003 21:16 schrieb Norris Ward: Hi all, I am new to cyrus imap but I can navigate my way around RedHat 7.3 fairly well. I want to reconfigure my email server away from imap-2001. Where does cyrus-imap store its config files? /etc/imapd.conf and /etc/cyrus.conf. This may differ in the distributions. man imapd.conf and man cyrus.conf should work. can cyrus read the pam_db of my system to authenticate users that already exist? Yes. You can use saslauthd to do so. If you do not need your PAM accounts for other services on the system I suggest migrating them completely to some SASL store. Maybe re-creating them in some mysql-database und setting up SASL to use auxprop mysql. Of course you will need plain-text passwords in your existing PAM store to be able to do so... Also can cyrus be configured to store users mail files in their ~home dirs? No! The concept of cyrus is to maintain its own mail-spool making it possible to separate email-users from system-accounts. Sieve may lookup user scripts in homedirs however... --Christian
Contacts and ANNOTATEMORE ? WAS: Is it possible to store user contact/ address book in imap server?
Hello, I just wonder if the ANNOTATEMORE extension could be used for something like that. After reading the RFC I know that an annotation is available for every single mailbox/folder but why not store the users contacts and addresses as an annotation in the users INBOX? Any reasons why not do that? Are there any limits in size for an annotation? --Christian
Re: Danish Charset 8859-15
Am Montag, 30. Juni 2003 19:38 schrieb Kristian Søgaard: Hi. I just noticed it is only mail that does not have ISO encoding in the subject field. So it is basically not a problem in Cyrus. (As some one surely would have told me soon enough :-) Can i change the default iso ? That is, if nothing is specified, then it would default to iso-8859-15. Kristian Maybe you can configure your MTA to do exactly that! In sendmail add the following lines to sendmail.mc: define(`confSEVEN_BIT_INPUT', `false')dnl define(`confEIGHT_BIT_HANDLING', `mime')dnl define(`confDEF_CHAR_SET', `iso-8859-15')dnl --Christian
Re: problems with imap and imsp installation
Phil Chambers wrote: Can't load '/usr/perl5/site_perl/5.005/sun4-solaris/auto/Cyrus/IMAP/IMAP.so' for module Cyrus::IMAP: ld.so.1: perl: fatal: relocation error: file /usr/perl5/site_perl/5.005/sun4-solaris/auto/Cyrus/IMAP/IMAP.so: symbol sasl_client_init: referenced symbol not found at /usr/perl5/5.00503/sun4-solaris/DynaLoader.pm line 169. at /usr/perl5/site_perl/5.005/sun4-solaris/Cyrus/IMAP/Admin.pm line 44 BEGIN failed--compilation aborted at /usr/perl5/site_perl/5.005/sun4-solaris/Cyrus/IMAP/Admin.pm line 44. BEGIN failed--compilation aborted at /usr/perl5/site_perl/5.005/sun4-solaris/Cyrus/IMAP/Shell.pm line 60. BEGIN failed--compilation aborted. As far as I can make out, this is a dynamic library problem, but I have completely failed to find a cure for it. Help with that will be most welcome. You did recompile perl yourself and do not use the perl coming with solaris ? Would it work if you would use the solaris perl (makemaker) ? --Christian
Re: squatter
Ken Murchison wrote: I just committed a similar patch. Jun 16 22:48:24 smtp squatter[6180]: done indexing mailboxes Wow...I did not see that for months in the logs. After latest cvs update all my squatter-problems seem to be gone. The latest change to squat_build.c and squatter.c did it! Thanks a lot! --Christian
Re: squatter
Vittorio Manfredini wrote: More information : squatter is not able to index mailboxes on virtual domain !! they interpret the . of the domain name as a separator and substitute it !! example : su cyrus squatter -r -v user/[EMAIL PROTECTED] error opening [EMAIL PROTECTED]: Mailbox does not exist May be a bug in 2.2 code ?? vittorio Try: squatter -r -v example/com\!user/vittorio I can specify mailboxes using this format! Of course this is a workaround... --Christian
Re: squatter
Vittorio Manfredini wrote: More information : squatter is not able to index mailboxes on virtual domain !! they interpret the . of the domain name as a separator and substitute it !! example : su cyrus squatter -r -v user/[EMAIL PROTECTED] error opening [EMAIL PROTECTED]: Mailbox does not exist May be a bug in 2.2 code ?? vittorio - This mail sent through IMP: http://horde.org/imp/ This patch fixes the problem for me but I have no idea if it is correct! === RCS file: /cvs/src/cyrus/imap/squatter.c,v retrieving revision 1.5.4.11 diff -u -r1.5.4.11 squatter.c --- squatter.c 20 May 2003 15:45:53 - 1.5.4.11 +++ squatter.c 14 Jun 2003 22:26:37 - @@ -419,6 +419,7 @@ int rflag = 0; int i; char buf[MAX_MAILBOX_PATH+1]; +char newbuf[MAX_MAILBOX_PATH+1]; struct namespace squat_namespace; int r; @@ -479,11 +480,14 @@ for (i = optind; i argc; i++) { strlcpy(buf, argv[i], sizeof(buf)); /* Translate any separators in mailboxname */ - mboxname_hiersep_tointernal(squat_namespace, buf, 0); - index_me(buf, 0, 0, NULL); + //mboxname_hiersep_tointernal(squat_namespace, buf, 0); + /* Handle conversion from the standard namespace to the internal namespace */ +(*squat_namespace.mboxname_tointernal)(squat_namespace, buf, NULL, newbuf); + + index_me(newbuf, 0, 0, NULL); if (rflag) { - strlcat(buf, .*, sizeof(buf)); - (*squat_namespace.mboxlist_findall)(squat_namespace, buf, 1, + strlcat(newbuf, .*, sizeof(newbuf)); + (*squat_namespace.mboxlist_findall)(squat_namespace, newbuf, 1, 0, 0, index_me, NULL); } }
Re: SQUAT: Unknown error 1 (Closing index)
Dylan Martin wrote: I've been trying to run down the problem I've been having with squatter, and it looks like quite a few people on the list are having the same problem. Here's what I've got so far, and I'll post more if/when I get it. It looks like in squat_build.c in write_trie_word_data, if len 2 it calls write_trie_word_data on the SquatWordTable new_t. When it breaks, new_t has these values: new_t-first_valid_entry = 256 new_t-last_valid_entry = 0. When it doesn't break, first_valid_entry is less than or equal to last_valid entry. I don't really know what values mean what, so I can't really say what this means or even if it's significant. I'll see if I can find more. Let me know if this means anything to any of you. Thanks -Dylan For me it fails at exactly the same place with the same error ! I collected some of the messages for which squatter reproducable fails but cannot say which unique liddle difference in them squatter does not like. They are from different mailers in different charsets and encodings. The only thing they seem to have in common is Content-Transfer-Encoding: 8 Bit in at least one body part of a mime message. Even messages I personally sent using squirrelmail could not be processed by squatter without crashing! During tracing I had a closer look on some I-do-not-remember-receiver-function in squatter.c in which I tried to figure out if cyrus has problems in decoding the messages and building the to-index-strings but that all looked reasonable. One thing I did not quite understand was that somehow cyrus does not seem to pay attention on the charset being used in the message to index. I think there were messages which were explicitly (and correctly) defined in charset iso-8859-15 (all messages for which squatter fails seem to have this charset in use but for my system 99% of all messages are using iso-8859-15 charset and so this may not be an issue) but during index-canonicalization 8 bit characters got replaced by 'X' characters and so the index would never contain words containing e.g. german umlauts correctly (Maybe I am totally wrong here, of course!). I tried setting reject8bit and stopped all mta-mail-conversions but messages which cause squatter to crash still come in! The error I get seems to be #define EPERM1 /* Operation not permitted */ --Christian
Re: Subject field corruption
NOwlar wrote: I use Postfix 2.0.10 with TLS patch, cyrus-imapd 2.1.13, sasl 2.1.13 The problem is as follow: When a message with russian charset characters (KOI8-R, WIN1251) in Subject field arrives or is moved into the Sent Items folders by Outlook Express, each russian character is replaced by an X (ex: Re: mazda 626 ). I happens only when the Subject field is without charaterset specification. I dumped mailboxes with cyrdump, the Xes are in. What can be wrog? Maybe postfix can auto-convert these messages for you ? In sendmail you could do something like: define(`confSEVEN_BIT_INPUT', `false')dnl define(`confEIGHT_BIT_HANDLING', `mime')dnl define(`confDEF_CHAR_SET', `iso-8859-15')dnl but such a solution can produce quite ugly results if the message beeing autoconverted does not apply to the default charset in use. I stopped using such features because squatter stopped working for certain mailboxes in which auto-converted messages resided, I think. I would suggest setting reject8bit in imapd.conf to yes so that these non-standard-compliant messages get rejected. It is more a mta issue somehow than cyrus! Your mta delivers non-standard-compliant messages to cyrus and leaves the decision what to do with them to cyrus instead of just rejecting everything non-standarad-compliant. For me, the sender should get notice about the wrong behaving client and is the one to fix the problem on his side. I mainly had problems with messages coming from some webmail clients and I stopped caring about anybody who knows about the existence of e.g. php's mail function but does not know how to send messages with it correctly! If you see X in your messages cyrus just corrected a message the sender's client was not able to specify a character-set for correctly! --Christian
Re: Seperate Cyrus
Patrick Nelson wrote: On Wed, 2003-06-04 at 12:17, Ken Murchison wrote: Patrick Nelson wrote: On Wed, 2003-05-14 at 22:44, Patrick Nelson wrote: On Wed, 2003-05-14 at 08:31, Ken Murchison wrote: Christian Schulte wrote: Patrick Nelson wrote: Wow... Got my system working great... RH9 and Cyrus 2.1.13! Was thinking... Would it be possible to have sendmail on one system and cyrus on another. This solution is probably simple and/or standard. You can use the cyrusv2.mc mailer to connect to cyrus' lmtp port... Have a look at cf/mailer/cyrusv2.mc and change the default /var/imap/socket/lmtp unix socket to some lmtp port on a foreign machine! For this you will have to active lmtp service in cyrus.conf and not just lmtpunix service on the machine cyrus is running on. No! You shouldn't hack the cyrusv2.mc file itself. Its setup to be configurable from your sendmail.mc (or whatever you call it). Please read cf/README in the Sendmail distro. All you need to do is define CYRUSV2_MAILER_ARGS to be something like `TCP $h lmtp' OK so I'm going to try adding: define(`CYRUSV2_MAILER_ARGS',`TCP imapsrv lmtp') to the sendmail.mc of the mailersrv to move mail to the imapsrv. I will test to see if this works tomorrow. OK finally got around to it. It didn't work. So, does anyone know of a how-to that will show me how to do this? Did you build a new sendmail.cf and restart Sendmail? If done correctly, this will work. In addition to writing the cyrusv2 mailer definition I've also tested it with lmtp over TCP. Yes rebuilt it and restarted it. Bunch o' sendmail errors. So here's the details: Cyrus IMAP Server: redhat9 cyrus-imap.2.1.13 sendmail.8.12.8 -- Works for local delivery to cyrus cyrus-imap.conf has the following services: lmtp cmd=lmtpd listen=lmtp prefork=0 lmtpuqnix cmd=lmtpd listen=/var/lib/imap/socket/lmtp prefork=1 sendmail.mc has the following cyrus entries: VERSIONID(`linux setup for RH and Cyrus')dnl dnl define(`confTRUSTED_USER', `cyrus') define(`confLOCAL_MAILER', `cyrusv2') define(`CYRUSV2_MAILER_FLAGS',`Aw5:/|@o') define(`CYRUSV2_MAILER_ARGS',`FILE /var/lib/imap/socket/lmtp') MAILER(cyrusv2)dnl MAILER_DEFINITIONS Mcyrus, P=[IPC], F=lsDFMnqA@/:|SmXz, E=\r\n, S=EnvFromL, R=EnvToL/HdrToL, T=DNS/RFC822/X-Unix, A=FILE /var/lib/imap/socket/lmtp LOCAL_RULE_0 Rbb + $+ @ $=w . $#cyrus $: + $1 Incoming Mail Server: redhat72 sendmail.8.11.6 works for local delivery of mail sendmail.mc has the following cyrus entries: VERSIONID(`linux setup for delivery to Cyrus')dnl define(`confLOCAL_MAILER', `cyrusv2') define(`CYRUSV2_MAILER_FLAGS',`Aw5:/|@o') define(`CYRUSV2_MAILER_ARGS',`TCP IP of Cyrus Srv lmtp') MAILER(cyrusv2)dnl MAILER_DEFINITIONS Mcyrus, P=[IPC], F=lsDFMnqA@/:|SmXz, E=\r\n, S=EnvFromL, R=EnvToL/HdrToL, T=DNS/RFC822/X-Unix, A=TCP IP of Cyrus Srv lmtp LOCAL_RULE_0 Rbb + $+ @ $=w . $#cyrus $: + $1 lmtp is a service in both systems. When I went to rebuild the sendmail on Incoming Mail Server it didn't build because cyrusV2.mc was missing so I copied it over from Cyrus IMAP Server. Then it rebuilt without error. However, on sendmail restart on the Incoming Mail Server sendmail barfs and fails to start, the error message is: Starting sendmail: 554 5.0.0 /etc/sendmail.cf: line 1481: EnvFromL=10: ruleset changed value (old 171, new 10) 554 5.0.0 /etc/sendmail.cf: line 1490: EnvToL=20: ruleset changed value (old 173, new 20) 554 5.0.0 /etc/sendmail.cf: line 1496: HdrFromL=30: ruleset changed value (old 174, new 30) 554 5.0.0 /etc/sendmail.cf: line 1505: HdrToL=40: ruleset changed value (old 172, new 40) [FAILED] And /var/log/maillog shows: Jun 4 12:55:09 ns sendmail[6427]: NOQUEUE: SYSERR(root): /etc/sendmail.cf: line 1481: EnvFromL=10: ruleset changed value (old 171, new 10) Jun 4 12:55:09 ns sendmail[6427]: NOQUEUE: SYSERR(root): /etc/sendmail.cf: line 1490: EnvToL=20: ruleset changed value (old 173, new 20) Jun 4 12:55:09 ns sendmail[6427]: NOQUEUE: SYSERR(root): /etc/sendmail.cf: line 1496: HdrFromL=30: ruleset changed value (old 174, new 30) Jun 4 12:55:09 ns sendmail[6427]: NOQUEUE: SYSERR(root): /etc/sendmail.cf: line 1505: HdrToL=40: ruleset changed value (old 172, new 40) Jun 4 12:55:11 ns sendmail[6438]: NOQUEUE: SYSERR(root): /etc/sendmail.cf: line 1481: EnvFromL=10: ruleset changed value (old 171, new 10) Jun 4 12:55:11 ns sendmail[6438]: NOQUEUE: SYSERR(root): /etc/sendmail.cf: line 1490: EnvToL=20: ruleset changed value (old 173, new 20) Jun 4 12:55:11 ns sendmail[6438]: NOQUEUE: SYSERR(root): /etc/sendmail.cf: line 1496: HdrFromL=30: ruleset changed value (old 174, new 30) Jun 4 12:55:11 ns sendmail[6438]: NOQUEUE: SYSERR
Re: how to convert db4 mailboxes.db to db3 ?
sandra wrote: Patrick, I have tried to do the conversion from db4 to skiplist for the cyrus-imap compiled with db4, but, there is a error message: # ./cvt_cyrusdb mailboxes.db db4 mailboxes.skiplist skilist fatal error: unknown old backend Why doesnt it recognize db4? I have to compile with some other parameter, like --with-mboxlist-db=db4 ? Thanks Sandra I think you will need two versions of cvt_cyrusdb! One linked with db4 to do the conversion from db4 to skiplist and another binary linked against db3 with which to convert from skiplist back to berkeley. --Christian
Verifying if everything is ok after upgrading to db-4.1.25 ?
Hello all, I just upgraded my 2.2-cvs installation from berkeley db-3.2 to db-4.1. The new system now seems to work properly. I had to do some things for which I would like to know if they may cause future trouble. First of all I would need to know what these directories are used for exactly: configdirectory/db configdirectory/db.backup1 configdirectory/db.backup2 To be able to start the old installation if anything goes wrong during the upgrade I kept the old configdirectory and defaultpartition in theire places and copied them to completely other locations for use with the new db-4.1 installation. So here is what I did exactly: 1. Copied the old default partition /var/spool/imap to /var/opt/spool/imap without loosing permissions or timeinformation. 2. Copied the old configuration directory /var/imap to /var/opt/imap the same way 3. With the new ctl_mboxlist binary: $ cd /var/opt/imap (the duplicated new configdirectory) $ ctl_mboxlist -d mboxlist.dump $ mv mailboxes.db mailboxes.db.old $ ctl_mboxlist -u mboxlist.dump $ diff mailboxes.db mailboxes.db.old Binary files mailboxes.db and mailboxes.db.old differ ---snip--- If I now start the new db-4.1 installation by letting all tools read another default imapd.conf (changed in config.h at compiletime; I think idled does not support -C option right now ?) I get lots of DB4ERROR: entries in syslog and nothing works. After reading doc/install-configure.html I now first tried to setup the new db-4.1 installation to run without any existing old data just as if it would get installed for the very first time. One of the steps required to do was to run mkimap on the empty configdirectory. Doing so will not create configdirectory/db.backup1 and configdirectory/db.backup2 directories nor does the db directory contain any file after. So I did: ---snip--- $ rm -r db.backup* $ rm db/* ---snip--- Now starting the new installation some DB4ERROR: entries disappeared but things still did not work. After stopping cyrus I inspected the configdirectory to see what had changed and saw that cyrus created the db.backup1 directory and some files in the db directory. I now spent several hours on getting things to run and found out the following: 1. Setting the umask in the imapd.conf file does not leed to cyrus using it as specified. Even setting an umask in imapd.conf of 000 or even 0 really does not lead to make cyrus create the files in db/ and even db.backup directories with rwxrwxrwx! The point where I looked at before giving up on umask issues was in imap/global.c on the following lines: 140 /* Look up umask */ 141 val = config_getstring(IMAPOPT_UMASK); 142 while (*val) { 143 if (*val = '0' *val = '7') umaskval = umaskval*8 + *val - '0'; 144 val++; 145 } 146 umask(umaskval); I cannot check if this really does what I expect it to do but for me the umask value in imapd.conf does not work! Setting umask:000 makes cyrus create the db.backup directories like drwxr-xr-x 2 cyrusbin 512 Mär 28 05:38 db.backup1 and this should be drwxrwxrwx 2 cyrusbin 512 Mär 28 05:38 db.backup1 or am I wrong ? 2. After the start of the new db-4.1 installation cyrus created some files in the db directory but stated DB4ERROR:s on deliver.db and tls_sessions.db. So I did: ---snip--- $ mv deliver.db deliver.db.old $ mv tls_sessions.db tls_sessions.db.old --snip--- At this point the new installation would have started if I would have erased all files previously created in the db directory because cyrus now stated DB4ERROR:s for files in the db directory which I absolutely did not understand for hours As it seems to me cyrus tried to archive the old deliver.db and tls_sessions.db to some files in the db directory which lead to corrupting something therein. After repeating ---snip--- $ rm -r db.backup* $ rm db/* ---snip--- and now restarting without any db file (I think/hope ?!) being from the old db-3.2 installation everything seems to work for now! But what have I lost ? What exactly is deliver.db used for ? (I think used for the duplicate delivery suppression ?) Did I loose any data because of not being able to re-use the old db-3.2 file ? The same for tls_sessions.db ? Is there anything I need to do else ? The system is currently being configured like the following and everything seems to work. But will it also work next week/month/year ? Am I missing something ? checking for db_create in -ldb-4.1... no yes for the new cyrus checking for db_create in -ldb4.1... no checking for db_create in -ldb-4.0... no checking for db_create in -ldb4.0... no checking for db_create in -ldb-4... no checking for db_create in -ldb4... no checking for db_create in -ldb-3.3... no checking for db_create in -ldb3.3... no checking for db_create in -ldb-3.2... yes no for the new cyrus checking duplicate db database backend... berkeley_nosync checking mboxlist database backend... skiplist
Trafficaccounting in a mysql db ?
Hello, I wrote a patch which enables one to do traffic logging into a mysql database. (mainly lib/prot.c lib/prot.h) The table in which that happens could look something like: CREATE TABLE cyrus_accounting ( id int(11) NOT NULL auto_increment, login varchar(128) NOT NULL default '', service enum('IMAP','POP','OTHER','FILESYSTEM','BACKEND','LMTP','DELIVER','LMTP_FILESYSTEM','LMTP_TEMP','LMTP_SHUTDOWN','SHUTDOWN') NOT NULL default 'OTHER', bytes double NOT NULL default '0', type enum('IN','OUT') NOT NULL default 'UNSPECIFIED', connect_time datetime default NULL, disconnect_time datetime NOT NULL default '-00-00 00:00:00', PRIMARY KEY (id), KEY stamp (connect_time), KEY login (login) ) TYPE=InnoDB; If anybody has interest in that I could post the patch. I would have to do some changes to make everything configurable in the imapd.conf file first so that I cannot post the patch unchanged for now and wanted to ask first. --Christian--
Upgrading from db-3.2 to db-4.1 ?
Hi, I want to upgrade my cyrus installation to a new berkeley db version. Currently I am running db-3.2. All other services like sendmail with sasl are allready running with db-4.1.25. I am running the 2.2 version from cvs and now need to know how I have to convert the different mailboxes after installing the new binaries. The currently running version is configured with the 2.2 defaults for all database backends. checking for db.h... yes checking for db_create in -ldb-4.1... no this will change to yes checking for db_create in -ldb4.1... no checking for db_create in -ldb-4.0... no checking for db_create in -ldb4.0... no checking for db_create in -ldb-4... no checking for db_create in -ldb4... no checking for db_create in -ldb-3.3... no checking for db_create in -ldb3.3... no checking for db_create in -ldb-3.2... yes this will change to no Do any of the following change because of the new db-4.1 version ? I did not specify them on the configure commandline so that are the defaults for db-4.1 also ? checking duplicate db database backend... berkeley_nosync checking mboxlist database backend... skiplist checking seen state database backend... skiplist checking pts database backend... berkeley checking subscription database backend... flat checking TLS cache database backend... berkeley_nosync checking netnews db database backend... berkeley Is there anything I have to do before starting the new cyrus master binary ? --Christian--
Squatter and virtdomains ?
Hello, does squatter already support virtdomain mailboxes ? --Christian--
Re: quota problems ; overquota, quotawarning, etc
Markus Welsch wrote: Hi all, I've set up Cyrus 2.1 with quota. Now when there is no quota reached already Cyrus accepts the message no mater what size (even if it's 800% overquota). Is there a way to reject the mails in such a case ? No! A mailbox could never go over quota if such mails would be rejected! If you send one email being 800% over quota cyrus will deliver the mail and all next mails to the same mailbox now being over quota will be handled appropriate to your imapd.conf settings! When are quota warnings send ? (Quotapercentage is already reached but I didn't get a warning). From imapd.conf manpage: lmtp_over_quota_perm_failure: 0 If enabled, lmtpd returns a permanent failure code when a user's mailbox is over quota. By default, the failure is temporary, causing the MTA to queue the mes- sage and retry later. quotawarn: 90 The percent of quota utilization over which the server generates warnings. Some email clients show a dialogbox (like Outlook) where others do not (like Mozilla-Mail). That you did not get a warning right now can be caused of your MTA queueing the message caused by lmtp_over_quota_perm_failure not being set! --Christian--
[cyrus-imapd-2_2 CVS] Missing calls to prot_free ?
From imap/global.c: 550 /* 551 * Return contents of the shutdown file. NULL = no file. 552 */ 553 char *shutdown_file(void) 554 { 555 int fd; 556 struct protstream *shutdown_in; 557 static char shutdownfilename[1024] = ; 558 static char buf[1024]; 559 char *p; 560 561 if (!shutdownfilename[0]) 562 snprintf(shutdownfilename, sizeof(shutdownfilename), 563 %s/msg/shutdown, config_dir); 564 if ((fd = open(shutdownfilename, O_RDONLY, 0)) == -1) return NULL; 565 566 shutdown_in = prot_new(fd, 0, SHUTDOWN); 567 prot_fgets(buf, sizeof(buf), shutdown_in); 568 if ((p = strchr(buf, '\r')) != NULL) *p = 0; 569 if ((p = strchr(buf, '\n')) != NULL) *p = 0; 570 571 syslog(LOG_WARNING, %s, closing connection, buf); 572 prot_free(shutdown_in); 573 return buf; 574 } I added line 572 because I think prot_free should be called somewhere after the prot_new call if the structure is not used furthermore. Is that right ? The same in imap/lmtpengine.c: 991/* Only allow LHLO/NOOP/QUIT when there is a shutdown file */ 992if (!strchr(LlNnQq, buf[0]) 993(shutdown_fd = open(shutdownfilename, O_RDONLY, 0)) != -1) { 994struct protstream *shutdown_in = prot_new(shutdown_fd, 0, LMTP_SHUTDOWNFILE); 995 996prot_fgets(buf, sizeof(buf), shutdown_in); 997if ((p = strchr(buf, '\r'))!=NULL) *p = 0; 998if ((p = strchr(buf, '\n'))!=NULL) *p = 0; 999 1000prot_printf(pout, 421 4.3.2 %s\r\n, buf); 1001prot_flush(pout); 1002prot_free(shutdown_in); 1003func-shutdown(0); 1004} Here I added line 1002 but here I also do not know if this is correct! By the way: Shouldn't that call also the shutdownfile-function from global.c now ? Then again in imap/lmtpengine.c: 1377rset: 1378 if(msg-data) prot_free(msg-data); 1379 if (msg) msg_free(msg); 1380 msg_new(msg); 1381 1382 continue; 1383 } 1384 goto syntaxerr; I added line 1378 and again I do not know if it was correct. Finally: Did I totally misunderstand the sources or are these missing calls to prot_free nonrelevant ? Would be great if someone could comment on this! --Christian--
Re: Two huge problems with CMU (tag stable_2.2) sieve 2.0 of thecurrent cvs source !
Franz Skale wrote: Things are running good with the cvs code of cyrus (branche 2.2) but there are 2 probs i have with sieve. Btw. i am using sendmail 8.12.8 with the lmtp unix socket delivering option. (cyrusv2.mc) The cvs source from last week worked perfectly with the vacation extension. I did a cvs update a few minutes ago and this is the first time I checked out the sieve-bytecode stuff. Some scripts do not behave as they did before! I cannot say why things differ now but somehow mail gets delivered to wrong folders say not the folders to which they were delivered before?!?! I am using virtdomains, unix-hierarchysep and altnamespace (the full program). Is there anything known for which the sieve-bytecode compiler does not produce correct bytecode ? --Christian--
Re: [cyrus-imapd-2_2 CVS] Missing calls to prot_free ?
Christian Schulte wrote: Then again in imap/lmtpengine.c: 1377rset: 1378 if(msg-data) prot_free(msg-data); 1379 if (msg) msg_free(msg); 1380 msg_new(msg); 1381 1382 continue; 1383 } 1384 goto syntaxerr; I added line 1378 and again I do not know if it was correct. Sorry for replying to myself but I no know that this of course was not correct! It is done in msg_free() as I saw right after I posted the last message Are the other calls to prot_free also incorrect ?
Re: Two huge problems with CMU (tag stable_2.2) sieve 2.0 of thecurrent cvs source !
Ken Murchison wrote: We'd like to hear of any differences. I caught a couple myself when I first deployed it. What would help is a sample script, sample message(s) and the output of the sieve 'test' program (both the bytecode and non-bytecode versions). This is the sieve-script of my private account generated with websieve and running perfectly since months: # Mail rules for user [EMAIL PROTECTED] # Created by Websieve version 0.61h require [fileinto]; if anyof (address :contains [from] [EMAIL PROTECTED]) { fileinto EPAG/deREG; } elsif allof (address :contains [from] offlineclient) { fileinto XCellcom/DEBUG; } elsif anyof (address :contains [Cc,CC,To,TO] info-cyrus, address :contains [from] info-cyrus, header :contains subject info-cyrus, header :c ontains Cc info-cyrus) { fileinto Privat/Projects/Cyrus-Info; } elsif anyof (address :contains [Cc,CC,To,TO] cyrus-sasl, address :contains [from] cyrus-sasl, header :contains subject cyrus-sasl, header :c ontains Cc cyrus-sasl) { fileinto Privat/Projects/Cyrus-Sasl; } elsif anyof (address :contains [Cc,CC,To,TO] epag.de, address :contains [from] epag.de) { fileinto EPAG; } elsif allof (address :contains [Cc,CC,To,TO] [EMAIL PROTECTED]) { fileinto Privat/web.de; } elsif anyof (address :contains [from] smtp.rent-a-mailserver.de) { fileinto Teamordner/rent-a-mailserver; } elsif allof (header :contains subject [Cyrus-CVS]) { fileinto Privat/Projects/Cyrus-CVS; } elsif anyof (address :contains [from] [EMAIL PROTECTED]) { fileinto EPAG/deREG; } else { keep; } All mail from the cyrus-info mailinglist got delivered to Privat/Projects/Cyrus-Info before the update. Right now after the bytecode-update these mails appear in XCellcom/DEBUG which is the target of the preceding rule...I did the update a few minutes ago and so a I did not get deep into testing my sieve scripts but I will do the next days! --Christian--
Re: Two huge problems with CMU (tag stable_2.2) sieve 2.0 of thecurrent cvs source !
Rob Siemborski wrote: On Wed, 5 Mar 2003, Christian Schulte wrote: All mail from the cyrus-info mailinglist got delivered to Privat/Projects/Cyrus-Info before the update. Right now after the bytecode-update these mails appear in XCellcom/DEBUG which is the target of the preceding rule...I did the update a few minutes ago and so a I did not get deep into testing my sieve scripts but I will do the next days! When did you last do the update? A few minutes ago If you have updated recently, could you supply an actual message that fails (as an attachment), along with the actual bytecode (and what type of system you are running on). It is Solaris 8 on x86. If this mail shows up in the archive I get a copy of it and this copy will get delivered to XCellcom/DEBUG instead of the right place. I attached an email out from the archive which I just forwarded to test where it gets delivered and it seems like the rule matches but the wrong fileinto-target gets used somehow. I also attached the .bc file which I think you mean with the actual bytecode out from /usr/sieve/domain/schulte.it/c/cs/default.bc --Christian-- ---BeginMessage--- On Wed, 5 Mar 2003, Christian Schulte wrote: All mail from the cyrus-info mailinglist got delivered to Privat/Projects/Cyrus-Info before the update. Right now after the bytecode-update these mails appear in XCellcom/DEBUG which is the target of the preceding rule...I did the update a few minutes ago and so a I did not get deep into testing my sieve scripts but I will do the next days! When did you last do the update? I can't reproduce this with the current CVS code, though it looks like something that may have been related to the previous bug we fixed. If you have updated recently, could you supply an actual message that fails (as an attachment), along with the actual bytecode (and what type of system you are running on). -Rob -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456 Research Systems Programmer * /usr/contributed Gatekeeper ---End Message--- # Mail rules for user [EMAIL PROTECTED] # Created by Websieve version 0.61h require [fileinto]; if anyof (address :contains [from] [EMAIL PROTECTED]) { fileinto EPAG/deREG; } elsif allof (address :contains [from] offlineclient) { fileinto XCellcom/DEBUG; } elsif anyof (address :contains [Cc,CC,To,TO] info-cyrus, address :contains [from] info-cyrus, header :contains subject info-cyrus, header :contains Cc info-cyrus) { fileinto Privat/Projects/Cyrus-Info; } elsif anyof (address :contains [Cc,CC,To,TO] cyrus-sasl, address :contains [from] cyrus-sasl, header :contains subject cyrus-sasl, header :contains Cc cyrus-sasl) { fileinto Privat/Projects/Cyrus-Sasl; } elsif anyof (address :contains [Cc,CC,To,TO] epag.de, address :contains [from] epag.de) { fileinto EPAG; } elsif allof (address :contains [Cc,CC,To,TO] [EMAIL PROTECTED]) { fileinto Privat/web.de; } elsif anyof (address :contains [from] smtp.rent-a-mailserver.de) { fileinto Teamordner/rent-a-mailserver; } elsif allof (header :contains subject [Cyrus-CVS]) { fileinto Privat/Projects/Cyrus-CVS; } elsif anyof (address :contains [from] [EMAIL PROTECTED]) { fileinto EPAG/deREG; } else { keep; } ##PSEUDO script start #rule1ENABLED[EMAIL PROTECTED]folderEPAG/deREG4 #rule 3ENABLEDofflineclientfolderXCellcom/DEBUG0 #rule 4ENABLEDinfo-cyrusinfo-cyrusinfo-cyrusfolderPrivat/Projects/Cyrus-Info4Ccinfo-cyrus #rule 7ENABLEDcyrus-saslcyrus-saslcyrus-saslfolderPrivat/Projects/Cyrus-Sasl4Cccyrus-sasl #rule 9ENABLEDepag.deepag.defolderEPAG4 #rule 11ENABLED[EMAIL PROTECTED]folderPrivat/web.de0 #rule 13ENABLEDsmtp.rent-a-mailserver.defolderTeamordner/rent-a-mailserver4 #rule 15ENABLED[Cyrus-CVS]folderPrivat/Projects/Cyrus-CVS0 #rule 17ENABLED[EMAIL PROTECTED]folderEPAG/deREG4 #vacation1[EMAIL PROTECTED]On vacation for the next weekoff #modebasic # Mail rules for user [EMAIL PROTECTED] # Created by Websieve version 0.61h require [fileinto]; if anyof (address :contains [from] [EMAIL PROTECTED]) { fileinto EPAG/deREG; } elsif allof (address :contains [from] offlineclient) { fileinto XCellcom/DEBUG; } elsif anyof (address :contains [Cc,CC,To,TO] info-cyrus, address :contains [from] info-cyrus, header :contains subject info-cyrus, header :contains Cc info-cyrus) { fileinto Privat/Projects/Cyrus-Info; } elsif anyof (address :contains [Cc,CC,To,TO] cyrus-sasl, address :contains [from] cyrus-sasl, header :contains subject cyrus-sasl, header :contains Cc cyrus-sasl) { fileinto Privat/Projects/Cyrus-Sasl; } elsif anyof (address :contains [Cc,CC,To,TO] epag.de, address :contains [from] epag.de) { fileinto EPAG; } elsif allof (address :contains [Cc,CC,To,TO] [EMAIL PROTECTED]) { fileinto Privat/web.de; } elsif anyof (address :contains [from] smtp.rent-a-mailserver.de
TEST
TEST
Sorry again but it is for finding a sieve error which deals with getting mails from this list into the right folder...
Re: Two huge problems with CMU (tag stable_2.2) sieve 2.0 of thecurrent cvs source !
Rob Siemborski wrote: Could you send me your new .bc file? (you did recompile it, right?) Ups...sorry! I only made cvs update; make. After doing make distclean; configure; make; make install it now works! Great! Thanks a lot for your help. I attached the newly compiled script just for completeness! Again, thanks a lot for this perfect support of this perfect piece of work! --Christian-- default.bc Description: Binary data # Mail rules for user [EMAIL PROTECTED] # Created by Websieve version 0.61h require [fileinto]; if anyof (address :contains [from] [EMAIL PROTECTED]) { fileinto EPAG/deREG; } elsif allof (address :contains [from] offlineclient) { fileinto XCellcom/DEBUG; } elsif anyof (address :contains [Cc,CC,To,TO] info-cyrus, address :contains [from] info-cyrus, header :contains subject info-cyrus, header :contains Cc info-cyrus) { fileinto Privat/Projects/Cyrus-Info; } elsif anyof (address :contains [Cc,CC,To,TO] cyrus-sasl, address :contains [from] cyrus-sasl, header :contains subject cyrus-sasl, header :contains Cc cyrus-sasl) { fileinto Privat/Projects/Cyrus-Sasl; } elsif anyof (address :contains [Cc,CC,To,TO] epag.de, address :contains [from] epag.de) { fileinto EPAG; } elsif allof (address :contains [Cc,CC,To,TO] [EMAIL PROTECTED]) { fileinto Privat/web.de; } elsif anyof (address :contains [from] smtp.rent-a-mailserver.de) { fileinto Teamordner/rent-a-mailserver; } elsif allof (header :contains subject [Cyrus-CVS]) { fileinto Privat/Projects/Cyrus-CVS; } elsif anyof (address :contains [from] [EMAIL PROTECTED]) { fileinto EPAG/deREG; } elsif anyof (address :contains [from] netbeans.org) { fileinto Privat/Projects/Netbeans; } else { keep; } ##PSEUDO script start #rule1ENABLED[EMAIL PROTECTED]folderEPAG/deREG4 #rule 3ENABLEDofflineclientfolderXCellcom/DEBUG0 #rule 4ENABLEDinfo-cyrusinfo-cyrusinfo-cyrusfolderPrivat/Projects/Cyrus-Info4Ccinfo-cyrus #rule 7ENABLEDcyrus-saslcyrus-saslcyrus-saslfolderPrivat/Projects/Cyrus-Sasl4Cccyrus-sasl #rule 9ENABLEDepag.deepag.defolderEPAG4 #rule 11ENABLED[EMAIL PROTECTED]folderPrivat/web.de0 #rule 13ENABLEDsmtp.rent-a-mailserver.defolderTeamordner/rent-a-mailserver4 #rule 15ENABLED[Cyrus-CVS]folderPrivat/Projects/Cyrus-CVS0 #rule 17ENABLED[EMAIL PROTECTED]folderEPAG/deREG4 #rule 18ENABLEDnetbeans.orgfolderPrivat/Projects/Netbeans4 #vacation1[EMAIL PROTECTED]On vacation for the next weekoff #modebasic
Re: cyrus 2.2 from yesterday cvs
Igor Brezac wrote: On Wed, 19 Feb 2003, Ilya wrote: Ken, do you have any plans for global admins without default domain setting? I got this working by accident, but this would be a nice feature. Admin needs to be unqualified and the imap server ip address should not resolve to a FQDN. Why should the server ip address not resolve ? I am using defaultdomain in imapd.conf and global as well as domain-admins work as expected ! Global admins login without an @ character but have to exist in the user database with a realm of the machines name which is exactly what dns reverse lookup tells sasl to the IP cyrus is running on...so why did you have to turn off address lookup in dns for your machine ? --Christian--
Could not shut down filedescriptor 0: Transport endpoint is not connected
After doing the latest update from cvs I see these lines in syslog from time to time! Everything works well so I think I need not concentrate on these lines, right ? --Christian-- Feb 11 20:10:00 mail imap[26930]: [ID 892804 local6.debug] Could not shut down filedescriptor 0: Transport endpoint is not connected Feb 11 20:10:00 mail imap[26930]: [ID 892804 local6.debug] Could not shut down filedescriptor 1: Transport endpoint is not connected Feb 11 20:10:00 mail imap[26930]: [ID 892804 local6.debug] Could not shut down filedescriptor 2: Transport endpoint is not connected
Re: procmail revisited
Also, are you able to use user specific spamassassin settings? This is the one goal that set me on this quest in the first place. Of course simplifying my sendmail config is looking more attractive too. I noticed you set DROPPRIVS=1. I did the same in my /etc/procmailrc, and procmail logs a message saying it is assuming the identity of the recipient, but SA still uses the global configs and whitelists - which I really want to eliminate in favor of a ~/.spamassassin/ config for each user. Hi, maybe you take a look at the spam-assassin patches for cyrus-imapds' sieve interpreter in the conrtib directory of the cyrus distribution. I do spamassassins spamd check in a users sieve script deciding there what to do with the mail if it gets identified as spam: if spam { fileinto, reject, discard, reply, forward etc... } Works great for me! --Christian--
Re: Issues with Install
lists wrote: I am having 2 problems 1. is with the ./mkimap program. I am using redhat 8.0 and I get this error [cyrus@imap tools]$ ./mkimap reading configure file... done Use of uninitialized value in concatenation (.) or string at (eval 1) line 85. creating ... Use of uninitialized value in mkdir at (eval 1) line 87. Use of uninitialized value in chdir at (eval 1) line 91. Use of chdir('') or chdir(undef) as chdir() is deprecated at (eval 1) line 91. creating /usr/sieve... done that is with perl-5.8.0-55 Do you run ./mkimap as the cyrus user ? --Christian--
Re: Openssl certs for Cyrus
Jasper Jans wrote: is someone willing to outline the commands that are needed to create working certificates for sendmail/openldap/cyrus-sasl/etc that are all signed by a CA that is also self generated.. i'm not sure what it is that i do wrong - maybe it is the generating of the CA or maybe the server cert or the signing - i'm rather lost here :/ thanks a lot, jasper Hi, I do that all with /usr/local/ssl/misc/CA.pl ! The path may vary at your box but /usr/local/ssl is where openssl is installed on my box. For generating the CA the script can and should be used unmodified but for generating the new csr you should disable the encryption of the private key to make sendmail/cyrus handle the cert correctly. I think one had to add -nodes in the CA.pl script for the commands to create the csr for that but I do not remember exactly...CA.pl uses /usr/local/ssl/openssl.cnf or some configurationfile like that in which all necessary configurations for the new CA or certs can be done... --Christian--
Re: Per-Domain-Quota in 2.2 with virtual domains turned on ?
Ken Murchison wrote: I'l have to talk to Rob and Larry again, but I think that if we're interested in creating the directories on the fly, we'd want to do them as needed (create just what we need now, not the entire tree) and do this regardless of whether we're using virtdomains. mkimap should only be necessary for installing the cyrus system, I think. Without virtdomains one does mkimap exactly one times for installing purposes and does not need it ever again. Administration can completely be done with nearly every IMAP-client. With virtdomains this should work also, I think but does notI cannot administer cyrus only with an IMAP-client if using virtdomains and that was something I needed... --Christian--
Re: Per-Domain-Quota in 2.2 with virtual domains turned on ?
Ken Murchison wrote: I just committed support for per-domain quotas which works for all domains except for the default domain (the code to make it work for the default domain would be particularly crufty). To set a domain quota, do something like the following in cyradm: sq @domain.tld 1024 To try this out, either do an update from CVS or apply the following (relatively small) patches: http://bugzilla.andrew.cmu.edu/cvsweb/src/cyrus/imap/mailbox.c.diff?r1=1.134.4.14r2=1.134.4.15 http://bugzilla.andrew.cmu.edu/cvsweb/src/cyrus/imap/mboxlist.c.diff?r1=1.198.2.29r2=1.198.2.30 Sorry for not answering a longer time. I did not have the time to concentrate on cyrus the last days. I just updated from cvs and started looking at the domain quota. Could it be that the quota binary does not support the -f option for virtdomains correctly ? For me quota does not report anything for mailboxes for which cyradm displays data and so I think quota cannot fix also ?! Actually I wrote a patch last night to get rid of mkimap -d! I added a new switch to imap/imapoptions which is called virtdomains_autoconfig and defaults to disabled. If enabled the function mailbox_create() in mailbox.c creates the configdirectory/domain/d/domain/... and the sievedir/domain/d/domain/ directories if compiled with USE_SIEVE and if the domain does not already exist. For me this patch compiles without warnings and seems to work but because I am a java programmer and are used to thinking in an objectoriented manner I do not have *the* 100% C knowledge. Mainly I do not know if the pointers buffers etc I used are used and initialized correctly or whatever. So this here needs definetley review and it would be great if someone could point out some errors I did or write some comments to this. --Christian-- schulte-22:31:03:~/cyrus-cvs/cyrus-imapd-2_2/imap diff -c imapoptions.original imapoptions *** imapoptions.originalDo Jan 30 22:28:27 2003 --- imapoptions Do Jan 30 22:30:20 2003 *** *** 546,551 --- 546,557 { virtdomains, 0, SWITCH } /* Enable virtual domain support */ + { virtdomains_autoconfig, 0, SWITCH } + /* Automatically configure the configdirectory tree. The default is +to run tools/mkimap -d for every new domain. Enabling this causes +automatic configuration of the configdirectory tree without the need of +tools/mkimap -d */ + /* .SH SEE ALSO .PP schulte-22:48:49:~/cyrus-cvs/cyrus-imapd-2_2/imap diff -c mailbox.c.original mailbox.c *** mailbox.c.original Do Jan 30 22:23:22 2003 --- mailbox.c Do Jan 30 22:18:18 2003 *** *** 1938,1944 --- 1938,1977 return (stat(quota_path, sbuf) != -1); } + /* creates directories a..z within a given path */ + int mailbox_virtdomains_createaz(char *path){ + char *a=XX; + char alpha[60]=a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:p:q:r:s:t:u:v:w:x:y:z; + char *p; + int save_errno; + struct stat sbuf; + + p=path+strlen(path); + a=strtok(strdup(alpha), :); + strcpy(p,a); + if (mkdir(path, 0755) == -1 errno != EEXIST) { +save_errno = errno; + if (stat(path, sbuf) == -1) { + errno = save_errno; + syslog(LOG_ERR, IOERROR: creating directory %s: %m, path); + return IMAP_IOERROR; + } + } + while((a=strtok(NULL, :))){ + strcpy(p,a); + if (mkdir(path, 0755) == -1 errno != EEXIST) { + save_errno = errno; + if (stat(path, sbuf) == -1) { + errno = save_errno; + syslog(LOG_ERR, IOERROR: creating directory %s: %m, path); + return IMAP_IOERROR; + } + } + } + return 0; + } + int mailbox_create(const char *name, char *path, const char *acl, *** *** 1948,1953 --- 1981,1994 { int r; char *p=path; + char cfgdir[MAX_MAILBOX_PATH]; + #ifdef USE_SIEVE + char sievedir[MAX_MAILBOX_PATH]; + #endif /* USE_SIEVE */ + char *myname=strdup(name); + char *myp=myname; + char *my2p; + char letter[2]; char quota_root[MAX_MAILBOX_PATH]; int hasquota; char fnamebuf[MAX_MAILBOX_PATH]; *** *** 1977,1983 return IMAP_IOERROR; } } ! zeromailbox(mailbox); mailbox.quota.fd = -1; --- 2018,2109 return IMAP_IOERROR; } } ! ! /* Create the domain also under the configdirectory if virtdomains_autoconfig. */ ! if(config_getswitch(IMAPOPT_VIRTDOMAINS_AUTOCONFIG)){ ! strcpy(cfgdir, config_getstring(IMAPOPT_CONFIGDIRECTORY)); ! myp=strchr(myp, '!'); ! // Only do something if there is an '!' character in the mailbox name ! if(myp){ ! *myp='\0'; ! strcat(cfgdir,/domain/); ! strncpy(letter, myname, 1); ! strcat(cfgdir,letter); ! strcat(cfgdir
Re: SNMP cyrus monitoring.
Jared Watkins schrieb: Hmmm... Well I ran the snmpconf perl script and allowed public read access in snmpd.conf.. but when I try to walk the enterprises tree I don't see any cyrus stuff there... in fact.. I don't get any results if I use enterprises.anything. Do I need to give the cyrus user permission to write to snmp somehow? Is there a config option in cyrus.conf that is not there by default? Cyrus is not logging anything about attempting to connect to snmp and snmpd is not logging any errors... I don't know what to look for here... can anyone shed some light? How do the cyrus stats become known to snmpd? I'm almost snmp clueless... Jared By the way: Did you copy master/CYRUS-MASTER.mib to /usr/local/share/snmp/mibs ? --Christian--
Re: Quota Warnings
Víctor Guerra schrieb: Hello everybody, i have a cyrus-qmail installation on Red hat 7.3. I have set quotas to everybody and i want the following: When somebody (the sender) writes an e-mail to somebody (the recipient) cyrus must check quotas and if the recipient has the quota full... cyrus must to reply the sender telling that to him. Somebody knows how to do this? thanks a log Regards. Víctor Guerra [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ?man imapd.conf lmtp_over_quota_perm_failure: 0 If enabled, lmtpd returns a permanent failure code when a user's mailbox is over quota. By default, the failure is temporary. I think one of these two possible modes should do it. I have sendmail and played a bit with this option yesterday: If disabled sendmail tries delivery for 5 days sending a warning to the sender after one hour and returns the email after these 5 days if the mailbox is still over quota If enabled sendmail immediately returns the mail stating an error Over Quota --Christian--
Re: Per-Domain-Quota in 2.2 with virtual domains turned on ?
Ken Murchison schrieb: No. The domain level of the hierarchy is not treated as a mailbox. I'd have to think about whether this is even possible. I got a bit deeper in the code and I think there are some things worth to mention: Every time I've made a big change to the mailbox naming/structure (altnamespace, unixhiersep, virtdomains), I spend several days thrashing on the LIST/LSUB code. As I saw in the code adding a quota for a domain would really mean to re-write a hole lot of code. The naming representation of mailboxes like user/account@domain looks a bit unlucky to me but seeing the code I know why things are the way they are ;-) Logging in as an admin things would be better if representation would really be something like /domain/user/account. I think it would be possible to create a domain with every IMAP-client without the need of having to run mkimap -d domain buy simply creating the domain-folder with the client in the root of the hierarchy. But that really means a lot of code-changes! As I saw the actual virtual domain support simply copies the underlying storage-hierarchy so that every domain looks like beeing an own cyrus installation. However this is not the desired way and the whole virtual domain support looks a bit squeezed into the existing code. The best solution to get a real tree hierarchy for virtual domain support would make it impossible to use the old spooling code so by now I think it is impossible to do the per domain quota with a quick and easy enhancement of the existing code. I can live with not beeing able to specify a domain-quota but what really drives me crazy is that I have to mkimap -d domain for every new domain. So changing the whole spooling mechanism would really bring advantages but it also means to re-write the complete code which nobody really wants to --Christian-- http://dict.tu-chemnitz.de/dings.cgi?o=3001service=en-dequery=teeth
Per-Domain-Quota in 2.2 with virtual domains turned on ?
Hi, I have a question for 2.2-cvs and virtual domain support turned on. The mailbox hierarchy mainly looks like a tree to me. Without virtual domain support turned on I have the following hierarchy: /user/Accounts /Shared-Folders With virtual domain support turned on this expands to: /domain/user/Accounts /domain/Shared-Folders I can manage quotas for the accounts and the shared folders but I cannot manage quotas for the domain, or ? Would it be possible to set a per-domain quota ? Because the current representation of mailboxes is different (user/account@domain) I do not know how I would have to specify the domain-root! ?sq [EMAIL PROTECTED] 1024 to set the quota for all storage for the domain domain.tld to be 1024kB (accounts+shared folders) produces quota:1024 setquota: Mailbox does not exist Can that be done somehow ? --Christian--
Sieve reject working but emails get delivered to inbox ?
Hi, I installed the contrib/sieve-spamassassin patches and everything is working in my 2.2-cvs installation. My problem now is, that sieve reject seems to not work properly. require [spam, fileinto, reject]; if spam { reject This email did not pass our spam-detection tests and was identified as beeing spam! The recipient did NOT receive this email!; discard ; } This is a part of my sieve-script. It should reply to all spam identified emails with the reject text und afterthat should discard the email so that it will not get delivered to the inbox. This does not work for me! The rejection-email gets send but the email will not get discarded and thus gets delivered to the users inbox what I do not want! How can I auto-reply to and discard emails with sieve ? --Christian--
Re: cyrus-2.2-cvs: virtualdomains and sendmail virtusertable (cyrusv2as local mailer)
Ilan Rabinovitch schrieb: Hello Christian, Any chance I can get a look at your sendmail.mc or sendmail.cf files. Im trying to accomplish the same as you but following your thread of e-mails on the list I cant seem to reach the same poitn as you. Thanks, Ilan I solved it! I tried to deliver to a local alias by using localalias@machine all the time and if I only use localalias the expansion also works for me. I modified your patch a bit to get the default domain (mainly the hostname of the machine) not appended to local names by simply putting one rule before yours: R$+ @ $j . $#_LOCAL_ $: $1 So all email beeing sent to the local machine will not get the @domain appended to theire names and so cyrus can expand aliases to this domain also! Now I am able to map to localaliases in virtusertable by specifying @domain.itlocalalias@machinename You really helped me a lot! Thanks! --Christian-- Modified patch: I am sure that changing the syntax of local usernames to containing a non-allowed @ character in rule 0 for the whole sendmail installation will definetly become strange when it comes to UUCP mailers or whatever other mailers used, but I really read a lot of sendmail documentation of where to get the @domain part into local usernames and I cannot find a better place to do it elsewhere. Only using MAILER(smtp) and MAILER(cyrusv2) in sendmail.mc with cyrusv2 beeing defined as the local mailer everything works for me as I needed it to but complex sites who have to deal with many other mailers in theire sendmail.mc files will get into problems I think. So I would not recommend to use this for such sites! 1094,1097c1094,1096 R $+ $+ $#_LOCAL_ $: @ $1 nope, local address', `R$=L @ $=w . $#_LOCAL_ $: @ $1`@'$2 special local names R$+ @ $j . $#_LOCAL_ $: $1 R$+ @ $=w . $#_LOCAL_ $: $1`@'$2 regular local name') --- R $+ $+ $#_LOCAL_ $: @ $1 nope, local address', `R$=L @ $=w . $#_LOCAL_ $: @ $1 special local names R$+ @ $=w . $#_LOCAL_ $: $1 regular local name')
Re: cyrus-2.2-cvs: virtualdomains and sendmail virtusertable (cyrusv2as local mailer)
Jonathan Marsden schrieb: On 16 Dec 2002, Christian Schulte writes: +`R$=L @ $=w . $#_LOCAL_ $: @ $1`@'$2 special local names +R$+ @ $=w . $#_LOCAL_ $: $1`@'$2 regular local name') I think the two lines you added should look like `R$=L @ $=w .$#_LOCAL_ $: @ $1 @ $2 special local names R$+ @ $=w . $#_LOCAL_ $: $1 @ $2 regular local name') don't they ? For me thinks work after chaning them this way ! I'm glad you've found something that works for you. I'd have to run more tests to know if that same change to proto.m4 would work for me. It could be that you have found a more generic approach than mine. What I sent is in active use on multiple smallish servers under Sendmail 8.12.5, and seems to be working fine so far. Hello again, actually I found the problem what made your patch not work for me without the need to change it! I changed the cyrusv2 mailer definition to R=EnvToSMTP instead of the original R=EnvToL and used the mailertable for delivery earlier for which your patch does not work. Now I am able to use your patch unchanged. There is just one problem which drives me crazy the whole time. I cannot get the aliases to work. If I have an entry in virtusertable with an RHS of just a local alias e.g. LHS:@domain.tld RHS:alias_x and also have this alias_x: defined in the aliases database. During delivery cyrusv2 mailer gets selected for the alias_x RHS from virtusertable and then cyrusv2 mailer will not do the actual alias expansion but tries to deliver to the alias_x mailbox (user.alias_x). Do you have any idea why that happens ? Do aliases work for you with I think now the same setup ? --Christian--
Re: cyrus-2.2-cvs: virtualdomains and sendmail virtusertable (cyrusv2as local mailer)
You can't do multiple targets in the virtusertable; to accomplish that, you need to create a local alias that expands into the two targets, and then have the virtusertable entry map to the alias. For example: Virtusertable: [EMAIL PROTECTED]alias_x [EMAIL PROTECTED]local_a [EMAIL PROTECTED]local_b Aliases: alias_x:[EMAIL PROTECTED],[EMAIL PROTECTED] And that is my problem! The entries alias_x, local_a, local_b are getting expanded to alias_x@local-host-name etc.. So after processing virtusertable there will never ever be a user which sendmail recognizes as being local because of the @local-host-name part and so after processing virtusertable, aliases will not be expanded any more! I patched proto.m4 to add the @domain part to every local user so that cyrusv2 mailer is able to deliver mail! What I now will have to do is to not add a domain to local users for which an alias entry exists. (These local-users are not really users but aliases!) I think that will not be that hard to do, but I had not have enough time to do it right now! By the way: Do you have a solution for catchall accounts like @domain account@domain ? That is something I really do not want to miss because all the tons of spam mails now go to the postmaster (me) for all domains and not to the catchall-accounts! But maybe I misunderstood your solution: You did not patch anything at all ? You simply deliver mail to local-users to an entry in the aliases.db and do not have entries for domains with accounts in virtusertable at all ? So you have it like: virtusertable: @domainlocal_deliver_to_account_at_domain aliases: local_deliver_to_account_at_domain:account@domain Would such a setup work at all ? Would account@domain not beeing redirected to sendmail itself again and would endup in an infinite loop ? --Christian--
Re: problems with db directory ...
Malcolm Herbert schrieb: Does anyone have any ideas about this problem? On Fri, Dec 13, 2002 at 09:50:22AM +1100, Malcolm Herbert wrote: |I've installed cyrus-imapd-2.1.9nb1 (2.1.9 with NetBSD patch revision 1) |onto a NetBSD 1.6 machine, however I'm getting the following message |regularly (about every 20 minutes or so): | ||Dec 9 21:57:16 aeolos ctl_cyrusdb[21042]: DBERROR: archive /mod/var/state/cyrus/db: cyrusdb error ||Dec 9 21:57:16 aeolos ctl_cyrusdb[21042]: archiving log file: /mod/var/state/cyrus/db/log.01 ||Dec 9 21:57:16 aeolos ctl_cyrusdb[21042]: error opening /mod/var/state/cyrus/db.backup1//log.01 for writing (33152) ||Dec 9 21:57:16 aeolos ctl_cyrusdb[21042]: DBERROR: error archiving log file: /mod/var/state/cyrus/db/log.01 ||Dec 9 21:57:16 aeolos ctl_cyrusdb[21042]: DBERROR: archive /mod/var/state/cyrus/db: cyrusdb error | |I'm not sure what the problem is here as the cyrus user definately |has write access to this directory: | ||aeolos[...host/aeolos/etc] 301v#: cd /mod/var/state/cyrus/ ||aeolos[...var/state/cyrus] 302v#: ls -al ||total 217 ||drwxr-xr-x 9 cyrus wheel 512 Dec 11 09:57 . ||drwxr-xr-x 4 root wheel 512 Dec 5 13:06 .. ||drwxr-xr-x 2 cyrus wheel 512 Dec 9 14:57 db ||-rw--- 1 cyrus wheel 172032 Dec 11 09:57 deliver.db ||drwxr-xr-x 2 cyrus wheel 512 Dec 4 13:02 log ||-rw--- 1 cyrus wheel 16384 Dec 11 09:57 mailboxes.db ||drwxr-xr-x 2 cyrus wheel 512 Dec 4 13:02 msg ||drwxr-xr-x 2 cyrus wheel 512 Dec 10 17:17 proc ||drwxr-xr-x 28 cyrus wheel 512 Dec 4 13:03 quota ||drwxr-xr-x 2 cyrus wheel 512 Dec 9 14:57 socket ||-rw--- 1 cyrus wheel 16384 Dec 10 15:27 tls_sessions.db ||drwxr-xr-x 28 cyrus wheel 512 Dec 4 13:03 user | |... what would be the problem here? I have the same problems! Every time I do a make install or mkimap -d domain I have to set some permissions by hand to get rid of these log entries! Make sure you chmod -R 0770 /mod/var/state/cyrus/db ! What makes me a bit confused with your directory is that there are missing directories: /mod/var/state/cyrus/db.backup1 /mod/var/state/cyrus/db.backup2 Here is my ls -la /var/imap output: root-00:36:58:/ ls -la /var/imap/ total 804 drwxr-x--- 13 cyrussmmsp512 Dez 19 00:36 . drwxr-xr-x 34 root sys 1024 Dez 16 17:06 .. drwxrwx--- 2 cyrussmmsp512 Nov 12 18:06 db drwxrwx--- 2 cyrussmmsp512 Dez 19 00:36 db.backup1 drwxrwx--- 2 cyrussmmsp512 Dez 19 00:06 db.backup2 -rw-rw 1 cyrussmmsp 303104 Dez 19 00:36 deliver.db drwxr-xr-x 14 cyrussmmsp512 Dez 18 17:30 domain drwxr-xr-x 2 cyrussmmsp512 Okt 21 18:54 log -rw--- 1 cyrussmmsp 42800 Dez 18 18:47 mailboxes.db drwxr-xr-x 2 cyrussmmsp512 Okt 21 18:54 msg drwxr-xr-x 2 cyrussmmsp 12288 Dez 19 00:36 proc drwxr-x--- 2 cyrussmmsp512 Nov 20 01:11 ptclient drwxr-xr-x 28 cyrussmmsp512 Okt 21 18:54 quota drwxr-xr-x 2 cyrussmmsp512 Dez 16 17:06 socket -rw-rw 1 cyrussmmsp 32768 Dez 19 00:36 tls_sessions.db drwxr-xr-x 28 cyrussmmsp512 Okt 21 18:54 user
Re: cyrus-2.2-cvs: virtualdomains and sendmail virtusertable (cyrusv2as local mailer)
Joe Rhett schrieb: I hope that documenting how best to configure sendmail for use with Cyrus 2.2 in virtdomain mode will be part of the documentation cleanup that preceeds the 2.2 release. If I were sure what the best approach was, I'd happily submit patches to the Cyrus documentation files describing it. But I keep thinking that someone somewhere surely knows of a better way than making changes to proto.m4 :-) It's already in the docs for 2.2. I am running a 2.2 branch installation. I cannot find appropriate documentation concerning virtual domain support and how to configure the MTA under the doc/ directory! Is the documentation available in cvs ? I will have to change some things in my sendmail installation to get sendmail working with domains in local-user names. What I have running right now is working but with the cost of loosing the ability of configuring catchall accounts in virtusertable which would end up in some virtusertable-entry like: @domain.tld[EMAIL PROTECTED] which actually is a recursion! Also aliases are no longer expanded because after ending virtusertable-processing there will not be local users without a @domain.tld part. An alias-entry like: [EMAIL PROTECTED][EMAIL PROTECTED], [EMAIL PROTECTED] is not possible at all! So what I will try to do is an extension of the proto.m4 to be able to finish up virtusertable with entries for which an alias-entry exists without @domain.tld ! If there are some hints in the documentation it would be great if you could point me somewhere --Christian--
cyrus-2.2-cvs: virtualdomains and sendmail virtusertable (cyrusv2as local mailer)
Hi, after changing the local mailer in my sendmail.mc from cyrus to cyrusv2 I cannot get sendmail to correctly deliver the domain-part of local-adresses to cyrusv2-lmtpd! Before, I had the cyrusv2-mailer set in /etc/mail/mailertable but that way , I was not able to route my email as I need to and as I do in /etc/mail/virtusertable. Ecspacially catchall-accounts for domains which have more than one email-account in cyrus are not possible with the mailertable approach. I have all my local domains in /etc/mail/local-host-names and do (want to do) all email routing in /etc/mail/virtusertable like before. If I specify a final recipient (cyrus-account) in virtusertable as: @virtualdomain.it [EMAIL PROTECTED] where an account like [EMAIL PROTECTED] exists, sendmail recognizes virtualdomain.it in /etc/mail/local-host-names as a local domain and will strip the original virtualdomain.it from the recipient replacing it with the localhost hostname. All domains defined in /etc/mail/local-host-names will be recognized in virtusertable but the local delivery will only go to the user@localhostname! Where can I change sendmail to not do that ? How do I tell sendmail to never change the local-domain to the local hostname on succesfully recognized /etc/mail/local-host-names domains ? --Christian--
Re: cyrus-2.2-cvs: virtualdomains and sendmail virtusertable (cyrusv2as local mailer)
Jonathan Marsden schrieb: There are almost certainly neater ways, but I just patched sendmail.cf/m4/proto.m4 to do that. --- proto.m4.20020613 Thu Jun 13 11:53:24 2002 +++ proto.m4Thu Dec 12 01:54:08 2002 @@ -1092,8 +1092,8 @@ dnl $H empty (but @$=w.) R $+ + $* $+ $#_LOCAL_ $: $1 + $2plussed name? R $+ $+ $#_LOCAL_ $: @ $1 nope, local address', -`R$=L @ $=w . $#_LOCAL_ $: @ $1 special local names -R$+ @ $=w . $#_LOCAL_ $: $1 regular local name') +`R$=L @ $=w . $#_LOCAL_ $: @ $1`@'$2 special local names +R$+ @ $=w . $#_LOCAL_ $: $1`@'$2regular local name') ifdef(`_MAILER_TABLE_', `dnl # not local -- try mailer table lookup Jonathan Thanks for your answer! If I see it right, the only things which are changed in proto.m4 are the two lines `R$=L @ $=w . $#_LOCAL_ $: @ $1`@'$2 special local names R$+ @ $=w . $#_LOCAL_ $: $1`@'$2regular local name') replacing the existing two ones, right ? If I do these two changes, I get the following error when delivering to a local domain: 553 5.1.3 [EMAIL PROTECTED]... Invalid route addressU:error5.1.3553 Invalid route address@E: 500 5.0.0 Command line usage error and at the bottom of the error-message there is: Final-Recipient: RFC822; [EMAIL PROTECTED]@mail.schulte.it So what sendmail now does is, it rewrites the address nearly correctly but adds the localhostname at the end of the address! Any idea what I can do to prevent sendmail from ever apending the locahostname on an address ? --Christian--
Re: cyrus-2.2-cvs: virtualdomains and sendmail virtusertable (cyrusv2as local mailer)
Jonathan Marsden schrieb: There are almost certainly neater ways, but I just patched sendmail.cf/m4/proto.m4 to do that. --- proto.m4.20020613 Thu Jun 13 11:53:24 2002 +++ proto.m4Thu Dec 12 01:54:08 2002 @@ -1092,8 +1092,8 @@ dnl $H empty (but @$=w.) R $+ + $* $+ $#_LOCAL_ $: $1 + $2plussed name? R $+ $+ $#_LOCAL_ $: @ $1 nope, local address', -`R$=L @ $=w . $#_LOCAL_ $: @ $1 special local names -R$+ @ $=w . $#_LOCAL_ $: $1 regular local name') +`R$=L @ $=w . $#_LOCAL_ $: @ $1`@'$2 special local names +R$+ @ $=w . $#_LOCAL_ $: $1`@'$2regular local name') By the way: +`R$=L @ $=w . $#_LOCAL_ $: @ $1`@'$2 special local names What defines class L ? It seems like I do not have a so called class L! And what does the first @ character in $#_LOCAL_ $: @ $1`@'$2 stand for ? ^ --Christian--
Re: cyrus-2.2-cvs: virtualdomains and sendmail virtusertable (cyrusv2as local mailer)
Christian Schulte schrieb: Jonathan Marsden schrieb: There are almost certainly neater ways, but I just patched sendmail.cf/m4/proto.m4 to do that. --- proto.m4.20020613 Thu Jun 13 11:53:24 2002 +++ proto.m4Thu Dec 12 01:54:08 2002 @@ -1092,8 +1092,8 @@ dnl $H empty (but @$=w.) R $+ + $* $+ $#_LOCAL_ $: $1 + $2plussed name? R $+ $+ $#_LOCAL_ $: @ $1 nope, local address', -`R$=L @ $=w . $#_LOCAL_ $: @ $1 special local names -R$+ @ $=w . $#_LOCAL_ $: $1 regular local name') +`R$=L @ $=w . $#_LOCAL_ $: @ $1`@'$2 special local names +R$+ @ $=w . $#_LOCAL_ $: $1`@'$2regular local name') I think the two lines you added should look like `R$=L @ $=w .$#_LOCAL_ $: @ $1 @ $2 special local names R$+ @ $=w . $#_LOCAL_ $: $1 @ $2 regular local name') don't they ? For me thinks work after chaning them this way !
Re: Shared folders and virtual domains ?
Ken Murchison wrote: Christian Schulte wrote: Ken Murchison wrote: Christian Schulte wrote: Ken Murchison wrote: Christian Schulte wrote: Ken Murchison wrote: Christian Schulte wrote: Ken Murchison wrote: Christian Schulte wrote: Hi, I am running 2_2 cvs branch with virtual domain support turned on and everything seemd to work fine. I now wanted to move my old installation to the new one and cannot get delivery to shared folders working. If I create a shared folder with cyradm like: $cm sharedfolder I cannot do $sam sharedfolder user@domain lrswipcda and get setaclmailbox: user@domain: lrswipcda: Invalid identifier If I create a shared folder with cyradm like: $cm sharedfolder@domain I can do $sam sharedfolder@domain user@domain lrswipcda and the user can subscribe to the folder and sees it on the same level than his inbox as expected. If I now setup sendmail to send via the cyrusv2 mailer with an address like +sharedfolder@domain I get the following errors in the logs which I do not understand ! What is wrong here ? Nov 15 02:55:33 mail lmtpunix[8259]: [ID 921384 local6.debug] accepted connection Nov 15 02:55:33 mail lmtpunix[8259]: [ID 685068 local6.debug] lmtp connection preauth'd as postman Nov 15 02:55:33 mail lmtpunix[8259]: [ID 152585 local6.error] couldn't create stage directory: : No such file or directory Nov 15 02:55:33 mail lmtpunix[8259]: [ID 519036 local6.error] IOERROR: creating message file 8259-1037325333: No such file or directory Nov 15 02:55:33 mail sendmail[8262]: [ID 801593 mail.info] gAF1rq13008256: to=+sharedfolder@domain, delay=00:01:41, xdelay=00:00:00, mailer=cyrusv2, pri=210378, relay=localhost, dsn=4.2.0, stat=Deferred: 451 4.3.2 cannot create temporary file: No such file or directory Sorry for the delay, but I finally got a chance to look into this. Cyrus isn't the problem here, the problem is that the MTA is stripping the domain off of the recipient address when it gets passed to lmtpd. Try changing the cyrusv2 mailer definition to use: S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP Does not work either! I had S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrToSMTP in my cyrusv2.m4 file and changing it to S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP produces the same error! sendmail delivers correctly to lmtpd, I think: 20776 === CONNECT localhost 20776 220 LMTP Cyrus v2.2.prealpha ready 20776 LHLO 20776 250-XXX 20776 250-8BITMIME 20776 250-ENHANCEDSTATUSCODES 20776 250-PIPELINING 20776 250-SIZE 20776 250-AUTH EXTERNAL 20776 250 IGNOREQUOTA 20776 MAIL From:[EMAIL PROTECTED] SIZE=1076 BODY=8BITMIME 20776 250 2.1.0 ok 20776 RCPT To:+sharedfolder@domain 20776 DATA 20776 250 2.1.5 ok 20776 451 4.3.2 cannot create temporary file: No such file or directory 20776 QUIT 20776 221 2.0.0 bye 20776 [EOF] And the logfile states the same errors ! What makes me a bit confused is the error message itself. lmtpd is trying to create a temporary file but the error is No such file or directory. Is it a missing directory or wrong permissions on a directory ? Sorry, I missed this in your original message. This error is a result of lmtpd's failure to create a spoolfile for the message. Most of the time this will be in the staging area of the recipient's partition (eg, /var/spool/imap/stage.), otherwise this will be in your temp space (call to tmpfile()). Check the ownership/permissions on the 'stage.' directory on your Cyrus partitions. It should look something like: [root@eagle imap]# ls -l /var/spool/imap/ total 8 drwx--3 cyrusmail 24 Jul 10 12:10 domain drwx--8 cyrusmail 73 Nov 5 12:51 netnews drwx-- 10 cyrusmail 4096 Oct 4 13:14 public drwx--2 cyrusmail6 Dec 3 10:18 stage. drwx-- 22 cyrusmail 4096 Aug 27 11:49 user I cannot get it to work. Still the same problem! I configured cyrus with --with-cyrus-user=cyrus and --with-cyrus-group=smmsp schulte-01:48:30:/var ls -l /var ... drwxr-xr-x 8 root bin 512 Sep 20 21:27 spool schulte-01:48:33:/var ls -l /var/spool/ ... drwxrwx--- 4 cyrussmmsp512 Nov 15 03:06 imap ... schulte-01:49:54:/var ls -l /var/spool/imap/ total 4 drwxrwxr-x 15 cyrussmmsp512 Dez 3 22:15 domain drwxrwxr-x 2 cyrussmmsp512 Dez 5 01:44 stage. If I do a ./mkimap -d domain I have to chmod 0770 /var/imap/db.backup* afterwards to get rid of DBERROR logentries during cyrus startup, so I think I have a permission problem but where ? --Christian-- Do you only get this problem when trying to deliver to a shared folder? Yes! Or does it happen when trying to deliver to any folder, including a user's
Re: Shared folders and virtual domains ?
Ken Murchison wrote: Christian Schulte wrote: Ken Murchison wrote: Christian Schulte wrote: Ken Murchison wrote: Christian Schulte wrote: Ken Murchison wrote: Christian Schulte wrote: Hi, I am running 2_2 cvs branch with virtual domain support turned on and everything seemd to work fine. I now wanted to move my old installation to the new one and cannot get delivery to shared folders working. If I create a shared folder with cyradm like: $cm sharedfolder I cannot do $sam sharedfolder user@domain lrswipcda and get setaclmailbox: user@domain: lrswipcda: Invalid identifier If I create a shared folder with cyradm like: $cm sharedfolder@domain I can do $sam sharedfolder@domain user@domain lrswipcda and the user can subscribe to the folder and sees it on the same level than his inbox as expected. If I now setup sendmail to send via the cyrusv2 mailer with an address like +sharedfolder@domain I get the following errors in the logs which I do not understand ! What is wrong here ? Nov 15 02:55:33 mail lmtpunix[8259]: [ID 921384 local6.debug] accepted connection Nov 15 02:55:33 mail lmtpunix[8259]: [ID 685068 local6.debug] lmtp connection preauth'd as postman Nov 15 02:55:33 mail lmtpunix[8259]: [ID 152585 local6.error] couldn't create stage directory: : No such file or directory Nov 15 02:55:33 mail lmtpunix[8259]: [ID 519036 local6.error] IOERROR: creating message file 8259-1037325333: No such file or directory Nov 15 02:55:33 mail sendmail[8262]: [ID 801593 mail.info] gAF1rq13008256: to=+sharedfolder@domain, delay=00:01:41, xdelay=00:00:00, mailer=cyrusv2, pri=210378, relay=localhost, dsn=4.2.0, stat=Deferred: 451 4.3.2 cannot create temporary file: No such file or directory Sorry for the delay, but I finally got a chance to look into this. Cyrus isn't the problem here, the problem is that the MTA is stripping the domain off of the recipient address when it gets passed to lmtpd. Try changing the cyrusv2 mailer definition to use: S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP Does not work either! I had S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrToSMTP in my cyrusv2.m4 file and changing it to S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP produces the same error! sendmail delivers correctly to lmtpd, I think: 20776 === CONNECT localhost 20776 220 LMTP Cyrus v2.2.prealpha ready 20776 LHLO 20776 250-XXX 20776 250-8BITMIME 20776 250-ENHANCEDSTATUSCODES 20776 250-PIPELINING 20776 250-SIZE 20776 250-AUTH EXTERNAL 20776 250 IGNOREQUOTA 20776 MAIL From:[EMAIL PROTECTED] SIZE=1076 BODY=8BITMIME 20776 250 2.1.0 ok 20776 RCPT To:+sharedfolder@domain 20776 DATA 20776 250 2.1.5 ok 20776 451 4.3.2 cannot create temporary file: No such file or directory 20776 QUIT 20776 221 2.0.0 bye 20776 [EOF] And the logfile states the same errors ! What makes me a bit confused is the error message itself. lmtpd is trying to create a temporary file but the error is No such file or directory. Is it a missing directory or wrong permissions on a directory ? Sorry, I missed this in your original message. This error is a result of lmtpd's failure to create a spoolfile for the message. Most of the time this will be in the staging area of the recipient's partition (eg, /var/spool/imap/stage.), otherwise this will be in your temp space (call to tmpfile()). Check the ownership/permissions on the 'stage.' directory on your Cyrus partitions. It should look something like: [root@eagle imap]# ls -l /var/spool/imap/ total 8 drwx--3 cyrusmail 24 Jul 10 12:10 domain drwx--8 cyrusmail 73 Nov 5 12:51 netnews drwx-- 10 cyrusmail 4096 Oct 4 13:14 public drwx--2 cyrusmail6 Dec 3 10:18 stage. drwx-- 22 cyrusmail 4096 Aug 27 11:49 user I cannot get it to work. Still the same problem! I configured cyrus with --with-cyrus-user=cyrus and --with-cyrus-group=smmsp schulte-01:48:30:/var ls -l /var ... drwxr-xr-x 8 root bin 512 Sep 20 21:27 spool schulte-01:48:33:/var ls -l /var/spool/ ... drwxrwx--- 4 cyrussmmsp512 Nov 15 03:06 imap ... schulte-01:49:54:/var ls -l /var/spool/imap/ total 4 drwxrwxr-x 15 cyrussmmsp512 Dez 3 22:15 domain drwxrwxr-x 2 cyrussmmsp512 Dez 5 01:44 stage. If I do a ./mkimap -d domain I have to chmod 0770 /var/imap/db.backup* afterwards to get rid of DBERROR logentries during cyrus startup, so I think I have a permission problem but where ? --Christian-- Do you only get this problem when trying to deliver to a shared folder? Yes! Or does it happen when trying to deliver to any folder, including a user's INBOX? No! Sieves' file into works correctly and delivery to all other folders than a shared folder also works for me! If I
Re: Shared folders and virtual domains ?
Ken Murchison wrote: Christian Schulte wrote: Ken Murchison wrote: Christian Schulte wrote: Ken Murchison wrote: Christian Schulte wrote: Ken Murchison wrote: Christian Schulte wrote: Hi, I am running 2_2 cvs branch with virtual domain support turned on and everything seemd to work fine. I now wanted to move my old installation to the new one and cannot get delivery to shared folders working. If I create a shared folder with cyradm like: $cm sharedfolder I cannot do $sam sharedfolder user@domain lrswipcda and get setaclmailbox: user@domain: lrswipcda: Invalid identifier If I create a shared folder with cyradm like: $cm sharedfolder@domain I can do $sam sharedfolder@domain user@domain lrswipcda and the user can subscribe to the folder and sees it on the same level than his inbox as expected. If I now setup sendmail to send via the cyrusv2 mailer with an address like +sharedfolder@domain I get the following errors in the logs which I do not understand ! What is wrong here ? Nov 15 02:55:33 mail lmtpunix[8259]: [ID 921384 local6.debug] accepted connection Nov 15 02:55:33 mail lmtpunix[8259]: [ID 685068 local6.debug] lmtp connection preauth'd as postman Nov 15 02:55:33 mail lmtpunix[8259]: [ID 152585 local6.error] couldn't create stage directory: : No such file or directory Nov 15 02:55:33 mail lmtpunix[8259]: [ID 519036 local6.error] IOERROR: creating message file 8259-1037325333: No such file or directory Nov 15 02:55:33 mail sendmail[8262]: [ID 801593 mail.info] gAF1rq13008256: to=+sharedfolder@domain, delay=00:01:41, xdelay=00:00:00, mailer=cyrusv2, pri=210378, relay=localhost, dsn=4.2.0, stat=Deferred: 451 4.3.2 cannot create temporary file: No such file or directory Sorry for the delay, but I finally got a chance to look into this. Cyrus isn't the problem here, the problem is that the MTA is stripping the domain off of the recipient address when it gets passed to lmtpd. Try changing the cyrusv2 mailer definition to use: S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP Does not work either! I had S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrToSMTP in my cyrusv2.m4 file and changing it to S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP produces the same error! sendmail delivers correctly to lmtpd, I think: 20776 === CONNECT localhost 20776 220 LMTP Cyrus v2.2.prealpha ready 20776 LHLO 20776 250-XXX 20776 250-8BITMIME 20776 250-ENHANCEDSTATUSCODES 20776 250-PIPELINING 20776 250-SIZE 20776 250-AUTH EXTERNAL 20776 250 IGNOREQUOTA 20776 MAIL From:[EMAIL PROTECTED] SIZE=1076 BODY=8BITMIME 20776 250 2.1.0 ok 20776 RCPT To:+sharedfolder@domain 20776 DATA 20776 250 2.1.5 ok 20776 451 4.3.2 cannot create temporary file: No such file or directory 20776 QUIT 20776 221 2.0.0 bye 20776 [EOF] And the logfile states the same errors ! What makes me a bit confused is the error message itself. lmtpd is trying to create a temporary file but the error is No such file or directory. Is it a missing directory or wrong permissions on a directory ? Sorry, I missed this in your original message. This error is a result of lmtpd's failure to create a spoolfile for the message. Most of the time this will be in the staging area of the recipient's partition (eg, /var/spool/imap/stage.), otherwise this will be in your temp space (call to tmpfile()). Check the ownership/permissions on the 'stage.' directory on your Cyrus partitions. It should look something like: [root@eagle imap]# ls -l /var/spool/imap/ total 8 drwx--3 cyrusmail 24 Jul 10 12:10 domain drwx--8 cyrusmail 73 Nov 5 12:51 netnews drwx-- 10 cyrusmail 4096 Oct 4 13:14 public drwx--2 cyrusmail6 Dec 3 10:18 stage. drwx-- 22 cyrusmail 4096 Aug 27 11:49 user I cannot get it to work. Still the same problem! I configured cyrus with --with-cyrus-user=cyrus and --with-cyrus-group=smmsp schulte-01:48:30:/var ls -l /var ... drwxr-xr-x 8 root bin 512 Sep 20 21:27 spool schulte-01:48:33:/var ls -l /var/spool/ ... drwxrwx--- 4 cyrussmmsp512 Nov 15 03:06 imap ... schulte-01:49:54:/var ls -l /var/spool/imap/ total 4 drwxrwxr-x 15 cyrussmmsp512 Dez 3 22:15 domain drwxrwxr-x 2 cyrussmmsp512 Dez 5 01:44 stage. If I do a ./mkimap -d domain I have to chmod 0770 /var/imap/db.backup* afterwards to get rid of DBERROR logentries during cyrus startup, so I think I have a permission problem but where ? --Christian-- Do you only get this problem when trying to deliver to a shared folder? Yes! Or does it happen when trying to deliver to any folder, including a user's INBOX? No! Sieves' file into works correctly and delivery to all other folders than a shared folder also works for me! If I
Re: Shared folders and virtual domains ?
Ken Murchison wrote: Christian Schulte wrote: Ken Murchison wrote: Christian Schulte wrote: Hi, I am running 2_2 cvs branch with virtual domain support turned on and everything seemd to work fine. I now wanted to move my old installation to the new one and cannot get delivery to shared folders working. If I create a shared folder with cyradm like: $cm sharedfolder I cannot do $sam sharedfolder user@domain lrswipcda and get setaclmailbox: user@domain: lrswipcda: Invalid identifier If I create a shared folder with cyradm like: $cm sharedfolder@domain I can do $sam sharedfolder@domain user@domain lrswipcda and the user can subscribe to the folder and sees it on the same level than his inbox as expected. If I now setup sendmail to send via the cyrusv2 mailer with an address like +sharedfolder@domain I get the following errors in the logs which I do not understand ! What is wrong here ? Nov 15 02:55:33 mail lmtpunix[8259]: [ID 921384 local6.debug] accepted connection Nov 15 02:55:33 mail lmtpunix[8259]: [ID 685068 local6.debug] lmtp connection preauth'd as postman Nov 15 02:55:33 mail lmtpunix[8259]: [ID 152585 local6.error] couldn't create stage directory: : No such file or directory Nov 15 02:55:33 mail lmtpunix[8259]: [ID 519036 local6.error] IOERROR: creating message file 8259-1037325333: No such file or directory Nov 15 02:55:33 mail sendmail[8262]: [ID 801593 mail.info] gAF1rq13008256: to=+sharedfolder@domain, delay=00:01:41, xdelay=00:00:00, mailer=cyrusv2, pri=210378, relay=localhost, dsn=4.2.0, stat=Deferred: 451 4.3.2 cannot create temporary file: No such file or directory Sorry for the delay, but I finally got a chance to look into this. Cyrus isn't the problem here, the problem is that the MTA is stripping the domain off of the recipient address when it gets passed to lmtpd. Try changing the cyrusv2 mailer definition to use: S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP Does not work either! I had S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrToSMTP in my cyrusv2.m4 file and changing it to S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP produces the same error! sendmail delivers correctly to lmtpd, I think: 20776 === CONNECT localhost 20776 220 LMTP Cyrus v2.2.prealpha ready 20776 LHLO 20776 250-XXX 20776 250-8BITMIME 20776 250-ENHANCEDSTATUSCODES 20776 250-PIPELINING 20776 250-SIZE 20776 250-AUTH EXTERNAL 20776 250 IGNOREQUOTA 20776 MAIL From:[EMAIL PROTECTED] SIZE=1076 BODY=8BITMIME 20776 250 2.1.0 ok 20776 RCPT To:+sharedfolder@domain 20776 DATA 20776 250 2.1.5 ok 20776 451 4.3.2 cannot create temporary file: No such file or directory 20776 QUIT 20776 221 2.0.0 bye 20776 [EOF] And the logfile states the same errors ! What makes me a bit confused is the error message itself. lmtpd is trying to create a temporary file but the error is No such file or directory. Is it a missing directory or wrong permissions on a directory ? Sorry, I missed this in your original message. This error is a result of lmtpd's failure to create a spoolfile for the message. Most of the time this will be in the staging area of the recipient's partition (eg, /var/spool/imap/stage.), otherwise this will be in your temp space (call to tmpfile()). Check the ownership/permissions on the 'stage.' directory on your Cyrus partitions. It should look something like: [root@eagle imap]# ls -l /var/spool/imap/ total 8 drwx--3 cyrusmail 24 Jul 10 12:10 domain drwx--8 cyrusmail 73 Nov 5 12:51 netnews drwx-- 10 cyrusmail 4096 Oct 4 13:14 public drwx--2 cyrusmail6 Dec 3 10:18 stage. drwx-- 22 cyrusmail 4096 Aug 27 11:49 user I cannot get it to work. Still the same problem! I configured cyrus with --with-cyrus-user=cyrus and --with-cyrus-group=smmsp schulte-01:48:30:/var ls -l /var ... drwxr-xr-x 8 root bin 512 Sep 20 21:27 spool schulte-01:48:33:/var ls -l /var/spool/ ... drwxrwx--- 4 cyrussmmsp512 Nov 15 03:06 imap ... schulte-01:49:54:/var ls -l /var/spool/imap/ total 4 drwxrwxr-x 15 cyrussmmsp512 Dez 3 22:15 domain drwxrwxr-x 2 cyrussmmsp512 Dez 5 01:44 stage. If I do a ./mkimap -d domain I have to chmod 0770 /var/imap/db.backup* afterwards to get rid of DBERROR logentries during cyrus startup, so I think I have a permission problem but where ? --Christian--
Re: PostgreSQL backend: a waste of time?
Nicola Ranaldo wrote: But another main reason is that I hold in the same database user passwords and other accounting informations, imp prefs/addressbook, and all my sendmail maps (Yes! also virtusertable!). Hello, that sounds interesting for me! Did you patch sendmail to read its maps out from a database ? How did you do that ? I mean: If there exist documentation on how to do this, I would like to know where I can find that ! --Christian--
Re: Shared folders and virtual domains ?
Jonathan Marsden wrote: On 3 Dec 2002, Christian Schulte writes: 20776 MAIL From:[EMAIL PROTECTED] SIZE=1076 BODY=8BITMIME 20776 250 2.1.0 ok 20776 RCPT To:+sharedfolder@domain 20776 DATA 20776 250 2.1.5 ok 20776 451 4.3.2 cannot create temporary file: No such file or directory And the logfile states the same errors ! What makes me a bit confused is the error message itself. lmtpd is trying to create a temporary file but the error is No such file or directory. Is it a missing directory or wrong permissions on a directory ? No such file or directory is a standard Unix error text for a single error code, ENOENT, defined in /usr/include/asm/errno.h on my Linux boxes. Don't read too much into the or directory part if the code concerned is not trying to work with a directory :-) I think this issue may be a version of something I tried to report some weeks back, which someone (Ken? I forget) thought might be hardware related, and then found a workaround for that was 'good enough' for me for the moment. The issue for me was that (based on my experiments) the default domain should not be passed to LMTP, only the other non-default ones. Any other approach generated the error message you are reporting. I suspect that had your RCPT TO: line read 20776 RCPT To:+sharedfolder it would have been accepted just fine! I do not know why that is -- I suspect some form of attempted backward compatibility? What I did to fix this here was a small, quick and slightly ugly patch to the sendmail sendmail-cf/m4/proto.m4 file, causing it to send the @domain part of the recipient address on to LMTP for all domains *except* the default one. I had every intention of going back and really figuring out what is going on well enough to report it in a clear way that makes more sense to the developers at some stage... but so far I have not found (or made?) time to do so. In case it helps, here is my patch. It helped for my situation. Jonathan --- /usr/share/sendmail-cf/m4.orig/proto.m4 Thu Jun 13 11:53:24 2002 +++ /usr/share/sendmail-cf/m4/proto.m4 Thu Oct 3 15:11:10 2002 @@ -1092,8 +1092,10 @@ dnl $H empty (but @$=w.) R $+ + $* $+ $#_LOCAL_ $: $1 + $2plussed name? R $+ $+ $#_LOCAL_ $: @ $1 nope, local address', -`R$=L @ $=w . $#_LOCAL_ $: @ $1 special local names -R$+ @ $=w . $#_LOCAL_ $: $1 regular local name') +`R$+ @ $m . $#_LOCAL_ $: $1 regular local name default domain') +R$+ @ $j . $#_LOCAL_ $: $1 regular local name default host') +R$=L @ $=w .$#_LOCAL_ $: @ $1`@'$2 special local names +R$+ @ $=w . $#_LOCAL_ $: $1`@'$2regular local name') ifdef(`_MAILER_TABLE_', `dnl # not local -- try mailer table lookup -- Jonathan Marsden | Internet: [EMAIL PROTECTED] | Making electronic 1252 Judson Street | Phone: +1 (909) 795-3877 | communications work Redlands, CA 92374 | Fax: +1 (909) 795-0327 | reliably for Christian USA | http://www.xc.org/jonathan | missions worldwide Thanks a lot for your answer! Actually I am trying to deliver to a shared folder which is not in the servers' default domain! Maybe I should mention here, how I setup my sendmail: In sendmail the local mailer is cyrus! I am running a cyrus 2.0.16 installation on the same machine but different interface! The cyrusv2 mailer gets set in the mailertable. So if I want to deliver to the cyrusv2 mailer I have to delete the domain from the /etc/mail/local-host-names and then in the mailertable I specify this domain like: domaincyrusv2:domain I do not know if that may be my problem but delivery to all other accountds on the cyrusv2 installation using mailertable not dealing with shared folders work corretcly! --Christian--
Re: Shared folders and virtual domains ?
Ken Murchison wrote: Christian Schulte wrote: Hi, I am running 2_2 cvs branch with virtual domain support turned on and everything seemd to work fine. I now wanted to move my old installation to the new one and cannot get delivery to shared folders working. If I create a shared folder with cyradm like: $cm sharedfolder I cannot do $sam sharedfolder user@domain lrswipcda and get setaclmailbox: user@domain: lrswipcda: Invalid identifier If I create a shared folder with cyradm like: $cm sharedfolder@domain I can do $sam sharedfolder@domain user@domain lrswipcda and the user can subscribe to the folder and sees it on the same level than his inbox as expected. If I now setup sendmail to send via the cyrusv2 mailer with an address like +sharedfolder@domain I get the following errors in the logs which I do not understand ! What is wrong here ? Nov 15 02:55:33 mail lmtpunix[8259]: [ID 921384 local6.debug] accepted connection Nov 15 02:55:33 mail lmtpunix[8259]: [ID 685068 local6.debug] lmtp connection preauth'd as postman Nov 15 02:55:33 mail lmtpunix[8259]: [ID 152585 local6.error] couldn't create stage directory: : No such file or directory Nov 15 02:55:33 mail lmtpunix[8259]: [ID 519036 local6.error] IOERROR: creating message file 8259-1037325333: No such file or directory Nov 15 02:55:33 mail sendmail[8262]: [ID 801593 mail.info] gAF1rq13008256: to=+sharedfolder@domain, delay=00:01:41, xdelay=00:00:00, mailer=cyrusv2, pri=210378, relay=localhost, dsn=4.2.0, stat=Deferred: 451 4.3.2 cannot create temporary file: No such file or directory Sorry for the delay, but I finally got a chance to look into this. Cyrus isn't the problem here, the problem is that the MTA is stripping the domain off of the recipient address when it gets passed to lmtpd. Try changing the cyrusv2 mailer definition to use: S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP Does not work either! I had S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrToSMTP in my cyrusv2.m4 file and changing it to S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP produces the same error! sendmail delivers correctly to lmtpd, I think: 20776 === CONNECT localhost 20776 220 LMTP Cyrus v2.2.prealpha ready 20776 LHLO 20776 250-XXX 20776 250-8BITMIME 20776 250-ENHANCEDSTATUSCODES 20776 250-PIPELINING 20776 250-SIZE 20776 250-AUTH EXTERNAL 20776 250 IGNOREQUOTA 20776 MAIL From:[EMAIL PROTECTED] SIZE=1076 BODY=8BITMIME 20776 250 2.1.0 ok 20776 RCPT To:+sharedfolder@domain 20776 DATA 20776 250 2.1.5 ok 20776 451 4.3.2 cannot create temporary file: No such file or directory 20776 QUIT 20776 221 2.0.0 bye 20776 [EOF] And the logfile states the same errors ! What makes me a bit confused is the error message itself. lmtpd is trying to create a temporary file but the error is No such file or directory. Is it a missing directory or wrong permissions on a directory ?
Sieveshell does not work anymore...
Hello, I have a problem getting sieveshell to work again. If I invoke it like this /usr/local/cyrus2-cvs/bin/sieveshell 127.0.0.1 I get connecting to 127.0.0.1 unable to connect to server at /usr/local/cyrus2-cvs/bin/sieveshell line 174. and the logs say Nov 26 18:00:36 mail master[1769]: [ID 392559 local6.debug] about to exec /usr/local/cyrus2-cvs/bin/timsieved Nov 26 18:00:36 mail sieve[1769]: [ID 518349 local6.debug] executed Nov 26 18:00:36 mail sieve[1769]: [ID 921384 local6.debug] accepted connection Nov 26 18:00:36 mail perl[1768]: [ID 702911 auth.error] unable to dlopen /usr/lib/sasl2/libmysql.so.2: ld.so.1: /usr/local/perl-5.8.0/bin/perl: fatal: relocation error: file /usr/l ocal/lib/mysql/libmysqlclient.so.10: symbol __udivdi3: referenced symbol not found Nov 26 18:00:36 mail perl[1768]: [ID 702911 auth.notice] Bad IPLOCALPORT value Nov 26 18:00:36 mail master[23921]: [ID 310780 local6.debug] process 1769 exited, status 0 However cyradm is working and sieve is filtering mail ! The only thing which does not work is sieveshell itself and because of the dependency of websieve to managesieve, websieve does not work. So it seems to be a problem with managesieve.so. I setup sasl2 to authenticate against a mysql database and this also works. I can login into my imap account with the users from the db. With cyradm as well as with my email clients! If I compare the libraries linked into the two files IMAP.so and managesieve.so they are linked with the same libraries: schulte-18:05:16:~ ldd /usr/local/cyrus2-cvs/lib/site_perl/5.8.0/i86pc-solaris/auto/Cyrus/IMAP/IMAP.so librt.so.1 =/usr/lib/librt.so.1 libdb-3.2.so = /usr/local/lib/libdb-3.2.so libsasl2.so.2 = /usr/local/lib/libsasl2.so.2 libssl.so.0.9.6 = /usr/local/ssl/lib/libssl.so.0.9.6 libcrypto.so.0.9.6 =/usr/local/ssl/lib/libcrypto.so.0.9.6 libaio.so.1 = /usr/lib/libaio.so.1 libc.so.1 = /usr/lib/libc.so.1 libdl.so.1 =/usr/lib/libdl.so.1 libresolv.so.2 =/usr/lib/libresolv.so.2 libsocket.so.1 =/usr/lib/libsocket.so.1 libnsl.so.1 = /usr/lib/libnsl.so.1 libmp.so.2 =/usr/lib/libmp.so.2 schulte-18:05:20:~ ldd /usr/local/cyrus2-cvs/lib/site_perl/5.8.0/i86pc-solaris/auto/Cyrus/SIEVE/managesieve/managesieve.so librt.so.1 =/usr/lib/librt.so.1 libsasl2.so.2 = /usr/local/lib/libsasl2.so.2 libdb-3.2.so = /usr/local/lib/libdb-3.2.so libssl.so.0.9.6 = /usr/local/ssl/lib/libssl.so.0.9.6 libcrypto.so.0.9.6 =/usr/local/ssl/lib/libcrypto.so.0.9.6 libaio.so.1 = /usr/lib/libaio.so.1 libc.so.1 = /usr/lib/libc.so.1 libdl.so.1 =/usr/lib/libdl.so.1 libresolv.so.2 =/usr/lib/libresolv.so.2 libsocket.so.1 =/usr/lib/libsocket.so.1 libnsl.so.1 = /usr/lib/libnsl.so.1 libmp.so.2 =/usr/lib/libmp.so.2 As of this logentry, sasl does not seem to work properly, but as said, everything works except sieveshell and websieve and thus the sieve perl module seems to be broken? Nov 26 18:00:36 mail perl[1768]: [ID 702911 auth.error] unable to dlopen /usr/lib/sasl2/libmysql.so.2: ld.so.1: /usr/local/perl-5.8.0/bin/perl: fatal: relocation error: file /usr/l ocal/lib/mysql/libmysqlclient.so.10: symbol __udivdi3: referenced symbol not found Which library defines __udivdi3 ? Is it a missing library not linked into managesieve.so ? But why does cyradm work and managesieve does not ? --Christian--
Re: How to make cyrus not change non US-ASCII characters to X
Sergey Mukhin wrote: A == Alessandro Oliveira [EMAIL PROTECTED] writes: A Date: Wed, 20 Nov 2002 09:30:31 -0200 A To: info-cyrus [EMAIL PROTECTED] A Hi, A I'd like to know if there is a way to avoid this cyrus behavior, my A users are getting very angry with it. A Thanks for any help, Yes, users do. And notice about strict 7-bit ASCII within headers does not help. Same problem using Cyrillic. I have not found anything else and used a simple hack. Locate the following 2 files in the source tree: lmtpengine.c and message.c change them the following way ( by inserting `#if 0' and `#endif' ) and re-compile the entire software. This eliminates the substitution unconditionally. lmtpengine.c: . /* ignore this whitespace, but we'll copy all the rest in */ break; } else { // HACK -- Violet #if 0 if (c = 0x80) { if (reject8bit) { /* We have been configured to reject all mail of this form. */ r = IMAP_MESSAGE_CONTAINS8BIT; goto ph_error; } else { /* We have been configured to munge all mail of this form. */ c = 'X'; } } #endif /* just an ordinary character */ body[off++] = c; . and message.c: . else { sawcr = 0; blankline = 0; // HACK -- Violet #if 0 if (inheader *p = 0x80) { if (reject8bit) { /* We have been configured to reject all mail of this form. */ if (!r) r = IMAP_MESSAGE_CONTAINS8BIT; } else { /* We have been configured to munge all mail of this form. */ *p = 'X'; } } #endif } } fwrite(buf, 1, n, to); } . A Alessandro Oliveira A Nuno Ferreira Cargas Internacionais Ltda. A Phone: +55-11-3241-2000 A Fax : +55-11-3242-9891 A --- A It's trivial to make fun of Microsoft products, but it takes a real A man to make them work, and a god to make them do anything useful. In 2.2 cvs you do this in message.c and spool.c
Re: How to make cyrus not change non US-ASCII characters to X
Alessandro Oliveira wrote: Is there any possibility to put this as an autoconf option? maybe something like: ./configure --enable-strict-headers | --disable-strict-headers would do the trick, or even better, a runtime configuration option !!! what are the REAL consequences of having 8bit characters in the Subject header ? Thanks, Alessandro Oliveira A Date: Wed, 20 Nov 2002 09:30:31 -0200 A To: info-cyrus [EMAIL PROTECTED] A Hi, A I'd like to know if there is a way to avoid this cyrus behavior, my A users are getting very angry with it. A Thanks for any help, Yes, users do. And notice about strict 7-bit ASCII within headers does not help. Same problem using Cyrillic. I have not found anything else and used a simple hack. Locate the following 2 files in the source tree: lmtpengine.c and message.c change them the following way ( by inserting `#if 0' and `#endif' ) and re-compile the entire software. This eliminates the substitution unconditionally. lmtpengine.c: . /* ignore this whitespace, but we'll copy all the rest in */ break; } else { // HACK -- Violet #if 0 if (c = 0x80) { if (reject8bit) { /* We have been configured to reject all mail of this form. */ r = IMAP_MESSAGE_CONTAINS8BIT; goto ph_error; } else { /* We have been configured to munge all mail of this form. */ c = 'X'; } } #endif /* just an ordinary character */ body[off++] = c; . and message.c: . else { sawcr = 0; blankline = 0; // HACK -- Violet #if 0 if (inheader *p = 0x80) { if (reject8bit) { /* We have been configured to reject all mail of this form. */ if (!r) r = IMAP_MESSAGE_CONTAINS8BIT; } else { /* We have been configured to munge all mail of this form. */ *p = 'X'; } } #endif } } fwrite(buf, 1, n, to); } . In 2.2 cvs you do this in message.c and spool.c I thought that cyrus does not only replace non US-ASCII characters in the mail-header. If a mail with a specified enconding of US-ASCII gets send through LMTP all non US-ASCII characters in the mail body get replaced to X also! My users were not interested in this behaviour if that would only affect the header. The problem is that in e.g. germany all umlauts like ä,ü,ö etc. get replaced in the body if specified as US-ASCII. Of course the mail body specifies a wrong character encoding if sent as US-ASCII but containing umlauts but even a big free-mail-provider (www.web.de) in germany with millions of users sends his newsletter in US-ASCII but with umlauts! I got it done with these small source-changes but this will not change user from sending mail in wrong encodings :-(
Re: OT LVM Snapshot for backups (was: Best way to backup cyrus syste)
Jared Watkins wrote: I would think you could use LVM the linux volume manager along with it's snapshot feature.. and then any sort of backup program you want. I'm not using this method yet... but I will be soon... is anyone else out there running LVM or some other volume manager under linux in production? Jared I have had many many troubles with the linux LVM itself. I would rather suggest using a well configured linux softare raid. This is much more stable than LVM! I lost 250GB because of LVM and did not have a backup. With software raid on linux this would not have happened
Re: Configuration Tools.
Joshua Schmidlkofer wrote: What is the preferred method of managing Cyrus? js Have a look at the websieve sourceforge project! Its a perl based cgi application for managing cyrus sieve and imap!
Re: How to make cyrus not change non US-ASCII characters to X
Alessandro Oliveira wrote: Maybe the best solution would be a filter to change the message body encoding using quoted-printable instead of putting X everywhere, and change headers to also use the appropriate encoding. What do you think about this ? Christian Schulte escreveu: Is there any possibility to put this as an autoconf option? maybe something like: ./configure --enable-strict-headers | --disable-strict-headers would do the trick, or even better, a runtime configuration option !!! what are the REAL consequences of having 8bit characters in the Subject header ? A Date: Wed, 20 Nov 2002 09:30:31 -0200 A To: info-cyrus [EMAIL PROTECTED] A Hi, A I'd like to know if there is a way to avoid this cyrus behavior, my A users are getting very angry with it. A Thanks for any help, Yes, users do. And notice about strict 7-bit ASCII within headers does not help. Same problem using Cyrillic. I have not found anything else and used a simple hack. Locate the following 2 files in the source tree: lmtpengine.c and message.c change them the following way ( by inserting `#if 0' and `#endif' ) and re-compile the entire software. This eliminates the substitution unconditionally. lmtpengine.c: . /* ignore this whitespace, but we'll copy all the rest in */ break; } else { // HACK -- Violet #if 0 if (c = 0x80) { if (reject8bit) { /* We have been configured to reject all mail of this form. */ r = IMAP_MESSAGE_CONTAINS8BIT; goto ph_error; } else { /* We have been configured to munge all mail of this form. */ c = 'X'; } } #endif /* just an ordinary character */ body[off++] = c; . and message.c: . else { sawcr = 0; blankline = 0; // HACK -- Violet #if 0 if (inheader *p = 0x80) { if (reject8bit) { /* We have been configured to reject all mail of this form. */ if (!r) r = IMAP_MESSAGE_CONTAINS8BIT; } else { /* We have been configured to munge all mail of this form. */ *p = 'X'; } } #endif } } fwrite(buf, 1, n, to); } . In 2.2 cvs you do this in message.c and spool.c I thought that cyrus does not only replace non US-ASCII characters in the mail-header. If a mail with a specified enconding of US-ASCII gets send through LMTP all non US-ASCII characters in the mail body get replaced to X also! My users were not interested in this behaviour if that would only affect the header. The problem is that in e.g. germany all umlauts like ä,ü,ö etc. get replaced in the body if specified as US-ASCII. Of course the mail body specifies a wrong character encoding if sent as US-ASCII but containing umlauts but even a big free-mail-provider (www.web.de) in germany with millions of users sends his newsletter in US-ASCII but with umlauts! I got it done with these small source-changes but this will not change user from sending mail in wrong encodings :-( That are things which can be done with sendmail before delivering to LMTP but I did not get it done right now! The convert-code in sendmail is quite buggy in 8.12.6 and cannot reliably convert encodings as well. Adding such features to lmtpd in cyrus would be great but I think that this is not a asap-topic.
DBERROR: error listing log files: Permission denied
After doing cvs update on my perfectly running 2.2 installation these messages appear in the logs which did not happen before I did the update! Is that anything serious ? Can it be ignored ? What changed that this suddenly happens ? Nov 18 12:53:36 mail ctl_cyrusdb[7462]: [ID 854764 local6.error] DBERROR: error listing log files: Permission denied Nov 18 12:53:36 mail ctl_cyrusdb[7462]: [ID 686478 local6.error] DBERROR: archive /var/imap/db: cyrusdb error Nov 18 12:53:36 mail ctl_cyrusdb[7462]: [ID 854764 local6.error] DBERROR: error listing log files: Permission denied Nov 18 12:53:36 mail ctl_cyrusdb[7462]: [ID 686478 local6.error] DBERROR: archive /var/imap/db: cyrusdb error
Re: DBERROR: error listing log files: Permission denied
Ken Murchison wrote: Christian Schulte wrote: After doing cvs update on my perfectly running 2.2 installation these messages appear in the logs which did not happen before I did the update! Is that anything serious ? Can it be ignored ? What changed that this suddenly happens ? Nov 18 12:53:36 mail ctl_cyrusdb[7462]: [ID 854764 local6.error] DBERROR: error listing log files: Permission denied Nov 18 12:53:36 mail ctl_cyrusdb[7462]: [ID 686478 local6.error] DBERROR: archive /var/imap/db: cyrusdb error Nov 18 12:53:36 mail ctl_cyrusdb[7462]: [ID 854764 local6.error] DBERROR: error listing log files: Permission denied Nov 18 12:53:36 mail ctl_cyrusdb[7462]: [ID 686478 local6.error] DBERROR: archive /var/imap/db: cyrusdb error Did you do: make distclean rm configure sh SMakefile ./configure ... make If not, you should. Even if your code compiled cleanly, things frequently change enough to cause weird behavior if you don't do a complete rebuild. I just did that again but the error did not disappear ! I wonder what happened right now, because nothing was changed than cvs update;rm configure;./SMakefile;./configure --same-options-than-before;make;make install and then there are these messages in the log althought the imapd seems to work propperly ?!?
Re: DBERROR: error listing log files: Permission denied
Rob Siemborski wrote: On Mon, 18 Nov 2002, Christian Schulte wrote: After doing cvs update on my perfectly running 2.2 installation these messages appear in the logs which did not happen before I did the update! Is that anything serious ? Can it be ignored ? What changed that this suddenly happens ? [snip] There was a recent change to init all of the database backends at once, which I suspect is causing this problem What are the permissions on (configdirectory)/db, out of curiosity? -Rob -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456 Research Systems Programmer * /usr/contributed Gatekeeper schulte-15:19:47:~ ls -l /var/imap total 464 drwxr-xr-x 2 cyrussmmsp512 Nov 12 18:06 db drwx-- 2 cyrussmmsp512 Nov 18 15:12 db.backup1 drwx-- 2 cyrussmmsp512 Nov 18 14:45 db.backup2 -rw--- 1 cyrussmmsp 172032 Nov 18 15:12 deliver.db drwxr-xr-x 5 cyrussmmsp512 Nov 8 16:40 domain drwxr-xr-x 2 cyrussmmsp512 Okt 21 18:54 log -rw--- 1 cyrussmmsp 11600 Nov 15 03:06 mailboxes.db drwxr-xr-x 2 cyrussmmsp512 Okt 21 18:54 msg drwxr-xr-x 2 cyrussmmsp 3072 Nov 18 14:54 proc drwxr-xr-x 28 cyrussmmsp512 Okt 21 18:54 quota drwxr-xr-x 2 cyrussmmsp512 Nov 18 08:03 socket -rw--- 1 cyrussmmsp 32768 Nov 18 06:03 tls_sessions.db drwxr-xr-x 28 cyrussmmsp512 Okt 21 18:54 user schulte-15:19:50:~ ls -l /var/imap/db total 30850 -rw-rw 1 cyrussmmsp 16384 Nov 12 18:06 __db.001 -rw-rw 1 cyrussmmsp 270336 Nov 15 18:10 __db.002 -rw-rw 1 cyrussmmsp 98304 Nov 12 18:06 __db.003 -rw-rw 1 cyrussmmsp18563072 Nov 12 18:06 __db.004 -rw-rw 1 cyrussmmsp 24576 Nov 12 18:06 __db.005 -rw-rw 1 cyrussmmsp3187063 Nov 18 15:20 log.01 -rw-rw 1 cyrussmmsp 4 Nov 12 18:06 skipstamp --Christian--
Sendmail, SASL2 and mysql - Sendmail does not read Sendmail.confcompletely !
Hi, this is more related to cyrus-sasl than cyrus-imapd. If I put the following lines into my imapd.conf prepending sasl_ to each option, the imapd greatly authenticates users agains a mysql database as wanted. This was not that hard to setup and worked after short time. pwcheck_method: auxprop auxprop_plugin: mysql allowanonymouslogin: no allowplaintext: yes mech_list: PLAIN LOGIN mysql_user: auser mysql_passwd: apassword mysql_hostnames: localhost mysql_database: admin mysql_statement: select password from SASLUser where login='%u' and domain='%r' and IMAP='YES' mysql_verbose: yes I now wanted to let sendmail-8.12.6 authenticate against the same users using the same mysql database. Therefore I compiled sendmail with -DSASL=2 and linked it against -lsasl2. That also worked at once. If I setup sendmail in /usr/lib/sasl/Sendmail.conf to authenticate against /etc/sasldb2 all works so sasl seems to be compiled into sendmail correctly. After adding a user with saslpasswd2 with a password, sendmail could authenticate against the sasldb2 file. But if I put the above lines into /usr/lib/sasl/Sendmail.conf I cannot get it to work. First I thought that I had to configure it in /usr/lib/sasl2/Sendmail.conf but after extensivley using truss utility I saw that sendmail tried to read /usr/lib/sasl/Sendmail.conf Here is, how far I got it to work: First I saw in the truss output that mysql says something like Access denied for user root@localhost (using password: NO) So sendmail actually tries to connect to the database and seems to read the options auxprop_plugin and pwcheck_method correctly. Because I was not able to get the configuration done and to let sendmail use the specified user and password, I changed the privileges of the mysql-user root so that sendmail can login to mysql with root@localhost without password. The next thing which then happens is, that sendmail successfully connects to mysql but then truss output says that mysql answers with something like No database selected.. As it seems to me, sendmail completely ignores all options other than auxprop_plugin and pwcheck_method. These two options are interpreted correctly but all other mysql related options get ignored. Why ? What am I doing wrong ? Would be great, if anybody, who has such setup running with sendmail could post here, how it is done and how one can tell sendmail to read the complete Sendmail.conf options correctly.
Shared folders and virtual domains ?
Hi, I am running 2_2 cvs branch with virtual domain support turned on and everything seemd to work fine. I now wanted to move my old installation to the new one and cannot get delivery to shared folders working. If I create a shared folder with cyradm like: $cm sharedfolder I cannot do $sam sharedfolder userdomain lrswipcda and get setaclmailbox: userdomain: lrswipcda: Invalid identifier If I create a shared folder with cyradm like: $cm sharedfolderdomain I can do $sam sharedfolderdomain userdomain lrswipcda and the user can subscribe to the folder and sees it on the same level than his inbox as expected. If I now setup sendmail to send via the cyrusv2 mailer with an address like +sharedfolderdomain I get the following errors in the logs which I do not understand ! What is wrong here ? Nov 15 02:55:33 mail lmtpunix[8259]: [ID 921384 local6.debug] accepted connection Nov 15 02:55:33 mail lmtpunix[8259]: [ID 685068 local6.debug] lmtp connection preauth'd as postman Nov 15 02:55:33 mail lmtpunix[8259]: [ID 152585 local6.error] couldn't create stage directory: : No such file or directory Nov 15 02:55:33 mail lmtpunix[8259]: [ID 519036 local6.error] IOERROR: creating message file 8259-1037325333: No such file or directory Nov 15 02:55:33 mail sendmail[8262]: [ID 801593 mail.info] gAF1rq13008256: to=+sharedfolderdomain, delay=00:01:41, xdelay=00:00:00, mailer=cyrusv2, pri=210378, relay=localhost, dsn=4.2.0, stat=Deferred: 451 4.3.2 cannot create temporary file: No such file or directory ---Christian---
Upgrade to Berkeley DB 4 and now the server crashes ---- HELP !!!
I upgraded to Berkeley 4.1.24 and now the whole installation does not work. I made ctl_cyrusdb -r but that does not fix it. What can I do either! I really need the mailserver working again as soon as possible. Its a never change a running system thing but now many people dont have email todayPlease help! Oct 18 11:46:33 mail master[6138]: [ID 228336 local6.notice] got SIGHUP Oct 18 11:46:33 mail master[19212]: [ID 392559 local6.debug] about to exec /usr/local/cyrus2-cvs/bin/tls_prune Oct 18 11:46:33 mail tls_prune[19212]: [ID 866726 local6.warning] DBERROR db4: fatal region error detected; run recovery Oct 18 11:46:33 mail tls_prune[19212]: [ID 301778 local6.error] DBERROR: dbenv-open '/var/imap/db' failed: DB_RUNRECOVERY: Fatal error, run database recovery Oct 18 11:46:33 mail tls_prune[19212]: [ID 866726 local6.warning] DBERROR db4: environment not yet opened Oct 18 11:46:33 mail tls_prune[19212]: [ID 729713 local6.error] DBERROR: opening /var/imap/tls_sessions.db: Invalid argument Oct 18 11:46:33 mail tls_prune[19212]: [ID 729713 local6.error] DBERROR: opening /var/imap/tls_sessions.db: cyrusdb error Oct 18 11:46:33 mail master[6137]: [ID 228336 local6.notice] got SIGHUP Oct 18 11:46:33 mail master[19213]: [ID 392559 local6.debug] about to exec /usr/local/cyrus2-cvs/bin/ctl_deliver Oct 18 11:46:33 mail ctl_deliver[19213]: [ID 866726 local6.warning] DBERROR db4: fatal region error detected; run recovery Oct 18 11:46:33 mail ctl_deliver[19213]: [ID 301778 local6.error] DBERROR: dbenv-open '/var/imap/db' failed: DB_RUNRECOVERY: Fatal error, run database recovery Oct 18 11:46:33 mail ctl_deliver[19213]: [ID 772277 local6.error] DBERROR: init /var/imap/db: cyrusdb error Oct 18 11:46:33 mail master[19214]: [ID 392559 local6.debug] about to exec /usr/local/cyrus2-cvs/bin/ctl_cyrusdb Oct 18 11:46:33 mail ctl_cyrusdb[19214]: [ID 702911 local6.notice] checkpointing cyrus databases Oct 18 11:46:33 mail ctl_cyrusdb[19214]: [ID 866726 local6.warning] DBERROR db4: fatal region error detected; run recovery Oct 18 11:46:33 mail ctl_cyrusdb[19214]: [ID 301778 local6.error] DBERROR: dbenv-open '/var/imap/db' failed: DB_RUNRECOVERY: Fatal error, run database recovery Oct 18 11:46:33 mail ctl_cyrusdb[19214]: [ID 772277 local6.error] DBERROR: init /var/imap/db: cyrusdb error Oct 18 11:46:33 mail ctl_cyrusdb[19214]: [ID 127214 local6.notice] done checkpointing cyrus databases Oct 18 11:46:33 mail master[6138]: [ID 310780 local6.debug] process 19214 exited, status 1 Oct 18 11:46:33 mail master[6138]: [ID 310780 local6.debug] process 19213 exited, status 1 Oct 18 11:46:33 mail master[6138]: [ID 310780 local6.debug] process 19212 exited, status 1 Anf if I connect with IMAP: Oct 18 11:48:57 mail master[19246]: [ID 392559 local6.debug] about to exec /usr/local/cyrus2-cvs/bin/imapd Oct 18 11:48:57 mail imap[19246]: [ID 518349 local6.debug] executed Oct 18 11:48:57 mail imap[19246]: [ID 921384 local6.debug] accepted connection Oct 18 11:48:57 mail master[19247]: [ID 392559 local6.debug] about to exec /usr/local/cyrus2-cvs/bin/imapd Oct 18 11:48:57 mail imap[19247]: [ID 518349 local6.debug] executed Oct 18 11:48:57 mail imap[19247]: [ID 921384 local6.debug] accepted connection Oct 18 11:48:57 mail master[19248]: [ID 392559 local6.debug] about to exec /usr/local/cyrus2-cvs/bin/imapd Oct 18 11:48:57 mail imap[19248]: [ID 518349 local6.debug] executed Oct 18 11:48:57 mail imap[19248]: [ID 921384 local6.debug] accepted connection Oct 18 11:48:57 mail master[19249]: [ID 392559 local6.debug] about to exec /usr/local/cyrus2-cvs/bin/imapd Oct 18 11:48:57 mail imap[19249]: [ID 518349 local6.debug] executed Oct 18 11:48:57 mail imap[19249]: [ID 921384 local6.debug] accepted connection Oct 18 11:48:57 mail master[19250]: [ID 392559 local6.debug] about to exec /usr/local/cyrus2-cvs/bin/imapd Oct 18 11:48:57 mail imap[19250]: [ID 518349 local6.debug] executed Oct 18 11:48:57 mail imap[19250]: [ID 921384 local6.debug] accepted connection Oct 18 11:49:02 mail master[6138]: [ID 970914 local6.error] process 19247 exited, signaled to death by 11 Oct 18 11:49:02 mail master[6138]: [ID 970914 local6.error] process 19246 exited, signaled to death by 11
lmtpd: Internal error: assertion failed: config.c: 226: imapopts[opt].t== OPT_SWITCH
Hello, I'm trying to configure sendmail to deliver to a virtual-domain account in cyrus 2.2 from cvs. This is all I get to work! I had to change the cyrusv2.mc file so that it will send a fqdn recipient like this and I get such error in the logfile. Oct 16 02:34:36 mail sendmail[10197]: [ID 801593 mail.info] g9G0YZuE010195: to=[EMAIL PROTECTED], delay=00:00:00, xdelay=00:00:00, mailer=cyrusv2, pri=120 439, relay=localhost, dsn=4.3.0, stat=Deferred: 421 4.3.0 lmtpd: Internal error: assertion failed: config.c: 226: imapopts[opt].t == OPT_SWITCH Mcyrusv2, P=[IPC], F=_MODMF_(CONCAT(_DEF_CYRUSV2_MAILER_FLAGS, CYRUSV2_MAILER_FLAGS), `CYRUSV2'), S=EnvFromSMTP/HdrFromL, R=EnvToSMTP/HdrToSMTP, E=\r\n, _OPTINS(`CYRUSV2_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`CYRUSV2_MAILER_MAXRCPTS', `r=', `, ')_OPTINS(`CYRUSV2_MAILER_CHARSET', `C=', `, ') T=DNS/RFC822/SMTP,_CYRUSV2_QGRP A=CYRUSV2_MAILER_ARGS == Changed EnvToL/HdrToL to EnvToSMTP/HdrToSMTP What does that mean ? What is broken ?
Re: Virtdomains: inter-domain admins do not work ---- was Re: Cannotget loginrealms to work with 2.0.16
Ken Murchison wrote: Quoting Christian Schulte [EMAIL PROTECTED]: Your other choice is to skip 2.1 and jump into 2.2 available from CVS. Since you're already compiling your cyrus (as opposed to prepackaged binary) and you want virtual domains support (and willing to go to great lengths to get it), I'd suggest getting the 2.2 branch which has native virtual domainsupport built into it. There are a few ppl on the list who have been running the 2.2 branch for a couple weeks now and don't seem to be having any problems with it at all. Hello again, actually I got the cvs branch up and running. I am now running the 2_2 cvs branch successfully on the same machine the 2.0.16 with SASL1 still runs on! FYI, this _might_ break POP3 access on the 2.2 side. It's possible that accessing a mailbox via POP3 on 2.2 then 2.0.16 then 2.2 will not work. I won't get into the technical details, but the mailbox format was tweaked in 2.1.something to fix a potential POP3 UIDL problem, and downgrading wasn't considered (by me) and isn't handled gracefully. Cyrus 2_2 got its own alias interface and the machine has two IPs now. I just had to tweak one option in the masterconf.c source to make the cyrus-2_2 master reading another cyrus.conf file than /etc/cyrus.conf. The 2.0.16 master reads /etc/cyrus.conf as usual and the 2.2 master now reads /etc/cyrus.conf.v2 . Every other configuration necessary for such setup could be specified in the cyrus.conf files. The old cyrus.conf file read by 2.0.16 for binding to the primary IP and starting the old binaries and the second cyrus.conf.v2 file for the 2.2 master to bind to the secondary IP and to start the new binaries with theire own configuration files specified by the -C option. That all worked great and was much easier than I expected it to be! If I now would not have forgotten to specify another path to the sieve scripts for 2.2 than for 2.0.16, I would not have lost all my scripts. mkimap created a new /usr/sieve structure and delted the already existent one. But that was something I simply forgot about. For the new 2.2 I have the following imapd.conf file: configdirectory: /var/imap partition-default: /var/spool/imap admins: [EMAIL PROTECTED] servername: mailserver.somedomain.com localdomain: somedomain.com sasl_pwcheck_method: auxprop sasl_auxprop_plugin: sasldb sasl_allowanonymouslogin: no sasl_allowplaintext: yes tls_cert_file: /usr/local/var/imap/server.pem tls_key_file: /usr/local/var/imap/server.pem tls_ca_file: /usr/local/var/imap/CAcert.pem idlesocket: /usr/local/var/imap/socket/idle loginrealms: realm1.com realm2.net unixhierarchysep: yes virtdomains: yes altnamespace: no If creating a user with simply saslpasswd2 -c admin in the local realm I get the following situation: [EMAIL PROTECTED]: userPassword If logging in with admin I get the administration options but cannot create mailboxes in another domain than somedomain.com (Invalid mailbox name) and I cannot see any other mailboxes than in somedomain.com thus domain administration seems to work. If logging in with [EMAIL PROTECTED] I do not get any administration options and only see the admin inbox which I created for testing. I cannot get the difference here! The DNS reverselookup to the IP resolves correctly to mailserver.somedomain.com and /etc/nodename also says somedomain.com. domain-administration seems to work if logging in without an @localrealm, but inter-domain administration completely does not work for me. Changing the admins: line to admins: admin If now logging in with admin I get administration options but cannot see any user mailbox and again can only see the admin inbox. If I try to create a mailbox like user/test I get permission denied. If I create a mailbox like [EMAIL PROTECTED] I get Invalid mailbox name. If logging in with [EMAIL PROTECTED] I do not get any administration options and again only see the admin inbox. So inter-domain administrators do not work! What am I doing wrong ? Any hints would be helpful! Read the administrators section of doc/install-virtdomains.html closely. Set defaultdomain: [EMAIL PROTECTED] Ok! I read that thausend times but I cannot get any more hints in that. cyrus.conf: # standard standalone server implementation START { # do not delete this entry! recover cmd=/usr/local/cyrus2-cvs/bin/ctl_cyrusdb -C /etc/imapd.conf.v2 -r # this is only necessary if using idled for IMAP IDLE idled cmd=/usr/local/cyrus2-cvs/bin/idled -C /etc/imapd.conf.v2 } # UNIX sockets start with a slash and are put into /var/imap/socket SERVICES { # add or remove based on preferences imap cmd=/usr/local/cyrus2-cvs/bin/imapd -C /etc/imapd.conf.v2 listen=[212.123.33.68]:imap prefork=0 imaps cmd=/usr/local/cyrus2-cvs/bin/imapd -C /etc/imapd.conf.v2 -s listen=[212.123.33.68]:imaps prefork=0 pop3 cmd=/usr/local/cyrus2-cvs/bin/pop3d -C /etc
Re: Virtdomains: inter-domain admins do not work ---- was Re: Cannotget loginrealms to work with 2.0.16
Ken Murchison wrote: This is most likely your problem. Make sure that your hostname is fully qualified, so that saslpasswd2 creates secrets with mail.rent-a-mailserver.de as the realm, or just leave it alone and let it use 'mail' as the realm. In either case, Cyrus/SASL should do the right thing. Ok! Actually I got it working! If authenticating without an @ symbol I got SASL(-13) user not found all the time and that was only because the user was searched against the realm with the fully qulalified domain-name of the server. root-17:24:45:/ sasldblistusers2 [EMAIL PROTECTED]: userPassword [EMAIL PROTECTED]: userPassword schulte@mail: userPassword schulte@imap: userPassword After adding [EMAIL PROTECTED] it works with this imapd.conf file: configdirectory: /var/imap partition-default: /var/spool/imap servername: imap.rent-a-mailserver.de admins: schulte defaultdomain: rent-a-mailserver.de sasl_pwcheck_method: auxprop sasl_auxprop_plugin: sasldb sasl_allowanonymouslogin: no sasl_allowplaintext: yes #sasl_mysql_use: smtp #sasl_mysql_passwd: smtp #sasl_mysql_hostnames: inforeg.epag.net #sasl_mysql_database: jboss #sasl_mysql_statement: select password from SASLUser where login='%u' and domain='%r' #sasl_mysql_verbose: yes tls_cert_file: /usr/local/var/imap/server.pem tls_key_file: /usr/local/var/imap/server.pem tls_ca_file: /usr/local/var/imap/CAcert.pem idlesocket: /usr/local/var/imap/socket/idle unixhierarchysep: yes virtdomains: yes altnamespace: no All other users cannot login ! I do not quite understand why the schulte@imap realm does not work but [EMAIL PROTECTED] does ! Thanks a lot for your help!