Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A SQLite backend would be awsome #1

Closed
ebrahim opened this issue Aug 15, 2010 · 11 comments
Closed

A SQLite backend would be awsome #1

ebrahim opened this issue Aug 15, 2010 · 11 comments

Comments

@ebrahim
Copy link

ebrahim commented Aug 15, 2010

Title says it all. :)

@evgeni
Copy link
Owner

evgeni commented Aug 15, 2010

actually i wanted to support real databases only, but I started working on a sqlite backend just for you :)

@ebrahim
Copy link
Author

ebrahim commented Aug 15, 2010

It is always good to have a low profile, low administration choice for lower traffic servers.
BTW SQLite is almost a real standards compliant RDBMS, just not a client/server one. ;-)

@evgeni
Copy link
Owner

evgeni commented Aug 15, 2010

I know, I still wonder how good SQLite would perform with table sizes > 1.000.000 rows :)

Anyways, I've just pushed some very basic sqlite support to the sqlite-support banch, mind testing it?

@ebrahim
Copy link
Author

ebrahim commented Aug 15, 2010

I tested it, but it seems it is not working. I tested with MySQL and everything worked. But with SQLite3 it seems it is not inserting anything into database. Because when I open the file with sqlite3 CLI tool, there is no row in bley_status. On the other hand it always greylists my addresses and never releases them, which matches with the other observation. When I manually inserted a row in bley_status, Postfix no more responded after RCPT TO. This is the log, which says little about it (I've set periods to a few minutes, and tested it with MySQL, which worked):

Aug 15 22:45:10 gholam postfix/smtpd[27014]: connect from localhost[127.0.0.1]
Aug 15 22:45:23 gholam postfix/smtpd[27014]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 450 4.7.1 : Recipient address rejected: greylisted, try again later; from= to= proto=ESMTP helo=
Aug 15 22:46:05 gholam postfix/smtpd[27014]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 450 4.7.1 : Recipient address rejected: greylisted, try again later (cached result); from= to= proto=ESMTP helo=
Aug 15 22:47:13 gholam postfix/smtpd[27014]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 450 4.7.1 : Recipient address rejected: greylisted, try again later; from= to= proto=ESMTP helo=
Aug 15 22:48:45 gholam postfix/smtpd[27014]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 450 4.7.1 : Recipient address rejected: greylisted, try again later; from= to= proto=ESMTP helo=
Aug 15 22:51:30 gholam postfix/smtpd[27014]: warning: problem talking to server 127.0.0.1:1337: Connection timed out

@evgeni
Copy link
Owner

evgeni commented Aug 16, 2010

Yeah... My fault :)
SQLite does not support NOW(), please retry current sqlite-support HEAD:

commit 3d3e060
Author: Evgeni Golov sargentd@die-welt.net
Date: Mon Aug 16 10:29:50 2010 +0200

use CURRENT_TIMESTAMP instead of NOW()

@ebrahim
Copy link
Author

ebrahim commented Aug 16, 2010

Still not working. BTW I couldn't find any CURRENT_TIMESTAMP in your code.

@evgeni
Copy link
Owner

evgeni commented Aug 16, 2010

Ew, I should actually push from my local repo :)
Onine now: http://github.com/evgeni/bley/commit/3d3e0601c7f6ab0672276d4dbc8a38759f01a0f9

@ebrahim
Copy link
Author

ebrahim commented Aug 16, 2010

It now inserts into SQLite3 DB the first time. But for entries that already exist in database it makes Postfix freeze after RCPT TO for a long time and then return this error:

mail from: ebrahim
250 2.1.0 Ok
rcpt to: ebrahim
[long delay here]
451 4.3.5 Server configuration problem

@evgeni
Copy link
Owner

evgeni commented Aug 16, 2010

Okay, another fix commited.
Please retry :)

(sorry for you being my sqlite guinea pig ;))

@ebrahim
Copy link
Author

ebrahim commented Aug 16, 2010

Seems to work... finally! :)
Good job.

@evgeni
Copy link
Owner

evgeni commented Aug 16, 2010

Great, thanks for testing!

I'll close here then, please open a new issue when you find any bugs :)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants