Re: [Dbmail] find and delete all message sin trash older x days
Don't forget other Trash folder names, like Deleted Messages, Deleted Items and similar. On Thu, 2013-01-10 at 19:59 +0100, Harald Leithner wrote: Hi, a simple version could be: SELECT * FROM `dbmail_physmessage` p WHERE id IN (SELECT physmessage_id FROM `dbmail_messages` m WHERE mailbox_idnr IN ( SELECT mailbox_idnr FROM `dbmail_mailboxes` ma WHERE `name` LIKE 'TRASH' ) ) and internal_date date_sub(NOW(), interval 1 year); It uses internal_date of the physmessage I think thats the date the mail arrives at dbmail. Deleting should be done per update the message table deleted_flag column and the temp table. And then wait for the dbmail_util cronjob. regards Harald PS: its only a quick shoot and could be completly wrong Am 10.01.2013, 18:57 Uhr, schrieb Reindl Harald h.rei...@thelounge.net: hi has someone a queray in the background who finds all messages of any user in folders called Trash which are older than 365 days? many users do not recognize that delete on IMAP is not really delete and i would like to get free the wasted space to reduze storage size / backup-times and prevent inndob files growing more an more at all -- Jesse Norell Kentec Communications, Inc. 970-522-8107 - www.kci.net ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail] Upgrade from ver. 1.2.x to latest ver. 3.x.x
If you haven't run across it yet, be sure to read this thread: http://www.gossamer-threads.com/lists/dbmail/users/32033 On Fri, 2012-12-28 at 12:22 -0500, Wisp Lists wrote: Hi, We have dbmail installed as a manager and no mta work. We use postfix, dovecot, roundcube and MySQL for emailing on a Debian box. We would to upgrade to the latest version if possible. We obviously would not like to break the server during the upgrade. That already happened, when we tried to upgrade some other software. it was then that we discovered our lack of support from our third-party. So we would liked to be involved with this upgrade. We have been reading, and we are looking for more info so that we have a clear mind when we proceed with this upgrade. If we can be pointed to useful info on the internet it would be appreciated. -- Jesse Norell Kentec Communications, Inc. 970-522-8107 - www.kci.net ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail] exim lmtp delivery to named folder with dbmail?
On Tue, 2012-03-27 at 17:33 +, Kris Oye wrote: I operate a system with nearly a ~1M user accounts. Currently our exim servers deliver via pipe to dbmail-smtp, but I recently found out about the LMTP protocol/dbmail_lmtpd. It sounds like it has a number of benefits, but I need to be able to deliver to alternate folders besides the default inbox. Is there a mechanism within the protocol for accomplishing this? Or an Exim-specific way? I am combing through search results but not finding much useful information (do I HAVE to use sieve?). I've not tried it lately, but there used to be support for deliverying to a user+fol...@domain.com type address, eg. see http://www.gossamer-threads.com/lists/dbmail/users/20942 (note, VERY old dbmail in use there). Maybe that'll get you another option to look at. -- Jesse Norell Kentec Communications, Inc. 970-522-8107 - www.kci.net ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail] Average Inbox Load Times (Eric Hiller) (Tomas Kuliavas)
On Wed, 2011-07-13 at 11:34 +0100, Daniel Schütze wrote: Tomas I'm not entirely sure what you mean, both SquirrelMail and Roundcube list all the folders on the left side when the user logs in. There's not much in it as to the loading time between them when selecting one of these folders, but SquirrelMail does take a long time to get to the initial screen if there are a lot of folders. If there is an obvious user or config option I'm missing which boosts SquirrelMail performance with a lot of folders I'd love to hear about it! Afterall the users don't tend to care about the contents of these subfolders when they're out and about. In some quick testing, Options-Folder Preferences- Enable Unread Message Notification: No Notification Enable Cumulative Unread Message Notification: (uncheck) seem to speed up the left folder list for me, at the cost of not knowing how many new messages are in each folder. That didn't speed up the right pane of the actual folder contents any. Nor does removing the Size column, for that matter. Daniel Message: 5 Date: Tue, 12 Jul 2011 11:01:00 -0700 (PDT) From: Tomas Kuliavas to...@users.sourceforge.net Subject: Re: [Dbmail] Average Inbox Load Times (Eric Hiller) To: dbmail@dbmail.org Message-ID: 32047935.p...@talk.nabble.com Content-Type: text/plain; charset=us-ascii SquirrelMail left folder listing is not optimized for more than 20 folders. It can be fixed. Speed of left folder listing also depends on user options. Claiming that roundcube is faster to load is a bit misleading, if you set SquirrelMail to check every folder and Roundcube is testing only INBOX. -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail] dbmail-postfix-policyd and database
On Sun, 2011-06-19 at 22:33 +0200, Reindl Harald wrote: there goes something terrible wrong if mysqld is not ready at start, playing ariund with fedora 15 and systemd ends most time in warning: problem talking to server /var/spool/postfix/dbmail-postfix-policyd/socket: Connection timed out Ie. that is a postfix error indicating dbmail-postfix-policyd hasn't created that unix socket? Is dbmail-postfix-policyd still running? If so, it might be some logic that doesn't create that socket on an initial db connection failure or somesuch. would it be possible to try reconnect to mysql on errors or even exit the process would be better because systemd would start it again I need to do a little improvement in reconnecting for idle sockets at least with postgres, I could try to catch what's going on here, too, if we can nail it down. Ironically, wasn't one of your most recent requests just the opposite - if there's a database problem you wanted it to not exit and allow mail to pass, since a quota check isn't a show stopper? ;) For the moment maybe put a sleep 30 in your init script, and I'll try to look for that socket creation problem. The reconnect logic might take a bit longer and I'm short on time at the moment. Thanks, Jesse -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail] host/sqlsocket
On Sat, 2011-05-21 at 12:19 +0200, Reindl Harald wrote: yes the socket should be preferred i think because it is faster or normally localhost means socket in every case for mysql (mysql-cli, php) and if you want to use TCP you have to configure 127.0.0.1 (or a socket) mysql --socket=/var/lib/mysql/mysqld_dbmail.sock -u root -p using the socket and the second mysqld-instance mysql --socket=/var/lib/mysql/mysqld_dbmail.sock -h localhost -u root -p does the same and -h localhost is nice but useless mysql --socket=/var/lib/mysql/mysqld_dbmail.sock -h 127.0.0.1 -u root -p ignores the socket because 127.0.0.1 switches to TCP dbmail himself perefers the second version or is falling back to the default mysqld (default-socket or TCP is not clear for me) if sqlsocket has a non-default-value and host = localhost is missing in my optinion this is a small bug in dbmail and both should act like the official client-software or if there is a good reason for a difference you and paul could make clear what way to go so that a config-file can be used for both in all setups Try commit ca037066476877c3617c for this. -- Jesse Norell je...@kci.net Kentec Communications, Inc. ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail] pitfalls: dbmail-postfix-policyd
what about writing only warnings to the maillog if db-connection fails or is interrupted but leaving the service running and answer with OK to get away a single-point of failure since this is only a quota-check and without the policyd every mail to a full mailbox would be a bounce/backscatter, it think in an error-case this would be OK as fallback too and after resume db-connection a message in the maillog dbmail-policyd: normal operations resumed That might be good behavior, at least for now (maybe if the policy server did other checks in the future it should die again). You want to throw that in a github issue and I'll get to it some time. on our second server there is a normal mysqld-instance for php and dbmail/pstfix/dovecot are using a dedicated mysqld at /var/lib/mysql/mysqld_dbmail.sock dbmail-postfix-policyd seems not to be working with non-standard-port/socket the message below says to me it try to connect to the default-mysqld dbmail-postfix-policyd[11814]: fatal: DBI connect('dbname=dbmail;host=localhost','dbmailro',...) failed: Access denied for user 'dbmailro'@'localhost' removing the host-line does not force the socket as hoped, even on a machine where mysqld is running on standard-port/socket it would not connect while dbmail do not need the line fatal: DBI connect('dbname=dbmail;host=/var/lib/mysql/mysqld_dbmail.sock','dbmailro',...) failed: Unknown MySQL server host '/var/lib/mysql/mysqld_dbmail.sock' (1) at /usr/sbin/dbmail-postfix-policyd line 146#012 fatal: DBI connect('dbname=dbmail;host=/var/lib/mysql/mysql.sock','dbmail',...) failed: Unknown MySQL server host '/var/lib/mysql/mysql.sock' cat /etc/dbmail-postfix-policyd.conf [DBMAIL] driver= mysql authdriver= sql host = localhost sqlsocket = /var/lib/mysql/mysqld_dbmail.sock user = dbmailro pass = *** db= dbmail table_prefix = dbmail_ encoding = utf8 default_msg_encoding = utf8 Try again, with/after commit 8724b18b823c52c38ba1. Thanks for the feedback, Jesse -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail] host/sqlsocket
On Sat, 2011-05-21 at 02:30 +0200, Reindl Harald wrote: i am a little bit confused driver = mysql authdriver = sql host= localhost sqlsocket = /var/lib/mysql/mysqld_dbmail.sock dbmail-postfix-policyd does not like the host-line if it should connect to a non-default sqlsocket dbmail-lmtpd needs the host-line on the same machine but it does not need with default-socket /var/lib/mysql/mysql.sock should this line not be ignored and/or left out generally if there is a socket-path defined, not real a problem this time because seperated configs but i am a little bit afraid of updates in the future does not like means connect to default-instance instead the specified socket Regards Harry I can make an exception for host=localhost. Right now it check if host= is set .. if so, it additionally checks for a port number specified, and uses those for the connection; if not set, it uses the sqlsocket (if set). If both host= and sqlsocket= are set, it seems you'd have to prefer one or the other; perhaps it should prefer the socket over host? In any case, host=localhost should be safe to ignore. -- Jesse Norell - je...@kci.net Kentec Communications, Inc. ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail] observe exceeded qutoa before lmtp?
Hello, Glad it's working well. Once I can get back to that (hopefully soon) I'm gonna try to fix/work around the idle connection problem (it looks like it's at core an OS issue, with no keepalives enabled), and maybe I can work in the fallback server. On that, would adding a single option to specify the host do the job? Ie. just keep the same username/password/database as the primary. It could be made more flexible but I don't know that it's worth the effort at this point. Thanks, Jesse On Fri, 2011-05-06 at 16:00 +0200, Reindl Harald wrote: Hi i made a new build from snapshot Thu May 05 11:14:14 -0700 2011 4085a6199f175229cf28e0c3e804f3371808ac9b first i realized that check_policy_service has to come before mynetworks while sending froma virtual-machine to the hosts mailsystem and a full mailbox is full for everyone inside and outside :-) Am 04.05.2011 19:20, schrieb Jesse Norell: On Mon, 2011-05-02 at 15:26 -0600, Jesse Norell wrote: Aliases do recursive expansion is there some case that's not being handled? I'll try to get catchall addrs soon. FYI, I just added support for catchall addrs. Looks to work in my testing, but hollar if you have any problems there this shit smells good :-) even the third case is resolved correctly where a forwarder from a domain pointing on another forwarder in this domain which points to a target on another one which is only resolvable by the alias @final-target bloody hell - now we need only fallback to a second mysqld if the primary is down configureable with host:port and the same logic for the built-in autoreply from dbmail to get receive/reject/reply messages absolutly perfect :-) ___ * rhs...@test.rh: Inbox with 1600% quota by my hammer * forward...@test2.rh: Direct forward to rhs...@test.rh * forward...@test2.rh - forward...@test2.rh - catch...@test.rh - rhs...@test.rh ___ status=bounced (host 192.168.196.2[192.168.196.2] said: 552-5.7.1 rhs...@test.rh: Recipient address rejected: Message too large status=bounced (host 192.168.196.2[192.168.196.2] said: 552-5.7.1 forward...@test2.rh Recipient address rejected: Message too large status=bounced (host 192.168.196.2[192.168.196.2] said: 552-5.7.1 forward...@test2.rh: Recipient address rejected: Message too large status=bounced (host 192.168.196.2[192.168.196.2] said: 552-5.7.1 forward...@test2.rh: Recipient address rejected: Message too large Regards Harry -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail] observe exceeded qutoa before lmtp?
On Mon, 2011-05-02 at 15:26 -0600, Jesse Norell wrote: On Mon, 2011-05-02 at 18:17 +0200, Reindl Harald wrote: the only thing i would love is supporting forwarders in dbmail_aliases pointing to another address on the local server and maybe @domain but however this is much better as bouncing to spammers the reason is we are using for several admin-backend reasons in deliver_to the useridnr only once and maybe catch-all Aliases do recursive expansion now - is there some case that's not being handled? I'll try to get catchall addrs soon. FYI, I just added support for catchall addrs. Looks to work in my testing, but hollar if you have any problems there. -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail] Forward messages from inbox
Another option would be something external like fetchmail - it can check a specific IMAP folder and send the mail out via smtp. On Tue, 2011-05-03 at 15:01 +0200, Reindl Harald wrote: this is an idea what the user do with the mbox-file is not my problem :-) thank you! Am 03.05.2011 14:52, schrieb Paul J Stevens: Harry, You can also use dbmail-export. dbmail-export -d -u orphaned-user -m orphaned-mailbox will export and delete all messages in specified mailbox. On 03-05-11 14:41, Reindl Harald wrote: afaik sieve does not touch existing mails my problem is that some accounts are orphaned and i want to get rid of the messages in a way that two weeks alter nobody can say why you deleted my mails? Am 03.05.2011 13:26, schrieb Jorge Bastos: The best way will be using sieve if I'm not wrong. is there a way to spit existing mails back to postfix with an external target address? i am dreaming of a table msg_id, target_address which would be enumerated from time to time and after the mail is forwarded remove the entry from this todo-list the reason behind are some since years ignored mailboxes where i have valid target at gmx for the users and before replacing their physical account with a forwarder spit all the 500 mails to their gmx-address since some of the users are not responsible :-( ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail] observe exceeded qutoa before lmtp?
Yep, that's what you want. It's been working good on a few active servers for about a week. There is a known problem with idle postgres connections getting dropped, I'm working on that. MySQL seems fixed in very limited testing. Also need some init scripts and maybe a watcher/restarter script just in case, but that one issue is the only crash I've come across yet. On Mon, 2011-05-02 at 14:28 +0200, Reindl Harald wrote: this sounds damned great, thank you! bookmarked and i will give it a try ASAP i have to understand how use a policyd in postfix and take a look what is the best way to get this in a RPM-package Am 02.05.2011 14:16, schrieb Paul J Stevens: Isn't that what Jesse's dbmail-postfix-policyd was designed for? https://github.com/jnorell/dbmail-postfix-policyd On 02-05-11 13:43, Reindl Harald wrote: Hi is there any way to observe dbmail-quotas via sql before the delivery to dbmail-lmtp resulting in a bounce yes, this is not possible for all cases where a rcpt points to forwarders but for 1:1 mappings the reason is that if postfix do not know about the quota it receives the message with 250 and sending a bounce after dbmail-lmtp refuses the message what is in case of faked sender suboptimal, where ever it is possible postfix should reject the message instantly regards from vienna ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail] observe exceeded qutoa before lmtp?
On Mon, 2011-05-02 at 19:29 +0200, Reindl Harald wrote: BTW: is there a option to specify mysql-fallbacks in a way like for postfix? Not currently, I hadn't even thought of HA/backup db issues. That wouldn't be hard to implement. Currently dbmail-postfix-policyd reads settings right from dbmail.conf; there was recent mention of someone separating read from readwrite queries to support readonly slave setups, might want to see if there's a configuration syntax for that yet (or could just create a conf file for the policy server itself). this could relax the connection problem also random trying the other mysql-host on errors and offers HA since postfix can this way receive mails while the mysql-master is down by verify on the readonly-salve and deferr only lmtp-transport hosts = unix:/var/lib/mysql/mysql.sock inet:10.0.0.120:3307 regards from vienna harry -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail] observe exceeded qutoa before lmtp?
Hello, I just pushed a commit to check the database connection and reconnect. Any errors that happen during a check should simply return DUNNO now, so maybe a message slips by the quota check that would otherwise have been rejected (dbmail itself will still catch and bounce that as previously). maybe someday in dbmail spread read/write makes sense too but here also i would prefer to not include another sofwtare layer * writes always to the master * if configured using a read-connection pool * choose one of the existing connections from the pool at the begin of user-connect * if it is dead, choose another one of the pool * perfectly let the pool-child connect again randomly to one of the available hosts Something like this might work right now based on DNS round-robin. Setup your database host to point to a hostname and add multiple DNS entries for it - if the connection goes away, it should reconnect. It may work, or might not (eg. if the hostname isn't looked up again), but is something to play with if you like, prior to actual support in the daemon. -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail] observe exceeded qutoa before lmtp?
On Mon, 2011-05-02 at 18:17 +0200, Reindl Harald wrote: the only thing i would love is supporting forwarders in dbmail_aliases pointing to another address on the local server and maybe @domain but however this is much better as bouncing to spammers the reason is we are using for several admin-backend reasons in deliver_to the useridnr only once and maybe catch-all Aliases do recursive expansion now - is there some case that's not being handled? I'll try to get catchall addrs soon. -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail-dev] dbmail-postfix-policyd - postfix policy server to check quotas [was delivery/recipient lookups]
I've created a github repo for this, if anyone wants to follow along or collaborate: https://github.com/jnorell/dbmail-postfix-policyd Jesse it's a postfix policy server that checks dbmail quotas, so mail that would go over quota can be rejected in smtp, rather than creating a bounce message. -- Jesse Norell je...@kci.net Kentec Communications, Inc. ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev
Re: [Dbmail] dbmail-postfix-policyd - postfix policy server to check quotas [was [Dbmail-dev] delivery/recipient lookups]
I've created a github repo for this, if anyone wants to follow along or collaborate: https://github.com/jnorell/dbmail-postfix-policyd Jesse it's a postfix policy server that checks dbmail quotas, so mail that would go over quota can be rejected in smtp, rather than creating a bounce message. -- Jesse Norell je...@kci.net Kentec Communications, Inc. ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
[Dbmail-dev] dbmail-postfix-policyd - postfix policy server to check quotas [was delivery/recipient lookups]
Hello, Here's an initial go at this if anyone wants to start playing with it. I tested this version with dbmail 1.2 on postgres, and dbmail 2.2 on mysql, with good initial results. Again, it's a postfix policy server that checks dbmail quotas, so mail that would go over quota can be rejected in smtp, rather than creating a bounce message. I want to emphasize, this is not production ready (though I'm testing it on our production system while monitoring it). It could use some improvement in the logging to track more verbosely what it's doing, but more of an issue for production is handling what happens if the script dies - either need a watcher/restart script (maybe part of the init script?) or write some restart routines to handle that instead of die()ing. There's no init script yet, either (maybe could just add it as one more optional service in the dbmail init script?) If anyone wants to try this out, I'd be glad to hear of your results and any problems. It should default to just allowing mail if it doesn't work, I doubt there'll be any problem with blocking mail. I haven't added user@ and @domain catch-alls yet, and there may be some cases that don't work if say postfix delivers to plain usernames without the @domain part (though probably not a common setup). Run perldoc dbmail-postfix-policyd for a man page with info on how to set it up (pretty simple). I had to install libconfig-inifiles-perl (debian package) on one server to run it; the other was good to go. Hollar if you need help with any other dependencies (dbi, etc.). Thanks, Jesse On Mon, 2011-04-11 at 22:54 +0200, Paul J Stevens wrote: On 04/11/2011 07:14 PM, Jesse Norell wrote: Hello, Some time ago I started on a postfix policy server to do dbmail quota lookups, and I'm now getting back to finishing that. I'll try to make it support most (all?) dbmail versions, but those differ some in how the aliases/users lookups were done. If anyone wants to review this logic and provide feedback I'd appreciate it. It seems I need to be able to identify when *all* recipients are handled by dbmail, and all of them would go over quota (and subsequently bounced) if the message were to be allowed - if either of those aren't known/true, we'll just allow the message. Sounds about right. dbmail 1.2: - single per-user quota across all mailboxes - current usage calculated from summing all message (status 2) sizes - all addresses have to be in aliases table - look up all deliver_to's for a given alias: - if it's numeric, it's a userid, and should check quota/usage - if it's non-numeric, it's either: - a forwarding address; recursively lookup in aliases table, and if not found, allow the message - a ! or | command, allow the message dbmail 2.0: - single per-user quota across all folders - current usage from dbmail_users.curmail_size - recipient lookup same as 1.2 above ? In 2.0 the lmtp support was added, iirc. This brought the DSN code which allowed better back-propagation of delivery results esp with regard to multiple recipients. dbmail 2.2: - single per-user quota across all folders (same as 2.0) - current usage from dbmail_users.curmail_size (same as 2.0) - recipients no longer need to be in aliases table ??? correct. Delivery rules were cleaned up extensively, and should deal with your case correctly: only if *all* recipients fail a hard bounce is generated. Otherwise soft-bounces or retries are triggered, depending on the conditions (perm-fail or temp-fail). - if recipient isn't in aliases table, but a matching username exists, just use that single user's quota settings username is treated as the primary alias. - if recipient is in aliases table, recursively follow by owner_id (numeric) and userid (non-numeric), or treat as a command (non-numeric) as appropriate - usermap is strictly for pop/imap, not delivery yep. In checking dbmail 3.0 schema, it looks like there are still no per-mailbox quotas, so it would be identical to 2.2? Correct. Lately thunderbird has stopped treating dbmail as a server with QUOTA capability it seems. Not sure why, haven't investigated. But you're right: only per-user quota (single quota-root /). -- Jesse Norell Kentec Communications, Inc. je...@kci.net dbmail-postfix-policyd Description: Perl program ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev
[Dbmail] dbmail-postfix-policyd - postfix policy server to check quotas [was [Dbmail-dev] delivery/recipient lookups]
Hello, Here's an initial go at this if anyone wants to start playing with it. I tested this version with dbmail 1.2 on postgres, and dbmail 2.2 on mysql, with good initial results. Again, it's a postfix policy server that checks dbmail quotas, so mail that would go over quota can be rejected in smtp, rather than creating a bounce message. I want to emphasize, this is not production ready (though I'm testing it on our production system while monitoring it). It could use some improvement in the logging to track more verbosely what it's doing, but more of an issue for production is handling what happens if the script dies - either need a watcher/restart script (maybe part of the init script?) or write some restart routines to handle that instead of die()ing. There's no init script yet, either (maybe could just add it as one more optional service in the dbmail init script?) If anyone wants to try this out, I'd be glad to hear of your results and any problems. It should default to just allowing mail if it doesn't work, I doubt there'll be any problem with blocking mail. I haven't added user@ and @domain catch-alls yet, and there may be some cases that don't work if say postfix delivers to plain usernames without the @domain part (though probably not a common setup). Run perldoc dbmail-postfix-policyd for a man page with info on how to set it up (pretty simple). I had to install libconfig-inifiles-perl (debian package) on one server to run it; the other was good to go. Hollar if you need help with any other dependencies (dbi, etc.). Thanks, Jesse On Mon, 2011-04-11 at 22:54 +0200, Paul J Stevens wrote: On 04/11/2011 07:14 PM, Jesse Norell wrote: Hello, Some time ago I started on a postfix policy server to do dbmail quota lookups, and I'm now getting back to finishing that. I'll try to make it support most (all?) dbmail versions, but those differ some in how the aliases/users lookups were done. If anyone wants to review this logic and provide feedback I'd appreciate it. It seems I need to be able to identify when *all* recipients are handled by dbmail, and all of them would go over quota (and subsequently bounced) if the message were to be allowed - if either of those aren't known/true, we'll just allow the message. Sounds about right. dbmail 1.2: - single per-user quota across all mailboxes - current usage calculated from summing all message (status 2) sizes - all addresses have to be in aliases table - look up all deliver_to's for a given alias: - if it's numeric, it's a userid, and should check quota/usage - if it's non-numeric, it's either: - a forwarding address; recursively lookup in aliases table, and if not found, allow the message - a ! or | command, allow the message dbmail 2.0: - single per-user quota across all folders - current usage from dbmail_users.curmail_size - recipient lookup same as 1.2 above ? In 2.0 the lmtp support was added, iirc. This brought the DSN code which allowed better back-propagation of delivery results esp with regard to multiple recipients. dbmail 2.2: - single per-user quota across all folders (same as 2.0) - current usage from dbmail_users.curmail_size (same as 2.0) - recipients no longer need to be in aliases table ??? correct. Delivery rules were cleaned up extensively, and should deal with your case correctly: only if *all* recipients fail a hard bounce is generated. Otherwise soft-bounces or retries are triggered, depending on the conditions (perm-fail or temp-fail). - if recipient isn't in aliases table, but a matching username exists, just use that single user's quota settings username is treated as the primary alias. - if recipient is in aliases table, recursively follow by owner_id (numeric) and userid (non-numeric), or treat as a command (non-numeric) as appropriate - usermap is strictly for pop/imap, not delivery yep. In checking dbmail 3.0 schema, it looks like there are still no per-mailbox quotas, so it would be identical to 2.2? Correct. Lately thunderbird has stopped treating dbmail as a server with QUOTA capability it seems. Not sure why, haven't investigated. But you're right: only per-user quota (single quota-root /). -- Jesse Norell Kentec Communications, Inc. je...@kci.net dbmail-postfix-policyd Description: Perl program ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
[Dbmail-dev] delivery/recipient lookups
Hello, Some time ago I started on a postfix policy server to do dbmail quota lookups, and I'm now getting back to finishing that. I'll try to make it support most (all?) dbmail versions, but those differ some in how the aliases/users lookups were done. If anyone wants to review this logic and provide feedback I'd appreciate it. It seems I need to be able to identify when *all* recipients are handled by dbmail, and all of them would go over quota (and subsequently bounced) if the message were to be allowed - if either of those aren't known/true, we'll just allow the message. dbmail 1.2: - single per-user quota across all mailboxes - current usage calculated from summing all message (status 2) sizes - all addresses have to be in aliases table - look up all deliver_to's for a given alias: - if it's numeric, it's a userid, and should check quota/usage - if it's non-numeric, it's either: - a forwarding address; recursively lookup in aliases table, and if not found, allow the message - a ! or | command, allow the message dbmail 2.0: - single per-user quota across all folders - current usage from dbmail_users.curmail_size - recipient lookup same as 1.2 above ? dbmail 2.2: - single per-user quota across all folders (same as 2.0) - current usage from dbmail_users.curmail_size (same as 2.0) - recipients no longer need to be in aliases table ??? - if recipient isn't in aliases table, but a matching username exists, just use that single user's quota settings - if recipient is in aliases table, recursively follow by owner_id (numeric) and userid (non-numeric), or treat as a command (non-numeric) as appropriate - usermap is strictly for pop/imap, not delivery In checking dbmail 3.0 schema, it looks like there are still no per-mailbox quotas, so it would be identical to 2.2? Thanks, Jesse -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev
Re: [Dbmail-dev] delivery/recipient lookups
On Mon, 2011-04-11 at 11:14 -0600, Jesse Norell wrote: Hello, Some time ago I started on a postfix policy server to do dbmail quota lookups, and I'm now getting back to finishing that. I'll try to make it support most (all?) dbmail versions, but those differ some in how the aliases/users lookups were done. If anyone wants to review this logic and provide feedback I'd appreciate it. It seems I need to be able to identify when *all* recipients are handled by dbmail, and all of them would go over quota (and subsequently bounced) if the message were to be allowed - if either of those aren't known/true, we'll just allow the message. dbmail 1.2: - single per-user quota across all mailboxes - current usage calculated from summing all message (status 2) sizes - all addresses have to be in aliases table - look up all deliver_to's for a given alias: - if it's numeric, it's a userid, and should check quota/usage - if it's non-numeric, it's either: - a forwarding address; recursively lookup in aliases table, and if not found, allow the message - a ! or | command, allow the message dbmail 2.0: - single per-user quota across all folders - current usage from dbmail_users.curmail_size - recipient lookup same as 1.2 above ? dbmail 2.2: - single per-user quota across all folders (same as 2.0) - current usage from dbmail_users.curmail_size (same as 2.0) - recipients no longer need to be in aliases table ??? - if recipient isn't in aliases table, but a matching username exists, just use that single user's quota settings - if recipient is in aliases table, recursively follow by owner_id (numeric) and userid (non-numeric), or treat as a command (non-numeric) as appropriate - usermap is strictly for pop/imap, not delivery In checking dbmail 3.0 schema, it looks like there are still no per-mailbox quotas, so it would be identical to 2.2? I forgot about user and domain catch-all addrs, which I'll look at adding. I think it's safe to implement 2.0 with the 2.2 alias/user lookup logic, it should just happen to always find an aliases entry (and this isn't to replace *_recipient_maps, it's just to find the right users to look up quota/usage info). Jesse -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev
Re: [Dbmail] Folder sharing
On Tue, 2011-03-01 at 15:27 +0100, Olivier Desportes wrote: Hi, My mail server setup : - Debian Lenny 64 - DBMAIL 2.2.10 - PostgreSQL 8.3.8 - DB Mail Administrator clients : Thunderbird 2 (ubuntu, windows XP) Problem : I'm trying to share some folders from two of my users, to a third user. I've created a folder in each of my user's account which is called '_RD_'. I've tried to enable the shares in DBMA, to no avail. Then I've tried to enable the shares directly in the dbmail database, creating the records in dbmail_acl and dbmail_subscription. So far, my third user can't even see the shared folders among what is shared. I don't even speak about subscribing to them. I keep on getting annoyed each time I have to tinker with the shared folders. Does some one know a clear and simple way to create shared folders (public or private) and to subscribe to them ? Thank you Olivier Desportes Did you see/try http://www.dbmail.org/dokuwiki/doku.php/shared-mbox ? -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail] mbox2dbmail , slow load mailboxes
But i just install the new server today and, at this moment, only 50% of users have the mailbox migrated. I continue with mailbox2dbmail :( Database tuning has a huge impact on dbmail performance, too, so make sure you're not running with default memory settings and such. Another side effect is that the messages are marked as 'unread'. How can i mark it as 'readed'? For pop3 there is a status field on the messages, I believe status=1 is read but not deleted; imap uses flags, and I'm not as familiar with those, you might set seen_flag and unset recent_flag for the message. -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail] Migration questions
On Tue, 2010-09-14 at 21:15 +0200, Oswaldo Hernández wrote: Hello, I'm planning to migrate and old debian server to a new machine with debian 5 and dbmail/postgresql. Before makig the migration job, i appreciate if you can clear up some questions: In the actual server i have a postgresql database with the user account, password, mbox file, and other information of the users. I also have: pop3 server (teapop-pgsql), smtp server (exim4-daemon-heavy), ftp server (proftpd-pgsql), a web based intranet (apache-php) All of these services validate the users in the postgresql database. The questions: 1. Can i share the dbmail users table with the others apps to validate users? Sure, it's just data in a database .. you might even coerce PAM into using dbmail users if you wanted to. Alternately setup an ldap server for your auth, and have dbmail use it, too. How is the password saved: plain, md5 ... ? It can save in various formats, eg. plain text, crypt, md5 hash, md5 digest and sha digest (from memory, might not be 100%). 2. Can i add tables in the dbmail database for store other user data? Yes. 3. In the actual system i have fields in the user table to disable temporarily some service. I have boolean columns named 'smtp_disabled', 'pop3_disabled', 'ftp_disabled', ... When some service search for the user the sql check also the 'xxx_disabled' column. Example: exim4 makes select user, mbox_file from userstable where not smtp_disabled and . If the flag has activated the user is not recognized. Can i do this with dbmail? You could add those fields right to the dbmail_users table (and I'm pretty sure they'll be respected in schema updates and such), or add another table with your fields and a tie field to the dbmail userid or somesuch. 4. Quotas. Can i set a mail volume limit for each user? You can have a storage quota, at least for the entire user's mail. I think per-folder quotas were planned in the past but I don't know if they're implemented offhand (it's possible they have been for some years in 2.3). 5. mbox - dbmail. Is there any script to load the actual mbox files to the dbmail database? Yep, check the contrib directory. 6. Forwarding and sending copies to other accounts. I have configured exim4 to forward or send copies of mail to accounts saved in the dadabase. Can do dbmail these job? dbmail could with it's forwarding table, and possible via sieve scripts as well, or you could continue to have your mta do that job. 7. I'm also planning to install mailman. Any problem? Never installed/configured it, but I wouldn't think so. It seems on the surface it would be completely unrelated to dbmail. -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail-dev] [DBMail 0000859]: Login rejection based on a defined message
On Wed, September 8, 2010 12:53, Mantis Bug Tracker wrote: The following issue has been SUBMITTED. == http://dbmail.org/mantis/view.php?id=859 == Reported By:jasb Assigned To: == Project:DBMail Issue ID: 859 Category: Authentication layer Reproducibility:have not tried Severity: feature Priority: normal Status: new target: == Date Submitted: 08-Sep-10 20:53 CEST Last Modified: 08-Sep-10 20:53 CEST == Summary:Login rejection based on a defined message Description: Howdy, I'd like DBMail to have (and I'm sure other people will find it very useful also) a feature where, we could have two more extra fields on dbmail_users: status INT(1) reason TEXT Where, when the status has the value of zero ( 0 ), the AUTH mec, rejects the login displaying the information containing in the TEXT field. This would be very useful for suspended accounts, expired, etc. == As far as I know, there's no standard/supported way to do this. When I enter my password to check my email, if the login fails for any reason (eg. I entered the wrong password, or my fancy new status field has value 100), all I see is another message prompting me for the password. From memory when this was brought up in the past, I think there was one popular mail client (Outlook or OE?) that has a proprietary mechanism to convey an error message to the user, but it was just that, proprietary, and didn't work anywhere else. -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev
Re: [Dbmail-dev] Feature request: 'fromip'-column in table 'dbmail_fromfield'
Another way to put it is dbmail is a mda - only the mta talks on the network to the sending host, and hence can know what the ip addr is. You might see if you can get your mta (eg. postfix or exim) to add that header for you. On Thu, August 19, 2010 07:48, Paul J Stevens wrote: Rene, the _fromfield contains a parsed version of the From: header in a message. Where is this IP information supposed to be coming from? The only place where this /might/ be present is in the Received headers. But there is no way this can be treated as complete and reliable. On 08/19/2010 02:30 PM, Rene Bartsch wrote: Hi, currently it's unconvenient to parse sender IPs for SPAM evaluation in DBMail. Please add a 'fromip'-column in table 'dbmail_fromfield' for that purpose. Best regards, Renne ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev -- Paul Stevens paul at nfg.nl NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31 The Netherlandshttp://www.nfg.nl ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev
Re: [Dbmail] IP restrictions for POP3 access
On Wed, 2010-07-21 at 18:25 +0200, Paul J Stevens wrote: On 07/21/2010 12:13 PM, HoangNam wrote: 1. Users of domain1 can check their mails using POP3 from anywhere. 2. Users of domain2 can only check their mails at their office which has a static IP. (They cannot get mails when they come home) I misread the part out src-ip. You may be able to do what you want by combining iptables-dnat with the usermap table. Or similarly (ie. in the ugly hacks camp), use perdition to proxy your pop3 sessions to dbmail running on different ip addrs (eg. use as many 127.x.x.x addrs as you need) and combine with usermap. -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail] Pipe to DBMAIL-SMTP
Hello, A few more comments/responses to your questions: There are numerous options for copying, which you should find in the documentation you've been searching. Imap-imap is a common way, though you do have to know (or temporarily change) the account passwords. You could do imap-dbmail-smtp (eg. I think fetchmail can do that, and probably other tools). If you have a large amount of mail to move, it would probably be faster to do so directly from the filesystem level of the remote mail server, if that's accessible (using something like mailbox2dbmail you mentioned). The poorly named dbmail-smtp (more recenctly renamed dbmail-inject) does not talk smtp, it takes a single message as stdin and stores it in the database. Check the manpage for the format, I think it's just mbox (if not, you just remove the From line 1 from mbox format to send it a raw message). If you wanted something you can talk smtp to, use dbmail-lmtp (it of course talks lmtp, but does what you need for delivery). Performance is better than spawning lots of processes/connections with dbmail-smtp, but I don't think you can specify a mailbox to store to, everything goes to INBOX (though I may be mistaken there). You could probably have a custom migration script fiddle with sieve scripts on the backend to work around that, if it's worth the effort (imap-imap would be less work). -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail] DBMail 2.3 Stable Release - when is it scheduled?
On Wed, 2009-08-26 at 10:49 +0200, Paul J Stevens wrote: Also, instead of using IMAP/POP to fetch the emails - is it possible to query the database directly for an application to auto-fetch emails and delete the emails? It's possible in dbmail-2.2, but exceedingly difficult in 2.3+. Imap and pop are currently the only supported interfaces for retrieving messages. A http/RESTfull interface is in the works, but not yet ready for primetime. Along these lines, I'm curious if there are plans to put an official api to libdbmail, such that other applications could link to it and leverage it's underlying changes/upkeep? I don't plan on that myself, but it might be useful (someone on #dbmail was asking about doing something the other day and that would have been a perfect solution for what he wanted to do). -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail] Error dbmodule
Are you set to use mysql or pgsql? Only sqlite libraries show up in your ls output. On Wed, 2009-07-29 at 14:22 +, Edson F. Cunha wrote: Jul 29 10:17:02 x..xxx.xx dbmail-pop3d[4521]: FATAL:[db] dbmodule.c,db_load_driver(+80): could not load db module - turn up debug level for details # # directory for locating libraries (normally has a sane default compiled-in) # library_directory = /usr/lib/dbmail [r...@filesrvpostfix dbmail]# ls -lh /usr/lib/dbmail/ total 412K lrwxrwxrwx 1 root root 20 Jul 29 10:02 libauth_sql.so - libauth_sql.so.0.0.0 lrwxrwxrwx 1 root root 20 Jul 29 10:02 libauth_sql.so.0 - libauth_sql.so.0.0.0 -rwxr-xr-x 1 root root 23K Jul 6 02:12 libauth_sql.so.0.0.0 lrwxrwxrwx 1 root root 18 Jul 29 10:02 libdbmail.so.0 - libdbmail.so.0.0.0 -rwxr-xr-x 1 root root 317K Jul 6 02:12 libdbmail.so.0.0.0 lrwxrwxrwx 1 root root 22 Jul 29 10:02 libsort_sieve.so - libsort_sieve.so.0.0.0 lrwxrwxrwx 1 root root 22 Jul 29 10:02 libsort_sieve.so.0 - libsort_sieve.so.0.0.0 -rwxr-xr-x 1 root root 19K Jul 6 02:12 libsort_sieve.so.0.0.0 lrwxrwxrwx 1 root root 18 Jul 29 10:02 libsqlite.so - libsqlite.so.0.0.0 lrwxrwxrwx 1 root root 18 Jul 29 10:02 libsqlite.so.0 - libsqlite.so.0.0.0 -rwxr-xr-x 1 root root 44K Jul 6 02:12 libsqlite.so.0.0.0 __ Instale o novo Internet Explorer 8 otimizado para o MSN. Download aqui ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail] Annoying DONT DELETE THIS MESSAGE with previously used imap inbox folder
See dbmail-export man page. You want -D and -s with an imap search matching your subject. See the Exmaples section, and if you need help with the search string, either run it in your imap client and see what it uses, or ask back on the list. And you might use -u to restrict your tests to a specific user until you have it right. On Wed, 2009-07-22 at 23:01 -0700, Piotr Wadas wrote: Hello, When administrator migrates mbox folders to dbmail, in some of them is a imap message, common pop3/imap ignores it, but when migrated, this message appears on the list, and frightened users call support, to ask what is this and what shall I do with this. And yes, this is no joke. Any quick sql query to delete from database all messages for all users (envelopes and bodies) with particular SUBJECT header? or for particular user? I'd rather to delete the messages, than delete envelope and let dbmail-util do the rest (it has enough to do with really deleted messages). Probably Net::POP3 perl script would do the same, but removing from tables would be much simplier. Regards, DT -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
Re: [Dbmail-dev] New Idea
On Fri, 2009-06-12 at 09:55 -0700, Jonathan Feally wrote: Jesse Norell wrote: That's exactly what dbmail_pbsp does already, just in a separate table. Maybe you just need to enable pbsp in your config file? (I don't remember that support being removed, but it's possible. It's still in the sql schema though.) The pbsp is only used with the pop3 daemon. There are both pop_before_smtp and imap_before_smtp config values (though I can't say that they still work, but on the ancient version we're running they do). Also, there is no attachment of user to ip in that table. Just the timestamp and IP is stored so that the smtp can determine that the sending IP did authenticate recently. Doh, indeed that's true; I misread that earlier. A better approach to this would probably be a security log table. user_idnr, service, login_time, logout_time, session_id, session_status, ip_address, tcp_port. This essentially would require a new table, and some db_update calls in the right places. Agreed, that'd be a more useful setup. Also consider marking failed login attempts (though you might resort to syslog for non-matching usernames). There have been requests for logging the above as well as messages/bytes transferred stats and such in the past, I have no idea where things are at on that front, but could put those counters in as well. -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev
Re: [Dbmail-dev] Help on debug an issue with IMAPD
That's hitting a system limit; su to dbmail and run ulimit -n to see the current limit, probably 1024. Then try ulimit -n 4096 or so before starting imapd ... or look at where your system sets those limits (eg. /etc/security/limits.conf on debian) and change it there (setting is nofiles in limits.conf). With your wild and unusual memory growth, possibly there is a memory leak triggered by that failure not cleaning up something? On Mon, 2009-02-09 at 10:26 +, Jorge Bastos wrote: I also have the output in syslog: --- Feb 9 09:48:45 lira dbmail/imap4d[24857]: [0x9613548] Error:[message] _set_content_from_stream(+785): opening tmpfile failed: Too many open files Feb 9 09:51:31 lira dbmail/imap4d[24857]: [0x9613008] Error:[message] _set_content_from_stream(+785): opening tmpfile failed: Too many open files Feb 9 09:53:33 lira dbmail/imap4d[24857]: [0x9613488] Error:[message] _set_content_from_stream(+785): opening tmpfile failed: Too many open files Feb 9 09:58:28 lira dbmail/imap4d[24857]: [0x9613308] Error:[message] _set_content_from_stream(+785): opening tmpfile failed: Too many open files Feb 9 10:01:51 lira dbmail/imap4d[24857]: [0x9612e88] Error:[message] _set_content_from_stream(+785): opening tmpfile failed: Too many open files -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev
Re: [Dbmail-dev] Help on debug an issue with IMAPD
Heh... and on second thought, this is likely due to a filedescriptor leak, so the below would just be treating the symptom, and only extend the run-time, not solve it. On Mon, 2009-02-09 at 09:58 -0700, Jesse Norell wrote: That's hitting a system limit; su to dbmail and run ulimit -n to see the current limit, probably 1024. Then try ulimit -n 4096 or so before starting imapd ... or look at where your system sets those limits (eg. /etc/security/limits.conf on debian) and change it there (setting is nofiles in limits.conf). With your wild and unusual memory growth, possibly there is a memory leak triggered by that failure not cleaning up something? On Mon, 2009-02-09 at 10:26 +, Jorge Bastos wrote: I also have the output in syslog: --- Feb 9 09:48:45 lira dbmail/imap4d[24857]: [0x9613548] Error:[message] _set_content_from_stream(+785): opening tmpfile failed: Too many open files Feb 9 09:51:31 lira dbmail/imap4d[24857]: [0x9613008] Error:[message] _set_content_from_stream(+785): opening tmpfile failed: Too many open files Feb 9 09:53:33 lira dbmail/imap4d[24857]: [0x9613488] Error:[message] _set_content_from_stream(+785): opening tmpfile failed: Too many open files Feb 9 09:58:28 lira dbmail/imap4d[24857]: [0x9613308] Error:[message] _set_content_from_stream(+785): opening tmpfile failed: Too many open files Feb 9 10:01:51 lira dbmail/imap4d[24857]: [0x9612e88] Error:[message] _set_content_from_stream(+785): opening tmpfile failed: Too many open files -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev
RE: [Dbmail] problem with user importing
Hello, On Mon, 2009-01-19 at 23:55 -0800, wojtek_z wrote: hi after importing users using script: dbmail-users -a $i -P shadow -m 100M; and making sql update update dbmail_users set encryption_type='shadow'; I've never heard of 'shadow' being a valid encryption_type. We're running an old dbmail version, so maybe it is nowadays, but the man page doesn't mention it either so I'd stay clear of that myself. Stick with 'crypt' or 'md5-hash'. You might also try specifying the password hash yourself, if for some reason there's a problem copying it. Something like: for i in `cut -d: -f1 passwd` do pw=`grep ^${i}: shadow | cut -d: -f2` dbmail-users -v -a $i -p md5-hash -w $pw -m 100M done I don't remember any similar problems with importing users like that offhand, though ... it doesn't explain what the actual issue is with using dbmail-users. Maybe you can turn up debugging on it? (I don't know how much debugging that utility has.) i still can't autenticate using pop3d. In mysql i have dbmail_users.password - yY and dbmail_users.encryption_type - shadow Jorge Bastos wrote: Don't do that. dbmail-users -v -a $i -p md5-hash -P shadow -m 100M; replace with: dbmail-users -a $i -P shadow -m 100M; and after the import run: update dbmail_users set encryption_type='shadow'; in the dbmail-users command, you are missing the alias (the -s option) -Original Message- From: dbmail-boun...@dbmail.org [mailto:dbmail-boun...@dbmail.org] On Behalf Of wojtek_z Sent: segunda-feira, 19 de Janeiro de 2009 22:38 To: dbmail@dbmail.org Subject: RE: [Dbmail] problem with user importing password from /etc/shadow $1$4YIoXI1y$sSJh3Z7JwEUEl7fUbvHSQ. password from dbmail_users.password yY when encryption_type is set to crypt when encryptiony_type is set to md5 passwod's look like $1$\yY i import users and passwords using script: for i in `cat passwd | awk -F: '{print $1}'`; do dbmail-users -v -a $i -p md5-hash -P shadow -m 100M; done Jorge Bastos wrote: That is strange. How are you transporting the values from the shadow file to the database? 3 years ago when I moved to DBMail, I was using system users with crypt and had no problem. Also, In the dbmail_users table, are setting the encryption_type to crypt? -Original Message- From: dbmail-boun...@dbmail.org [mailto:dbmail-boun...@dbmail.org] On Behalf Of wojtek_z Sent: segunda-feira, 19 de Janeiro de 2009 21:41 To: dbmail@dbmail.org Subject: [Dbmail] problem with user importing Hi, I have a strange problem. I will migrate to dbmail 2.2.10. When i do test with import users and passwords password from /etc/shadow in format $xxx$x$ presents in dbmail db like $1\yY . And after migrating i have problem with user autentication. -- View this message in context: http://www.nabble.com/problem-with- user- importing-tp21540210p21540210.html Sent from the dbmail users mailing list archive at Nabble.com. ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail -- View this message in context: http://www.nabble.com/problem-with-user- importing-tp21540210p21553188.html Sent from the dbmail users mailing list archive at Nabble.com. ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] problem with user importing
On Mon, 2009-01-19 at 13:40 -0800, wojtek_z wrote: Hi, I have a strange problem. I will migrate to dbmail 2.2.10. When i do test with import users and passwords password from /etc/shadow in format $xxx$x$ presents in dbmail db like $1\yY . I don't quite follow here ... can you post an example of a password hash before and after importing? And what do you have for the encryption_type in the _users table? And after migrating i have problem with user autentication. -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] Mailbox full
On Thu, 2009-01-15 at 19:42 +, James Greig wrote: Hi, Not sure if this one's possible or not but here goes. If a users mailbox is full it's dbmail-lmtpd that reports this and sends a bounce back. That's how dbmail-smtp (now dbmail-inject) works, but dbmail-lmtpd shouldn't - it should return a failure code to the lmtp client. What the client does is another story, and it might create a bounce, depending on your setup. Are there any working methods to reject the email at the MTA (i.e. postfix) via an sql lookup or something to reject this on rcpt to? That's mta specific. With postfix you could write a policy daemon that does a quota lookup (I got about half-way done on one of those once). There's another setting that has postfix hold the initial smtp connection open and send the error code after it has actually attempted delivery, but I sure can't seem to find what it is. (Default behavior is to accept the message and put it in a queue for later delivery.) Cheers James Greig - AS33854 - AS45014 Nuco Technologies Ltd ja...@host-it.co.uk www.nucotechnologies.com Tel. 0870 165 1300 Nuco Technologies Ltd is a company registered in England and Wales with company number 04470751 ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] Re: DBMail 2.3.5 released
Tried to update the DB as follows: # psql -U pgsql dbmail 2_3_4-2_3_5.pgsql With the following result: ALTER TABLE CREATE INDEX ALTER TABLE ERROR: syntax error at or near VARCHAR LINE 1: ALTER TABLE dbmail_users ALTER COLUMN passwd VARCHAR(130) NO... ^ That size was increased to handle some new hash types .. shouldn't be a showstopper for you upgrading an existing system. It sounds like you had another schema update problem too, though: The dbmail-imapd daemon started without incident, however, was not able to access the existing account from KMail. Log entries follow: Jan 06 11:08:43 [server name] dbmail-imapd[55335]: [0x2881e820] Error: [db] db_getmailbox_mtime(+2472): SQLException: ERROR: column mtime does not exist LINE 1: SELECT name,ROUND(DATE_PART('epoch',mtime)) FROM dbmail_mail... As that says, it's trying to use a column named mtime which doesn't exist in your schema. If the migration scripts are broken or there was an old update you missed or something, you may have to add that manually. Created new database and tried to apply update with the following result: # psql -U pgsql dbmail-2.3.5 /usr/local/share/dbmail/postgresql/2_3_4-2_3_5.pgsql ERROR: column seq of relation dbmail_mailboxes already exists ERROR: relation dbmail_mailboxes_seq already exists ERROR: column mtime of relation dbmail_mailboxes does not exist ERROR: syntax error at or near VARCHAR LINE 1: ALTER TABLE dbmail_users ALTER COLUMN passwd VARCHAR(130) NO... ^ If indeed you're creating a new database here, use the full 2.3.5 schema directly, don't put in and old version and update it (though by right you should end up with the same thing in either case if everything works right). Note, I've note used 2.3.x offhand, but hopefully that'll point you in the right direction... -- Jesse Norell Kentec Communications, Inc. je...@kci.net ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail-dev] DBMail 2.3.4 released
On Fri, 2008-11-14 at 21:17 +0100, Paul J Stevens wrote: Do you consider the database schema pretty much set in stone? Pretty much, sure. No plans to change them on this end. There was the mention of the cplogs patch recently, with schema changes (if it gets updated for 2.3). Might just be table additions though, I don't know. -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev
Re: [Dbmail] Question about passwords
You're looking at a md5 digest vs. a md5 hash, and dbmail supports both flavors. You're wanting to create a hash (which uses $1$somesalt$), and you can do so with the crypt() function. See eg. http://sial.org/howto/perl/password-crypt/ for an example. On Wed, 2008-11-12 at 16:26 +0100, Giulio Ferro wrote: Jorge Bastos wrote: Are you sure? I think you are wrong! mysql select md5('hello'); +--+ | md5('hello') | +--+ | 5d41402abc4b2a76b9719d911017c592 | +--+ 1 row in set (0.01 sec) Yes, this is correct, but it doesn't begin with $1$ so it's different from the vpopmail password... This is how Vpopmail encodes hello: $1$MXpNvihd$cya2POi/0xyg3eMnEQvkr1 Dbmail can verify this password, but I don't know how, since changing the password with md5-hash yields: $1$gIj47gF0$gkXNFpjlur1xyApcwdNXu/ (begins with $1$, but it's different from the vpopmail one) I hope the problem is clearer, now... -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] Question about passwords
On Wed, 2008-11-12 at 16:52 +0100, Paul J Stevens wrote: I have imported users from an old vpopmail installation and all the passwords begin with $1$ If I try select md5(password) That means that the passwords are in CRYPT format. No, crypt passwords don't begin with $, just tried... You are wrong, Jorge is correct. Well, they're probably both right - crypt() can handle both formats (md5 hash and DES hash) as long as your (g)libc supports it. But md5(something) gives you an md5 digest value, which dbmail can use, but is not what Giulio is needing. md5 passwords that begin with $1$ are indeed crypt. The format is: $1$salt$encoded -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] Question about passwords
On Wed, 2008-11-12 at 17:44 +0100, Giulio Ferro wrote: select concat('$1$', 'cHk47Kk0' , '$', encrypt('hello','cHk47Kk0')); The salt is the full 12 chars, $1$cHk47Kk0$, and it looks like encrypt() already prepends it for you: mysql select encrypt('hello','$1$cHk47Kk0$'); ++ | encrypt('hello','$1$cHk47Kk0$')| ++ | $1$cHk47Kk0$TjUIVx0j9o/sZ0kn/IIzD. | ++ 1 row in set (0.02 sec) -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] Question about passwords [SOLVED]
On Wed, 2008-11-12 at 18:58 +0100, Giulio Ferro wrote: Jesse Norell wrote: The salt is the full 12 chars, $1$cHk47Kk0$, and it looks like encrypt() already prepends it for you: mysql select encrypt('hello','$1$cHk47Kk0$'); ++ | encrypt('hello','$1$cHk47Kk0$')| ++ | $1$cHk47Kk0$TjUIVx0j9o/sZ0kn/IIzD. | ++ 1 row in set (0.02 sec) Thanks, you saved me! As you showed, the mysql crypt functions already build the complete string, so it's not necessary to concat the parts: select encrypt('password to verify', 'string in passwd from the first $ to the last $ included') And for convenience you can actually use the hash right from the dbmail_users table without parsing out the salt: mysql select encrypt('hello', '$1$cHk47Kk0$TjUIVx0j9o/sZ0kn/IIzD.') as hash; ++ | hash | ++ | $1$cHk47Kk0$TjUIVx0j9o/sZ0kn/IIzD. | ++ 1 row in set (0.00 sec) This results, if the check is successful, with the whole passwd field in the dbmail_users table. One other consideration is if you want to do the comparision in the database at all. The way you have it, your plaintext password is passed to the database, so if your database connection is susceptible to sniffing, or you ever enable logging of queries and don't have the log files secured, you can leak that info. The other route is to just retrieve the hash from the database and compare it locally (in your perl/php/whatever app). -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] RE: Help on new ZDB system
# Database settings host= # host for database, set to localhost if database is om # the same host as dbmail and you want to use a local socket # for connecting. sqlport=# if you want to use TCP/IP for connecting to the database, # and have the database running on a non-standard port. sqlsocket=/var/run/mysqld/mysqld.sock ... Failed to start connection pool -- no host specified in URL Just a guess, but have you tried setting host=localhost like the comments say to do? -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] incomplete IMAP attachments with thunderbird 2.0.0.16 (20080708)
Did this occur with thunderbird 2.0.0.14? 2.0.0.16 was very recently released. Have you read my initial post? I wrote Thunderbird 2.0.0.16 (20080708) ;) I'll interject and paraphrase the question, Thunderbird 2.0.0.16 was recently released and may have introduced this bug; have you tried it with 2.0.0.14 to see if it occurs there as well? -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] replication
The more dbmail-specific (or mail-specific, really) reason is it breaks the imap protocol. Aside from any issues like Gordan alludes to here, I believe you could use it with pop3 and lmtp without a problem. On Thu, 2008-06-12 at 18:56 +0100, Gordan Bobic wrote: James Greig wrote: Hi, I've probably asked this before however can someone remind me why mysql master-master (innodb) replication is not recommend with dbmail? It's not recommended with anything. By the very nature of it, there is a potential very nasty race condition inherent in multi-master MySQL replication. In practice you'd have to be extremely unlucky to encounter it, but since there is no cluster-wide locking available in this setup, it is a possibility. FWIW, I use it with multi-master replication. YMMV. Gordan -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] replication
On Thu, 2008-06-12 at 12:00 -0600, Jesse Norell wrote: The more dbmail-specific (or mail-specific, really) reason is it breaks the imap protocol. I guess I should say, it *can* break the imap protocol, as it will under certain circumstances, not that it *does* all the time. See the mail list archives for details. Aside from any issues like Gordan alludes to here, I believe you could use it with pop3 and lmtp without a problem. On Thu, 2008-06-12 at 18:56 +0100, Gordan Bobic wrote: James Greig wrote: Hi, I've probably asked this before however can someone remind me why mysql master-master (innodb) replication is not recommend with dbmail? It's not recommended with anything. By the very nature of it, there is a potential very nasty race condition inherent in multi-master MySQL replication. In practice you'd have to be extremely unlucky to encounter it, but since there is no cluster-wide locking available in this setup, it is a possibility. FWIW, I use it with multi-master replication. YMMV. Gordan -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] replication
I'm not familiar with mysql master-master per se, but I'm guessing if communication between the two is cut off, each keeps running independently? If so, I think you just described/designed the known bad setup that can break imap. The other recent post here about using in a disaster recovery mode where dbmail only talks to one database should work fine (in regaurd to the imap issue). On Thu, 2008-06-12 at 19:14 +0100, Gordan Bobic wrote: It depends on how you use it. I have 2 servers in a cluster and each is set up to use it's local instance of the DB, with the DB in master-master configuration. The front end is DNS load balanced, but dbmail itself always uses the local database. This works around most of the scope for race conditions to occur. Either way, you should stress-test any such configuration extensively before you deploy it. Gordan Jesse Norell wrote: The more dbmail-specific (or mail-specific, really) reason is it breaks the imap protocol. Aside from any issues like Gordan alludes to here, I believe you could use it with pop3 and lmtp without a problem. On Thu, 2008-06-12 at 18:56 +0100, Gordan Bobic wrote: James Greig wrote: Hi, I've probably asked this before however can someone remind me why mysql master-master (innodb) replication is not recommend with dbmail? It's not recommended with anything. By the very nature of it, there is a potential very nasty race condition inherent in multi-master MySQL replication. In practice you'd have to be extremely unlucky to encounter it, but since there is no cluster-wide locking available in this setup, it is a possibility. FWIW, I use it with multi-master replication. YMMV. Gordan ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] replication
On Thu, 2008-06-12 at 23:54 +0100, Gordan Bobic wrote: Paul J Stevens wrote: I've probably asked this before however can someone remind me why mysql master-master (innodb) replication is not recommend with dbmail? It's not recommended with anything. By the very nature of it, there is a potential very nasty race condition inherent in multi-master MySQL replication. In practice you'd have to be extremely unlucky to encounter it, but since there is no cluster-wide locking available in this setup, it is a possibility. FWIW, I use it with multi-master replication. YMMV. These conditions will not be very rare at all once you start putting pressure on it. But there is another reason in the imap requirements: UID values must be strictly ascending within a mailbox. Since these UID values are the autoincremented primary key on the mailboxes table the only way to avoid collisions in the first place is by stepping them differently on the separate masters, but doing that will collide with the imap requirement I mentioned. Hmm... I'll have to think about that case and try a few tests. Unless there is a serious race condition encountered (which will only happen if the same user has multiple simultaneous connections to separate servers), I think the staggered auto-increments will still resolve correctly (there will just be holes in the key-space, which I don't think would cause problems). I'm not saying it's a good idea, but I think the scope for a damaging race condition is reasonably limited. The issue, if I recall, is more that once the two servers come back online, and the databases sync up again, messages that were delivered (either via smtp or imap append) on the other server (that the user wasn't connected to) could have a lower uid than what it's already seen, so the client will never see or request those emails, and effectively looses them. I think there was something with a uidvalidity call or something that can trigger the client to reload the whole mailbox (don't know if it's client or server-driven, etc.), which is less than optimal with a large mailbox. -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] upgrade failure
On Thu, 2008-05-22 at 09:36 -0400, Curtis Maurand wrote: OK, I did something wrong. from the server where the upgrade was to go. I did: mysqladmin -ppassword create dbmail mysqldump -ppassword -h old.server.com --database dbmail dbmail.dump mysql -ppassword dbmail dbmail.dump mysql -ppassword dbmail migrate_from_2.0_to_2.2.sql dbmail-util -ay (I think this might have been the screw up) Now all headers when connecting with any imap client are blank (no from, no subject). Do I need to do the import over again? From memory, I think you need to run dbmail-util -by after an upgrade, to populate header cache tables and the like. You use -ay for daily/periodic maintenance. -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] DBMAIL grinds to a craw in production
I don't know if the original problem here was actually tracked to the database or just guessing there, but another thing to check is logging. Eg. if you have log level 5 turned on and your syslog isn't set to buffer writes, you will likely notice the performance hit. :) -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] Local Recipient Verification
On Wed, 2008-04-30 at 14:21 +0100, [EMAIL PROTECTED] wrote: Also here, you can add a second hash containing local users. Except that's not what I want - I want to fall back on the default behaviour of checking users from /etc/passwd if the local_recipient_maps fails. Is there a way to do that? That is what you want. You want a local_recipient_maps entry that checks both your dbmail database (which you apparently have working) and also checks the password file. The default value is: $ postconf -d local_recipient_maps local_recipient_maps = proxy:unix:passwd.byname $alias_maps So just add in your dbmail value to the default behavior, and you should be set: local_recipient_maps = proxy:unix:passwd.byname $alias_maps \ mysql:/etc/postfix/sql-recipients.cf -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] mail execute on server?
On Mon, 2008-01-21 at 09:16 +0200, Sim Zacks wrote: Are there any server-side security possibilities involved in dbmail? Yes. For example, is it at all possible that a received email attachment will actually execute on the server? That case is not likely, but there are other ways to get things to execute, eg. if you found and exploited a buffer overflow or point of sql injection. Or could a mail with specific headers cause the dbmail to execute shell commands or run an application? It's not designed to execute commands from the headers, but that doesn't mean there will never be any errors found that would allow that to happen, or even that libraries dbmail uses (eg. gmime) wouldn't have an error and allow that. I'm trying to decide if it makes sense to put the dbmail on my production server or if I should lock it down on its own server. It would be more secure to keep it isolated, though you can do that on one physical box as well (eg. in a virtual machine, or maybe even running chroot). If you have users on the shared server, or any other access (eg. a webserver running), or use a shared database, then the installation procedures (eg. file permissions and whatnot) are of much greater consequence. But security is complex, there's no one-size-fits-all answer. -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] Sieve Error
Your Sieve script [Filter] failed to run correctly. Messages will be delivered to your INBOX for now. ... Bug? Feature? Informational ... and generally considered a nuisance, so it was removed (upgrade to a recent version and it should be gone). -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] new release migration
If we migrate everything over to the new release, will the existing messages be checked for duplicate mimes/attachments and take advantage of the “single instance storage?” Basically, will the existing duplicate mimes which were stored as separate copies be removed and only one copy is stored? It was mentioned previously that an existing database will still work, but new messages will be inserted in the new format, so if you merely upgrade your schema/programs, I think the answer is no. If by migrate you use imapsync or something, it would depend on if imap stores in the new format or not (and I can't answer that). A nice feature (which I think has been mentioned in one form or another in the past) would be a mode of dbmail-util that would run in the background to do the conversion. Eg. convert X number of messages, then sleep Y seconds, until they're all done (or use something smarter than sleep Y seconds to do more work when there's less load). If the bulk of a message conversion could happen at the messageblks/mimeparts level first, then changing the underlying message entry to point from blocks to parts (which would require a transaction/lock) should be pretty quick (though I've not looked at the new schema). -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] Deleting an account
On Tue, 2007-11-27 at 11:02 +0800, zamri wrote: Before deleting an account: dbmail-util -dy Setting DELETE status for deleted messages... Ok. [3596] messages set for deletion. Re-calculating used quota for all users... Ok. Used quota updated for all users. Deleting an account : dbmail-users -d johndoe Deleting aliases for user [johndoe]... [EMAIL PROTECTED] [EMAIL PROTECTED] Done After deleting an account: dbmail-util -dy Setting DELETE status for deleted messages... Ok. [0] messages set for deletion. Re-calculating used quota for all users... Ok. Used quota updated for all users. This means the stale messages are not marked as DELETE or will they be marked DELETE afterthat in the future? That's correct, the message status is not changed for extant mail of an account you delete. I believe the user's mailboxes get removed via foreign keys, and the messages within those likewise, but the actual message blocks (physmessage_blks ?) that store the email will remain until a dbmail-util -c cleanup. Also, if you don't have a recent dbmail version (2.2.6 and up?) there's a bug in dbmail-util (#305) that won't clean those up. How do I delete them without going into MySQL monitor? Make sure you're on a recent dbmail version, then dbmail-util -cy (or -ay) should catch it. -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] Delivery Error
On Thu, 2007-11-01 at 16:51 +, Duane Hill wrote: So, does that mean I have to populate the required table(s) beforehand as Postfix will ultimately only be accepting messages for valid account. There is automatic account creation support (LDAP requires it) .. I don't know if it's in lmtp or only via dbmail-smtp, and I don't see anything in the sample dbmail.conf nor man pages, so someone else will have to provide details. -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail-dev] Dbmail 2.2.7
On Thu, 2007-10-18 at 17:40 +0200, Paul J Stevens wrote: It will probably take us well into 2008 before 2.4.0, the next stable series, will be ready How about calling the next one 3.0.0? The underlying redesign is probably substantial enough to warrant that, especially if process threading and connection pooling gets thrown in. -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev
Re: [Dbmail] [announce] dbmail 2.2.7 release candidate 3
On Tue, 2007-10-09 at 23:06 -0700, Aaron Stone wrote: It's for the edit script mode in dbmail-sievecmd. I needed to know the name of the temporary file so that I could pass it as an argument to the EDITOR command, and none of the more secure temporary file variants hand back the file name. (Or if I missed one, please clue me in :-) Aaron With the word dangerous here, is there any real security issue for running dbmail-timsieved? In what situation? Here's the possible attack: someone with shell access captures the tmp file that dbmail-sievecmd makes while you are using it in live edit mode, then inserts a script that does something unpleasant with mail for that one user (discard, redirect, lots of vacations, etc.). That's it. I don't see any real world problem. It's a little more than that. dbmail-sievecmd has to run with privileges, at least as a user who can read dbmail.conf, and I'd guess it's common to be run by root. This is a local race condition, and when you combine it with another race condition in dbmail-sievecmd, you can overwrite arbitrary files as the user running dbmail-sievecmd; if that user is root, it's a total system compromise, and if running as another user it's at minimum a total dbmail database compromise. Note, that's a double (actually triple) race condition, and probably requires a world-writable current working directory, so the world isn't exactly coming to an end, but maybe worth addressing. The scenario goes: 1. tempnam() is run and finds a filename in /tmp not in use 2. attacker creates that file (mode 666) before fopen() is called (race condition 1) 3. editor is run and exits (file contents may or may not change) 4. attacker overwrites file contents with malicious contents (or hardlinks the filename to a different file of malicious contents) 5. dbmail-sievecmd tries to insert those contents and as it's not a valid sieve script, fails 6. dbmail-sievecmd, with current working directory of /tmp, does it's loop to find an unused dbmail-invalid.xxx.sieve filename 7. between the stat() which finds an unused name and the rename() of tmp to that filename, attacker creates a symlink with the new name pointing to someother file, which gets overwritten (race condition 2) So if running as root, and that other file is /etc/passwd or a variety of others, you have system compromise. If the file is dbmail.conf, you can supply your own password (if you get the host/username/etc. right). Step 4 (which would be the 3rd race condition) could alternately be Simply setting TMPDIR to a non-world-writable directory would foil all this (installation procedure). I believe you could also use mkdir() on the tmp name and put a file under that, as mkdir() is atomic (no race condition). If dbmail requires glibc (unknown), it also has a x mode to fopen() which uses O_EXCL, which would also solve the issue. Also on installation procedures, make sure you don't install dbmail-sievecmd with setuid, or it gives the user a text editor running as the dbmail-sievecmd user, with the same implications as above, but no race conditions required. -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] Re: Sending Emails to the shared folder
On Fri, 2007-10-05 at 21:29 +, Aaron Stone wrote: Installing a sieve script for every user is a lousy solution, but I don't have better options to offer (yet). You could have the MTA send a copy of all the mail delivered to the server (or all to that domain or whatever) to the shared user; then have the shared user pick off whatever it wants to save, and delete the rest. Should work fine on a low volume site. -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] Discursion about bug #465
On Mon, 2007-10-01 at 19:26 +0200, Michael Monnerie wrote: And what happens when you 1) delete mailbox 'A' 2) re-create mailbox 'A' normal imap behaviour would give you a fresh new and empty mailbox. Rename the old, delete box to A.mmdd-hhmmss or remove it permanently then. How about using the dbmail internal user (or create another for this purpose), and change ownership of the folder upon delete. So user deletes folder 'A' and it gets moved to _@@_dbmail_internal_user@@__'s DeletedFolders/user/mmdd-hhmmss/A or somesuch (and follow up with updating user's quotas). You could set the message status to 2 on all those .. after 2 runs through dbmail-util they'll be gone. Then add another small check to delete folders from under DeletedFolders when there are no longer any messages contained in them. I don't have the urgent need for that feature Nor I... -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] Discursion about bug #465
On Mon, 2007-10-01 at 19:06 +, Aaron Stone wrote: On Mon, Oct 1, 2007, Jesse Norell [EMAIL PROTECTED] said: On Mon, 2007-10-01 at 19:26 +0200, Michael Monnerie wrote: And what happens when you 1) delete mailbox 'A' 2) re-create mailbox 'A' normal imap behaviour would give you a fresh new and empty mailbox. Rename the old, delete box to A.mmdd-hhmmss or remove it permanently then. How about using the dbmail internal user (or create another for this purpose), and change ownership of the folder upon delete. So user deletes folder 'A' and it gets moved to _@@_dbmail_internal_user@@__'s DeletedFolders/user/mmdd-hhmmss/A or somesuch (and follow up with updating user's quotas). You could set the message status to 2 on all those .. after 2 runs through dbmail-util they'll be gone. Then add another small check to delete folders from under DeletedFolders when there are no longer any messages contained in them. I don't have the urgent need for that feature Nor I... I'm also not in any personal need of this feature, but I like the idea. Here's what I think should be done: - add a 'status' column to dbmail_mailboxes. - upon delete, set status to deleted, rename the box with a timestamp. - dbmail-util will do the same status delete - status purge - purge as it currently does with messages. - don't change ownership, we need to preserve that information. - recreating a mailbox results in a new empty one. if you want the original box back, you have to get sysadmin intervention. Aaron You'd want to consider if these count against quota or not (probably not), and if not then you have to make sure they can't access/subscribe to these folders. That's one thing changing to the internal user would handle nicely - no quota issues, no access issues, in fact not even any schema changes or anything, so it could even be added to 2.2 :). The ownership info that's needed to be preserved would be the user part of the above folder name (or make it userid-1234 or whatever). -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] Quota message
On Mon, 2007-09-24 at 19:07 +0300, Kerem Hadimli wrote: I'm currently using dbmail 2.2.4 on our servers. With dbmail-users -l, i see 50.00:50.00 as quota information i think this means user's quota is full. But, when i send an email to the user, i get a user unknown bounce? Upgrade to 2.2.6-2 (then apparently it will say, Permanent Failure Mailbox Status Mailbox full instead). -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] Messages moved from Cyrus appear to have been deleted.
On Fri, 2007-09-21 at 09:44 -0500, Leland F. Jackson wrote: I am using Thunderbird to move messages from my Cyrus system on 192.168.1.109 to my dbmail system on 192.168.1.78. I have set up an account in Thunderbird for both the Cyrus user and corresponding dbmail user. I then used Thunderbird to create new folders in dbmail that matches the folders I had under Cyrus for a particular user. Then I used Thunderbird to copy the emails from the Cyrus folders to the new corresponding dbmail folder by doing a [select all] menu option to select all emails in the cyrus folder, then right clicking on all the emails highlighted from the [select all], and then clicking on the [copy to] menu option that appears, and finally navigating the Thunderbird tree menu that appears to click on the new corresponding folder in dbmail. Then thunderbird copies all emails from the Cyrus folder to the corresponding new dbmail folder. I have also downloaded and installed the DBMA administration tool. I then twice ran a [database cleanup] from the DBMA tool, which seems to have set the status on all emails in all folders in the dbmail system to status 003. I looked at the DBMA admin doc and it indicates a database cleanup would mark all orphaned records with a status 003, (eg marked for deletion status). All the emails copied from the Cyrus system to the corresponding folder in dbmail no longer appear in Thunderbird, but all emails in the dbmail system do appear in the DBMA tool, but with a 003 status. Does this mean that all the emails copied from Cyrus to dbmail are orphaned? Does anyone have any idea about what happened, and where I should go from here? Regards, LelandJ I have no idea what caused the problem of them being deleted in dbmail (I don't use thunderbird, but others do, and I've never heard of that happening). As for right now, if you do see the messages there, you can undelete them by setting the status to 0 (new) or 1 (read). Don't do any maintenance/cleanup runs again, or you'll likely loose them (the next step after status=3 is to be deleted from the database). I don't know if DBMA makes that easy to do or not, but if not something like update dbmail_messages set status=1; in sql ought to do the trick. Jesse -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail-dev] [DBMail 0000508]: vacation sieve script always sends reply instead of just once
On Tue, 2007-09-11 at 16:12 +0200, [EMAIL PROTECTED] wrote: But.I meanwhile did a test by using a dbmail-sievecmd generated script. Guess what, then it works just fine. So there's only a problem when the script is generated by Avelsieve. For whatever it's worth, I started with Avelsieve, too, and likewise soon found that it wasn't flexible enough to create the script logic I wanted, so I read up on sieve syntax and just create them manually now. It's worth the little extra time to do so if your own scripts get a little complex, but for general users who won't do that it would be nice to have a gui. Hopefully in time more MUA's will add native sieve support (I'd love to use evolution's filtering interface with a sieve backend). -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev
RE: [Dbmail] Log table
On Tue, 2007-09-11 at 09:16 +0100, Jorge Bastos wrote: meanwhile the log table is very usable, having this on a raw file is not good also. So the switch to turn on/off saves your life If implemented, perhaps it could be enabled/disabled for a subset rather than the whole userbase? Eg. enable it for specific clientid's, or for specific users only. -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] Log table
On Thu, 2007-09-06 at 09:59 +0200, Michael Monnerie wrote: I'd also like a field messages_transferred, mostly for pop, but also possible for imap I guess. For IMAP it might be nice to know both messages retrieved (or I guess message parts, as you don't have to retrieve the whole thing, do you?) and messages APPENDed separately. Probably even byte counters for up/down would be useful there. -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] announce: DBMail 2.2.6 release-candidate 2
On Mon, 2007-09-10 at 12:22 +0200, Michael Monnerie wrote: Dear Devs, I still can see this happening: With -rc2: # dbmail-util -tubdpy Repairing DBMAIL messageblocks integrity... Ok. Found [0] unconnected messageblks. Repairing DBMAIL physmessage integrity... Ok. Found [91746] unconnected physmessages Looks like all or most messages are going to be deleted? I'm fairly certain (though it's not my data that's potentially lost :) that this is simply the fix for the long-standing bug #305. Previously there was no check for abandonned physical messages, and that was added recently. If you run it through one time and allow it to remove those, the next run should find none. Try it on a copy of your data first if you want With -rc1: # dbmail-util -tubdpy Repairing DBMAIL messageblocks integrity... Ok. Found [0] unconnected messageblks. Checking DBMAIL message integrity... Ok. Found [0] unconnected messages. Can anyone confirm this? mfg zmi ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] announce: DBMail 2.2.6 release-candidate 2
On Mon, 2007-09-10 at 22:16 +0200, Michael Monnerie wrote: On Montag, 10. September 2007 20:25 Paul J Stevens wrote: SELECT COUNT(*) FROM dbmail_physmessage WHERE id NOT IN (SELECT physmessage_id FROM dbmail_messages) I'm surprised because I didn't believe that there were that many unlinked physmessages, as I have a postgres rule that should prevent that from happening: CREATE RULE drop_messages_with_mailbox AS ON DELETE TO dbmail_messages DO DELETE FROM dbmail_physmessage WHERE ((dbmail_physmessage.id = old.physmessage_id) AND (NOT (dbmail_physmessage.id IN (SELECT dbmail_messages.physmessage_id FROM db mail_messages; I'm no sql wizard, but wouldn't that be a pretty bad performance hit? (Every time a message is deleted it does that?) I believe the physmessageblks got left around when deleting a user (eg. it deleted the users' mailboxes and messages, but not physmessages); if the above is indeed a performance drag (but maybe unnoticed on a low-volume server?), maybe you could rewrite it to act ON DELETE of the mailbox, which should happen much less often? There must be other places than dbmail_messages deleting that create an unlinked physmessage, or a bug in postgres? Did you manually clean up the existing cruft at the time you added the above rule? -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] Sieve error
Aaron was looking at that a little while ago, I believe the plan is to simply remove the error message completely, and deliver to INBOX. I believe the issue is malformed email headers, not a problem in the sieve parser, so the question is simply how to handle garbage in. On Wed, 2007-08-29 at 17:24 +0100, Jorge Bastos wrote: Hi, I have a few of there messages, but i have no idea how to find the source of it. Is this enought? (supose not). Jorge Your Sieve script [phpscript] failed to run correctly. Messages will be delivered to your INBOX for now. The error message is: syntax error, unexpected '', expecting '@' or '.' -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] slow queries
On Thu, 2007-08-23 at 12:26 +0200, Paul J Stevens wrote: I have loads of these in my slow query log and the box is suffering. # Query_time: 75 Lock_time: 0 Rows_sent: 0 Rows_examined: 225432 SET timestamp=1187861236; SELECT message_idnr FROM dbmail_messages m JOIN dbmail_physmessage p ON m.physmessage_id=p.id JOIN dbmail_headervalue v ON v.physmessage_id=p.id JOIN dbmail_headername n ON v.headername_id=n.id WHERE m.mailbox_idnr=2 AND n.headername IN ('resent-message-id','message-id') AND v.headervalue='[EMAIL PROTECTED]'AND p.internal_date NOW() - INTERVAL 3 DAY; What client makes these and why etc? This query comes from the suppress_duplicates code. Could this not be handled with a unique index? Can an index include the date check function? If so, just make a table with the headervalue, mailbox_idnr and date, and a unique index across it .. try inserting the value of either message-id or resent-message-id into it and if it's already there the insert will fail (of course it could fail for other reasons too..). That ought to be much quicker than a 75 second SELECT. (Or maybe an index could help with the existing SELECT?) -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] MySQL copying to tmp table
But I think than 'copying to tmp table' requests make velocity too badly. This was discussed on the list not long ago .. iirc, the proposed solution was to have a config item for where your tmp directory is located; those who don't want it on a physical disk can simply mount a ram-based device somewhere and point it at that. Eg. tmpfs in linux. How to disable too same requests? I'm not sure what you mean here ... how to cache the results of a query? -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] Deleting an account
On Mon, 2007-08-13 at 16:22 +0800, zamri wrote: When deleting an account, do the mails associated to the account marked deleted? If not, would it be nice to add a query like Would u like to delete all the mails for this account? which is equal to dbmail-users -e name? This depends on what version of dbmail you have, and maybe on what tool you use to delete the account. In old (1.2 series) and very recent (2.2.6ish) versions, the mail will get cleaned up at the next run of dbmail-util; but there's a big stretch in the middle (most of 2.2 series ... I don't remember where 2.0 falls) where it won't. As for tools, it's possible dbma would do that correctly, but I don't use it so can't test it, and don't remember 100% if it does. -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail-dev] Re: [Dbmail] Segmentation fault in dbmail-users and dbmail-util
On Thu, 2007-08-09 at 08:35 -0700, Aaron Stone wrote: However I am considering just slurping the entire result set into memory at level of auth_check_user_ext recursion. One would need an absurd number of improperly recursive aliases for this to be a problem. Thinking of a heuristic to work defensively around such a situation. Keep a list of the alias_idnr and an already_seen flag so you never follow a given alias expansion more than once? (Or maybe that's how it's handled with the old way.) -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev
Re: [Dbmail] purge
Wasn't some delete old messages function added to dbmail-util lately, too? What about the other tables, like dbmail_messageblks There is a table constraint on dbmail_messages = dbmail_physmessages = dbmail_messageblks. The query should be: delete from dbmail_physmessages. Everything is cleared in one stroke. -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
[Dbmail] - and _ in folder names
Hello, I have a folder named -Spam and one named _Spam which get mixed up in imap (ie. show the same contents/message counts). Indeed, I'm not allowed to make a -Test and then a _Test, because dbmail-imapd says it already exists. Am I don't something not allowed, or is dbmail a little off there? Jesse -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail-dev] INT8
I'm no postgres wizard, but aren't the type cast performance issues like this resolved with postgres 8? Running dbmail 1.2, we turned on imap and it performed horribly with squirrelmail, for precicesly that reason (ie. the queries sent didn't themselves do a typecast). After a little looking into the problem, we needed to either fix dbmail queries or we found postgres 8 solved that issue; we decided to upgrade postgres (from 7.4.x) and it did indeed give a tremendous performance improvement (because it could then use indexes). Maybe it's a different issue, or maybe the int8 vs. int4 thing is in addition to the above, but it sure sounds similar... Jesse On Mon, 2007-08-06 at 10:35 +0200, Marc Dirix wrote: Op 5-aug-2007, om 23:14 heeft Aaron Stone het volgende geschreven: The folks at ICS coded for 64-bit id numbers very early on. *shrug* Never considered it to be a problem. Why would it be a severe penalty? It is because both indexes work better with normal INT, and tables are better optimized. (In Postgres that is). This text explains about indexing (copied from http:// www.thescripts.com/forum/thread400290.html) Postgresql has a really need feature that allows users to define their own types. Yeah, cool. But, it means that the parser is not much smarter about coercing an int4 to an int8 than it is about coercing a custom type (hex, foobar, etc...) from one to another. What this means too you, the user, is that: create table test (id int8, info text); insert 10,000 rows select * from test where id=456; will result in a sequential scan. Why? Because the default integer type is int4, and your id field is int8. Cast the value to int8, and watch it use an index scan: select * From test where id=cast(456 as int8); However changing user_id and mailbox_id to INT4 will have the same resullt! Marc ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev
Re: [Dbmail-dev] New features?
I wrote a little dracinsert utility about a year ago - adding native drac support is trivial (a single call to dracauth() and the hooks to specify a server), though I don't know how well used it would be (ie. is it worth it?). You'd want a configure --with-drac option to add in -ldrac. On a related note, can your database handle triggers that call OS commands (or compiled code or anything)? If so, you could take the dracinsert I wrote and have your database execute it every time dbmail's pbsp table is updated (or slightly adapt it to run as a trigger if you have to run compiled code). And again on a related note, would it be useful to have dbmail be able to call any arbitrary OS command with certain parameters when a user logs in/out? And/or at any other time? With custom hooks in the right places it could be a very flexible system. And is it worth it? On Thu, 2007-07-19 at 22:24 +0200, Paul J Stevens wrote: drac support Dbmail has been doing that since before 1.0, albeit with its own native implementation (pop_before_relay/imap_before_relay). -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev
Re: [Dbmail-dev] unused physmessages are not deleted when a user is deleted
One issue to consider in this is scheduling database load. In the current dbmail-util setup, for better or worse, deleting a user or mailbox doesn't take the heavier hit of removing all their mail. I can come up with some nice worst cases for either method (ie. deleting physical messages all at one shot in off-hours or spreading the load throughout the day, whenever a user is deleted) - I don't know what would be better in practice. I like the flexibility, but it may not be worth the confusion, created by making either work - an optional trigger to load if you want that method, otherwise dbmail-util cleans it up. On Sat, 2007-07-07 at 22:51 +0200, Paul Stevens wrote: Try this (untested): CREATE PROCEDURAL LANGUAGE plpgsql; create function physmessage_gc() returns trigger as $$ begin delete from dbmail_physmessage where OLD.physmessage_id not in (select physmessage_id from dbmail_messages); return OLD; end; $$ language plpgsql; create trigger message_delete after delete on dbmail_messages for each row execute procedure physmessage_gc(); I'll be adding more stuff like that to the trunk code as we move toward 2.3.0. With mysql-5.0/postgresql-8.x/sqlite-3 we can start using rich triggers and procedures to take care of all the basic stuff that is still done with dbmail-util. -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev
Re: [Dbmail] postfix ish question.
On Mon, 2007-07-02 at 13:05 +1000, Jake Anderson wrote: I have been given a pop3 account on another server. I want to grab its emails and use that account through my shiny dbmail imap account. I can grab the email with fetchmail and put it into a local account of the same name, however when i try to send mail (though our local imap/smtp server) to other users of that same domain postfix thinks its a local recipient based on the domain name (it gets this from the dbmail tables) and tries to deliver it locally. Any suggestions? Have fetchmail deliver locally using dbmail-smtp or dbmail-lmtpd and don't configure postfix to handle mail delivery for that domain. -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail-dev] Re: slow query timing - feature discussion
On Thu, 2007-06-28 at 09:55 +0200, Paul J Stevens wrote: The logs already contain sufficient information since they contain timestamps on both the QUERY statement, and the RESPONSE sent back to the client. Hey, if every response is already logged, then the cost of doing the timing is almost nothing - two calls to gettimeofday(), subtract the difference and put it in the log message you're already creating. I thought about using the timestamps of the log messages; that would work for dbmail direct logging, but may not always be tremendously accurate with syslog (though likely good enough for debugging anything slow). It just seemed pretty trivial an fairly useful .. but if it's a bad idea, that's fine (I have lots of those :). -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev
Re: [Dbmail-dev] speaking of dbmail-sievecmd...
-q does exactly that. % dbmail-sievecmd -u jesse -c standard | head -8 *** dbmail-sievecmd *** Opening connection to database... Opening connection to authentication... Ok. Connected! # This is a sieve script. More specifically, it's Jesse's # standard set of filters. So far avelsieve isn't quite # flexible enough for my liking, so we have this. # % dbmail-sievecmd -u jesse -c standard -q | head -4 # This is a sieve script. More specifically, it's Jesse's # standard set of filters. So far avelsieve isn't quite # flexible enough for my liking, so we have this. # It's in the man page; probably should be added to the help/usage message printed by dbmail-sievecmd itsself, though. On Wed, 2007-06-27 at 13:49 +0200, Marc Dirix wrote: There is an other annoying problem with dbmail-sievecmd. When using the -c option, both the script and the command output is put on StdOut. When using dbmail-sievecmd -c testscript myeditfile one always has to trim the first lines before inserting again. Either an -q (quiet) option, or putting output to StdErr would help here. -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev
Re: [Dbmail-dev] Re: slow query timing - feature discussion
On Wed, 2007-06-27 at 23:03 +0200, Marc Dirix wrote: why do this in dbmail, where L5 is already slow. Postgres can do this perfectly out of the box without adding extra time infliction. Right, and mysql can, too. But looking at eg. the slow squirrelmail thread on the dbmail list right now, if dbmail itsself provided timing along with all the other level 5 info, there would be no need to be requesting that from the original poster. That's a somewhat common info request, so would save time debuggging things. It wouldn't slow things too much (primarily the extra log message) .. and as you mentioned, level is slow, it's only for debugging problems, not real use. Can sqlite log slow queries? I'd guess so, but don't know... -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev
Re: [Dbmail-dev] [DBMail 0000616]: Request for timeout on connect
On Mon, 2007-06-25 at 18:54 +, Aaron Stone wrote: On Mon, Jun 25, 2007, [EMAIL PROTECTED] said: Jorge Bastos: I'd like to have another thing in all daemons on dbmail. I was testing this, i did: telnet server 110 and waited some time to see if the connection go away with a timeout or so, but it stayed alive. How about to have a config value to have this timeout and kill the connection when this value reach's? My idea, 0 disable's timeout, other value defines the timeout and kill's the connection when it reach's that value. Aaron Stone: Please discuss new ideas on the mailing list first! The timeout that applies in this instance is the same as the timeout once you're already connected. It might make sense to have a separate, shorter timeout prior to login. This needs mailing list discussion to work out the details. So, yeah, I think 30 - 60 seconds for the login timeout makes sense. Does anybody feel strongly that it should be configurable? Is it typical for a client UI to hold open the connection while waiting for the user to supply a new password? (In which case a longer timeout makes sense, to give the user time to respond). I have in the past done manual APOP stuff in testing, which takes cut/pasting from the login banner and back. 60 seconds ought to be plenty to do things like that .. probably a little nicer than 30 seconds. I've not done the same under imap except for a plaintext LOGIN .. dunno if it would potentially take longer there for different auth types or not. In any case, make sure the manual/telnet UI isn't affected too much by the value selected. -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev
Re: [Dbmail] sieve script error message
On Fri, 2007-06-22 at 16:44 +, Aaron Stone wrote: On Fri, Jun 22, 2007, Jesse Norell [EMAIL PROTECTED] said: Hello, I apparently just deleted the error email I wanted to ask about, but I'll provide another if I get one soon. Anyways, after making a few changes to my sieve filters yesterday, I've now gotten 3 instances of an error report email showing up in my INBOX from the sieve system. It has a diagnostic message (eg. something like next atom expecting ':' or along those lines), but there are no line numbers or context from the email, so I have no idea where I should be looking for the problem. Also, usually when I've made a mistake in a sieve script, dbmail-sievecmd doesn't let me insert it. Even yesterday when I made changes I had to fix a couple things before I could insert it ... and when it let me, I assumed it was syntactically valid. Maybe it is... can there be effectively a run time error in a sieve script? Anyways, if better checking could be done at insert time, that'd definitely be a good thing. Run time errors are possible, and the error notifications are unfortunately not particularly helpful except to let you know that _something_ happened. As to this email itself, I think the header cache stuff isn't done right. I can view message source and see a few headers, but in my email client (evolution, using imap), it showed no sender, subject or date ... which I think probably all comes from the header cache? Yes. If these are newly received messages, then something is probably wrong with your database. If they're old messages, you might just need to flush the cache tables and reload them with dbmail-util. I've been thinking about adding a flag that does this, rather than a manual flush + automated reload. I'm sure they're newly received (they have to be, don't they? dbmail doesn't have any ability to retroactively apply sieve filters to existing messages, does it?). This is dbmail 2.2.5, with libsieve 2.2.5. I don't have a copy of my sieve script as it was before I changed it to diff against, but I can provide a copy of the current one and point out the places that changed if desired. It all looks correct, and indeed passes the parser at insert time. I'll also try to turn up debugging for sieve to get some useful logs. I got another 4 of these this weekend, so I'll see about digging out the degbug messages and other info. Again the From, Subject and Date shown in my mail program were empty, though they do exist in the actual message when I view message source: From: [EMAIL PROTECTED] Subject: Sieve script run error To: jesse Message-Id: 1182608217l.13986l.0l@(none) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-DBMail-PhysMessage-ID: 1383963 X-Evolution-Source: imap://[EMAIL PROTECTED]/ Date: Mon, 25 Jun 2007 08:25:21 -0600 Your Sieve script [standard] failed to run correctly. Messages will be delivered to your INBOX for now. The error message is: syntax error, unexpected '.', expecting ATOM or QUOTE or ':' or '' The timestamp here is misleading .. every time I view message source it changes to the current time .. so I don't know exactly when they actually took place. If I look at some of the headers in the database, they appear to be there: mysql select * from dbmail_fromfield where physmessage_id = 1383963; +++--+-+ | physmessage_id | id | fromname | fromaddr| +++--+-+ |1383963 | 570447 | | [EMAIL PROTECTED] | +++--+-+ mysql select * from dbmail_tofield where physmessage_id = 1383963; +++++ | physmessage_id | id | toname | toaddr | +++++ |1383963 | 660173 || jesse | +++++ mysql select * from dbmail_datefield where physmessage_id = 1383963; +++-+ | physmessage_id | id | datefield | +++-+ |1383963 | 570355 | 1970-01-01 00:00:00 | +++-+ Note the Date is bogus .. maybe should default to NOW() instead of the epoch? select count(*) from dbmail_datefield where datefield = '1970-01-01 00:00:00'; +--+ | count(*) | +--+ | 49 | +--+ And/Or maybe it's the fault of the part injecting the message, as it looks to be missing the Date: mysql select messageblk from dbmail_messageblks where physmessage_id = 1383963 limit 1; From: [EMAIL PROTECTED] Subject: Sieve script run error To: jesse Message-Id: 1182608217l.13986l.0l@(none) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding
Re: [Dbmail] sieve script error message
After a bit more digging around, I found an old libdbmail sitting around in /usr/local/lib ... so I'm wondering if some of the problems I've seen were from that (I'll hope/presume they maybe were). As to the sieve error, it says unexpected '.'; I have one rule that potentially might be related: header :value ge :comparator i;ascii-numeric X-Spam-Score 9 I tested and both .5 and 20.5 perform as expected there .. perhaps a spam with a bogus header came through? I'll watch for more such messages and try to correlate them. If that's the case (ie. a bogus header came through), is generating an error with INBOX delivery the appropriate behavior? It arguably could be. It also gives spammers a nice way to bypass my above check to discard high-scoring spam. Perhaps a runtime error should be treated as a false (no match) instead, and processing proceed as normal? Or maybe a knob to turn on/off runtime sieve errors? Of course this is just guessing, too, till I can correlate one of those generated sieve errors with the actual message which produced it. Thanks, Jesse On Mon, 2007-06-25 at 09:14 -0600, Jesse Norell wrote: On Fri, 2007-06-22 at 16:44 +, Aaron Stone wrote: On Fri, Jun 22, 2007, Jesse Norell [EMAIL PROTECTED] said: Hello, I apparently just deleted the error email I wanted to ask about, but I'll provide another if I get one soon. Anyways, after making a few changes to my sieve filters yesterday, I've now gotten 3 instances of an error report email showing up in my INBOX from the sieve system. It has a diagnostic message (eg. something like next atom expecting ':' or along those lines), but there are no line numbers or context from the email, so I have no idea where I should be looking for the problem. Also, usually when I've made a mistake in a sieve script, dbmail-sievecmd doesn't let me insert it. Even yesterday when I made changes I had to fix a couple things before I could insert it ... and when it let me, I assumed it was syntactically valid. Maybe it is... can there be effectively a run time error in a sieve script? Anyways, if better checking could be done at insert time, that'd definitely be a good thing. Run time errors are possible, and the error notifications are unfortunately not particularly helpful except to let you know that _something_ happened. As to this email itself, I think the header cache stuff isn't done right. I can view message source and see a few headers, but in my email client (evolution, using imap), it showed no sender, subject or date ... which I think probably all comes from the header cache? Yes. If these are newly received messages, then something is probably wrong with your database. If they're old messages, you might just need to flush the cache tables and reload them with dbmail-util. I've been thinking about adding a flag that does this, rather than a manual flush + automated reload. I'm sure they're newly received (they have to be, don't they? dbmail doesn't have any ability to retroactively apply sieve filters to existing messages, does it?). This is dbmail 2.2.5, with libsieve 2.2.5. I don't have a copy of my sieve script as it was before I changed it to diff against, but I can provide a copy of the current one and point out the places that changed if desired. It all looks correct, and indeed passes the parser at insert time. I'll also try to turn up debugging for sieve to get some useful logs. I got another 4 of these this weekend, so I'll see about digging out the degbug messages and other info. Again the From, Subject and Date shown in my mail program were empty, though they do exist in the actual message when I view message source: From: [EMAIL PROTECTED] Subject: Sieve script run error To: jesse Message-Id: 1182608217l.13986l.0l@(none) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-DBMail-PhysMessage-ID: 1383963 X-Evolution-Source: imap://[EMAIL PROTECTED]/ Date: Mon, 25 Jun 2007 08:25:21 -0600 Your Sieve script [standard] failed to run correctly. Messages will be delivered to your INBOX for now. The error message is: syntax error, unexpected '.', expecting ATOM or QUOTE or ':' or '' The timestamp here is misleading .. every time I view message source it changes to the current time .. so I don't know exactly when they actually took place. If I look at some of the headers in the database, they appear to be there: mysql select * from dbmail_fromfield where physmessage_id = 1383963; +++--+-+ | physmessage_id | id | fromname | fromaddr| +++--+-+ |1383963 | 570447 | | [EMAIL PROTECTED
Re: [Dbmail] sieve script error message
On such a sieve error message, would it be reasonably doable to add the original message as an attachement? (And would that just trigger a loop? Ie. do sieve filters apply to headers of mime parts or just the outer message?) On Mon, 2007-06-25 at 17:09 +, Aaron Stone wrote: On the issue of what to do with an email that cannot be parsed by libSieve, I'm not sure what the best behavior is. On the one hand, seeing the email show up in your Inbox might lead you to think that the Sieve script was broken - so the error message is intended to clarify what happened. On the other hand, it's annoying and the messages are confusing. I like the idea of adding a dbmail.conf option to turn the messages off in the case of a bum email, and only alert if the script itself is broken (which can happen, if, say, you wrote a web sieve client that inserts directly into the dbmail_sievescripts table, bypassing the checks in ManageSieve and dbmail-sievecmd). I also like the idea of adding some vendor extensions, so that we can give users some mechanisms to configure their DBMail Sieve environment. Top of the script might have something like: require [vnd.dbmail]; vnd_dbmail :foo bar; ... This would hamper script portability a little bit, but so long as the vendor specific stuff is well marked as such, it should be fine. Aaron On Mon, Jun 25, 2007, Jesse Norell [EMAIL PROTECTED] said: After a bit more digging around, I found an old libdbmail sitting around in /usr/local/lib ... so I'm wondering if some of the problems I've seen were from that (I'll hope/presume they maybe were). As to the sieve error, it says unexpected '.'; I have one rule that potentially might be related: header :value ge :comparator i;ascii-numeric X-Spam-Score 9 I tested and both .5 and 20.5 perform as expected there .. perhaps a spam with a bogus header came through? I'll watch for more such messages and try to correlate them. If that's the case (ie. a bogus header came through), is generating an error with INBOX delivery the appropriate behavior? It arguably could be. It also gives spammers a nice way to bypass my above check to discard high-scoring spam. Perhaps a runtime error should be treated as a false (no match) instead, and processing proceed as normal? Or maybe a knob to turn on/off runtime sieve errors? Of course this is just guessing, too, till I can correlate one of those generated sieve errors with the actual message which produced it. Thanks, Jesse On Mon, 2007-06-25 at 09:14 -0600, Jesse Norell wrote: On Fri, 2007-06-22 at 16:44 +, Aaron Stone wrote: On Fri, Jun 22, 2007, Jesse Norell [EMAIL PROTECTED] said: Hello, I apparently just deleted the error email I wanted to ask about, but I'll provide another if I get one soon. Anyways, after making a few changes to my sieve filters yesterday, I've now gotten 3 instances of an error report email showing up in my INBOX from the sieve system. It has a diagnostic message (eg. something like next atom expecting ':' or along those lines), but there are no line numbers or context from the email, so I have no idea where I should be looking for the problem. Also, usually when I've made a mistake in a sieve script, dbmail-sievecmd doesn't let me insert it. Even yesterday when I made changes I had to fix a couple things before I could insert it ... and when it let me, I assumed it was syntactically valid. Maybe it is... can there be effectively a run time error in a sieve script? Anyways, if better checking could be done at insert time, that'd definitely be a good thing. Run time errors are possible, and the error notifications are unfortunately not particularly helpful except to let you know that _something_ happened. As to this email itself, I think the header cache stuff isn't done right. I can view message source and see a few headers, but in my email client (evolution, using imap), it showed no sender, subject or date ... which I think probably all comes from the header cache? Yes. If these are newly received messages, then something is probably wrong with your database. If they're old messages, you might just need to flush the cache tables and reload them with dbmail-util. I've been thinking about adding a flag that does this, rather than a manual flush + automated reload. I'm sure they're newly received (they have to be, don't they? dbmail doesn't have any ability to retroactively apply sieve filters to existing messages, does it?). This is dbmail 2.2.5, with libsieve 2.2.5. I don't have a copy of my sieve script as it was before I changed it to diff against, but I can provide a copy of the current one and point out the places that changed if desired. It all looks correct
Re: [Dbmail] sieve script error message
It already syntax checks. My script is syntactically correct .. but apparently runtime errors can still exist. Aaron, curious, what all would those be? Something like a comparator or regex should be able to syntax check at insertion point, and any garbage fed to it at runtime should be handled as a non-match, not an error. Or is that just it... it simply needs to change that latter behavior? On Mon, 2007-06-25 at 22:45 +0300, Aleksander wrote: How about adding a --check option to dbmail-sievecmd for starters, so one could simply check the script for syntax errors without inserting it etc. It's not a perfect solution for web stuff (you described exactly what we're doing), but it's a start. A dbmail/sieve module for PHP and others would be cool too. -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] sieve script error message
On Mon, 2007-06-25 at 15:02 -0600, Jesse Norell wrote: If you ever get around to doing a vendor extension, put handling of it in there (ie. within the sieve script I can specify how to handle messages with an error - file em to examine, discard, etc.) For that matter, would this be something the general sieve community might use? As you (Aaron) are now on their working group or whatever it is you've been doing there, maybe iron out a logical how to handle syntax and runtime errors syntax and propose it as an extension? -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
[Dbmail] sieve script error message
Hello, I apparently just deleted the error email I wanted to ask about, but I'll provide another if I get one soon. Anyways, after making a few changes to my sieve filters yesterday, I've now gotten 3 instances of an error report email showing up in my INBOX from the sieve system. It has a diagnostic message (eg. something like next atom expecting ':' or along those lines), but there are no line numbers or context from the email, so I have no idea where I should be looking for the problem. Also, usually when I've made a mistake in a sieve script, dbmail-sievecmd doesn't let me insert it. Even yesterday when I made changes I had to fix a couple things before I could insert it ... and when it let me, I assumed it was syntactically valid. Maybe it is... can there be effectively a run time error in a sieve script? Anyways, if better checking could be done at insert time, that'd definitely be a good thing. As to this email itself, I think the header cache stuff isn't done right. I can view message source and see a few headers, but in my email client (evolution, using imap), it showed no sender, subject or date ... which I think probably all comes from the header cache? This is dbmail 2.2.5, with libsieve 2.2.5. I don't have a copy of my sieve script as it was before I changed it to diff against, but I can provide a copy of the current one and point out the places that changed if desired. It all looks correct, and indeed passes the parser at insert time. I'll also try to turn up debugging for sieve to get some useful logs. -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] compressing header info
On Fri, 2007-06-22 at 02:56 +0200, Michael Monnerie wrote: I have to ask again, because the number of physmessages and messages differs greatly on our server: On Mittwoch, 20. Juni 2007 Michael Monnerie wrote: No. It's a known bug there are some checks missing from the maintenance code. OK, should I select * from dbmail_physmessage p left join dbmail_messages m on (p.id=m.physmessage_id) where m.message_idnr IS NULL; to find out phymessages that have no message id? Then I could delete them using delete from dbmail_physmessage p left join dbmail_messages m on (p.id=m.physmessage_id) where m.message_idnr IS NULL; Is this correct? Check http://www.dbmail.org/mantis/view.php?id=305 for I think 4 different possible queries to address this. I'm not an sql wizard myself, so I'll not address whether yours is correct or not (I don't know offhand). -- Jesse Norell Kentec Communications, Inc. [EMAIL PROTECTED] ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] dbmail-util extension, was: Just a question
And if anyone is into dbmail-util, lets not forget bug id 305 .. I think it's managed to slip by unaddressed for well over a full year now (acknowledged, high priority and several sql solutions listed in the report). On Fri, 2007-06-01 at 23:30 +0200, Michael Monnerie wrote: On Freitag, 1. Juni 2007 Aaron Stone wrote: It might actually be useful to add another flag to dbmail-util to do this for you -- a sort of 'rebuild everything from scratch' option. I also found these things should be done in dbmail-util: 1) dbmail_aliases: when you have an entry alias1 - 1000 (i.e. the userid 1000) and then you delete the user with userid 1000, you have a stale entry that should be removed. The bad thing is that the design of that table is broken, as you can't guarantee that the number refers to an existing user. OTOH, I don't know how to do it better, other than introducing another table dbmail_external_aliases just for text entries, and changing the existing dbmail_aliases to having only user_idnr. So at least dbmail-util should clean up the mess here. To see which aliases are stale: select * from dbmail_aliases left join dbmail_users on (deliver_to=user_idnr) where deliver_to not like '[EMAIL PROTECTED]' and userid is null order by deliver_to; 2) dbmail_aliases: check for loops that can happen when userid's (=login names) are changed: alias - deliver_to - userid and that userid equals alias. I've had this after renaming logins from cyrus users that were user.dom.ain to [EMAIL PROTECTED], and then the old aliases [EMAIL PROTECTED] - user.dom.ain became redundant. To delete those directly: delete from dbmail_aliases where alias in (select a.alias from dbmail_aliases as a left join dbmail_users as b on (a.deliver_to = b.user_idnr) where char_length(a.deliver_to) = 4 and a.alias=b.userid); mfg zmi ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail -- Jesse Norell - [EMAIL PROTECTED] Kentec Communications, Inc. ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] Vacation auto-responder
You must use sieve, and it should just work, though I have no experience with it myself. Try a gui sieve script creator maybe for an example, or search the mailing list. I believe the native auto_replies and auto_notifications stuff is not supported (and should probably be removed). On Thu, 2007-05-31 at 16:24 +0200, Keith Waters wrote: Hi All. Is it me, or is there almost NO documentation available for vacation / out-of-office messages on dbmail? I am runing 2.2.4 and have tried (in vain) for a very long time to get auto-replies to work. I have tried using sieves and dbmail_auto_notifications but cannot get any sign of life out of dbmail. Can anybody out there help me, please?! thanks! Keith -- Jesse Norell - [EMAIL PROTECTED] Kentec Communications, Inc. ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] Here we go again
Someone had that problem not long ago (you might search the mailing list within the last 2 months) - from memory, I think they were using a gui sql manager (mysqladmin maybe?) which was the source of their problem. It was doing something wrong, possibly to do with multi-byte characters?, that ended up dropping their constraints. Although, as you mention it happened again, I wonder if it's you that I was thinking of? :) If so, wasn't your problem some 3rd party program last time? On Thu, 2007-05-31 at 16:58 +0100, Andrea Brancatelli wrote: Nobody changed anything on the DB in the latest week but here we are again: May 31 17:49:34 carota dbmail/smtp[69105]: Error [Cannot delete or update a parent row: a foreign key constraint fails (`dbmail`.`dbmail_datefield`, CONSTRAINT `dbmail_datefield_ibfk_1` FOREIGN KEY (`physmessage_id`) REFERENCES `dbmail_physmessage` (`id`))] [DELETE FROM dbmail_physmessage WHERE id = 210430] May 31 17:49:34 carota dbmail/smtp[69105]: Error failed to delete temporary message [260295] May 31 17:49:34 carota dbmail/smtp[69105]: Warning 500 Permanent Failure (null) ^C^M So unless mysql has lost the on delete and on update contraints again (and I doubt but i don't exclude it), there must be some other problem. I'll run the alter table script to replace the constraints again but I'm getting very frustrated by this. Any suggestion? -- Jesse Norell - [EMAIL PROTECTED] Kentec Communications, Inc. ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] DBMail and Sendmail
I think you can also use something like perdition to sort this out. Eg. have perdition listen on port 143, your old pop3 server on port 243 and dbmail-pop3d on port 343, and perdition can be configured to forward the right login domains to the right pop3 server. I think but I've never actually used perdition. On Fri, 2007-05-18 at 12:51 -0600, Leonel Nunez wrote: If I understand the Docs , DBMail acts like another POP type service on behalf of user to retrive mail and put it in Database and then User can access DB mail with DBMail's POP/IMAP server. Is this correct? yes that's why if you need to access your pop3/imap for the dbmail users and your current email system you need to use different IP addresses or different ports. -- Jesse Norell - [EMAIL PROTECTED] Kentec Communications, Inc. ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] 2.2.2 slow
There have been some changes to improve speed since 2.2.2 though, haven't there? From irc conversation, another pertinent question is, is 2.2 svn stable right now? I know there were a run of issues a week or two back, but have the major issues cleared? If so, Eric could probably try latest svn and report back on speed differences. Jesse On Wed, 2007-04-04 at 20:33 +, Aaron Stone wrote: That's not DBMail being slow, it's your database. Run top during message delivery and you'll see who's eating the cpu. Most likely you need to vacuum/optimize/analyze your tables. dbmail-util -c will do this for you. Aaron On Wed, Apr 4, 2007, Eric Hiller [EMAIL PROTECTED] said: I have been running 2.2.2 and it has been very stable. Ran it as soon as it came out and it worked on a test machine. Only thing is it is MUCH slower than 2.0.10. Any mail request and the sql server cpu is pegged at 100% for 2+ seconds. Is this issue resolved, or will it be in 2.2.5? Thanks much for dbmail it really has been great, Eric -- Jesse Norell - [EMAIL PROTECTED] Kentec Communications, Inc. ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] Sieve scripts: current year and month
Or I'd guess just upload a new sieve script every month / year / insert frequency here, which of course could be a scripted task. On Mon, 2007-03-26 at 19:41 +0200, Guido A.J. Stevens wrote: I want to put incoming messages into folders, based on current year and month You can do that with a procmail delivery. :0 c * ^From:[EMAIL PROTECTED] { YEARFOLDER=Archive/foo-bar-`date +%Y` :0: archive | /usr/sbin/dbmail-smtp -u yourusername -m $YEARFOLDER } YMMV. -- Jesse Norell - [EMAIL PROTECTED] Kentec Communications, Inc. ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] duplicate messages problem with outlook
2.2.2 has a known imap bug .. I don't remember the details, or if you may be affected by that. You might try the latest svn or check when 2.2.5 is out. My only other thought offhand is does she have any sieve filtering scripts? I don't know if those are even in effect for imap APPEND (I doubt it), but if they are, you potentially could have unexpected behavior there. On Thu, 2007-03-22 at 18:03 +0200, Aleksander wrote: Hi, I have a problem which might be related to dbmail. Might be Outlook only. Only one user has this very peculiar bug, although others use exactly the same software. I haven't seen it in action myself, only the results. So the explanation might be a bit vague. I'm hoping someone else has seen this and has more info. Every morning she gets spam to her Inbox, so she moves it to another IMAP folder called spam on the same IMAP account for relearning. When that happens, the moved messages in the Inbox folder are displayed as deleted (strike through) by Outlook. That's Outlook behavior. Now she presses the Purge button and what happens instead of the strike through messages disappearing is that they multiply and are not marked as deleted anymore. So instead of the message(s) disappearing you get lots duplicates. The number of duplicates varies, sometimes two sometimes more. And the worst part is this does not happen always. For example today she didn't have that problem, the day before she had. I'm still at dbmail version 2.2.2. The Outlook client is version 2000 SP-3 9.0.0.6627. And I know Outlook is the worst for IMAP, but I can't change that now. I have to admit that the mail/IMAP server is under heavy load, swaps a lot. I'm currently searching for more RAM. I can't reproduce it, haven't even seen this live. As far as I know only this one user is affected. Ideas? Thanks for reading, Alex ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail -- Jesse Norell - [EMAIL PROTECTED] Kentec Communications, Inc. ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
Re: [Dbmail] Odd problem
] serverchild.c,select_and_accept(+223): waiting for connection ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail -- Jesse Norell - [EMAIL PROTECTED] Kentec Communications, Inc. ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
[Dbmail] website issues
For whomever wants to look at it, - Both the archive links for the mailing lists return errors. - The link to the dbmail list archive at Nabble takes you to a Jan 04 entrypoint, not the top of the list. I think it should link to http://www.nabble.com/dbmail-users-f17485.html - WebSVN seems to be broken. I'm pretty sure I used to be able to view file contents from there, and can not now, though to be certain I'm not that familiar with using it, so it may just be me. I click on links that I think should show file contents, or differences in file revisions, etc. and nothing actually displays. Thanks... -- Jesse Norell - [EMAIL PROTECTED] Kentec Communications, Inc. ___ DBmail mailing list DBmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail