mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-25 17:06:01 +03:00
[GH-ISSUE #711] SQL prepare failed: near "(": Error with generated sql-aliases.cf file #659
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#659
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @iyobo on GitHub (Apr 13, 2015).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/711
When I try to use webmail I get the error:
Error: command: LOGIN => socket error: EOF
Looking at my logs, I see this continously:
Apr 13 17:42:28 mail postfix/pickup[2261]: ECB5F2166E: uid=0 from=
Apr 13 17:42:28 mail postfix/cleanup[2619]: fatal: dict_sqlite_lookup: /servers/mail/mapfiles/sql-aliases.cf: SQL prepare failed: near "(": syntax error?
Apr 13 17:42:29 mail postfix/pickup[2261]: warning: maildrop/85FD22146D: error writing ECB5F2166E: queue file write error
Apr 13 17:42:29 mail postfix/master[2256]: warning: process /usr/lib/postfix/cleanup pid 2619 exit status 1
Apr 13 17:42:29 mail postfix/master[2256]: warning: /usr/lib/postfix/cleanup: bad command startup -- throttling
I've never been quite able to get this to work. Any tips?
@iyobo commented on GitHub (Apr 13, 2015):
This is the query given to the query field in that generated file by modoboa-django.py postfix_maps ...
Nothing changed. Spaced out for more legibility.
(
SELECT (mb.address || '@' || dom.name)
FROM admin_mailbox mb
INNER JOIN admin_domain dom ON mb.domain_id=dom.id
WHERE mb.id IN (
SELECT al_mb.mailbox_id
FROM admin_alias_mboxes al_mb
INNER JOIN admin_alias al ON al_mb.alias_id=al.id
INNER JOIN admin_domain dom ON al.domain_id=dom.id
WHERE dom.name='%d'
AND dom.enabled=1
AND al.address='%u'
AND al.enabled=1
)
)
UNION (
SELECT (al.address || '@' || dom.name)
FROM admin_alias al INNER JOIN admin_domain dom ON al.domain_id=dom.id
WHERE al.id IN (
SELECT al_al.to_alias_id
FROM admin_alias_aliases al_al
INNER JOIN admin_alias al ON al_al.from_alias_id=al.id
INNER JOIN admin_domain dom ON al.domain_id=dom.id
WHERE dom.name='%d' AND dom.enabled=1 AND al.address='%u' AND al.enabled=1
)
)
UNION (
SELECT al.extmboxes
FROM admin_alias al
INNER JOIN admin_domain dom ON al.domain_id=dom.id
WHERE dom.name='%d' AND dom.enabled=1 AND al.address='%u' AND al.enabled=1 AND al.extmboxes<>''
)
@iyobo commented on GitHub (Apr 13, 2015):
While we're at it, would it be a terrible thing to just use that VM provided for 1.2.1 as a production mail server?
I was thinking how easy it would be to just use it as an ISO.
This is my first time setting up a linux mail server manually and I never knew it was so detailed!
@vingeni commented on GitHub (Apr 14, 2015):
Hello,
try this request, without the start/end parenthesis :
query = SELECT (mb.address || '@' || dom.name) FROM admin_mailbox mb
INNER JOIN admin_domain dom ON mb.domain_id=dom.id WHERE mb.id IN
(SELECT al_mb.mailbox_id FROM admin_alias_mboxes al_mb INNER JOIN
admin_alias al ON al_mb.alias_id=al.id INNER JOIN admin_domain dom ON
al.domain_id=dom.id WHERE dom.name='%d' AND dom.enabled=1 AND
al.address='%u' AND al.enabled=1) UNION SELECT (al.address || '@' ||
dom.name) FROM admin_alias al INNER JOIN admin_domain dom ON
al.domain_id=dom.id WHERE al.id IN (SELECT al_al.to_alias_id FROM
admin_alias_aliases al_al INNER JOIN admin_alias al ON
al_al.from_alias_id=al.id INNER JOIN admin_domain dom ON
al.domain_id=dom.id WHERE dom.name='%d' AND dom.enabled=1 AND
al.address='%u' AND al.enabled=1) UNION SELECT al.extmboxes FROM
admin_alias al INNER JOIN admin_domain dom ON al.domain_id=dom.id WHERE
dom.name='%d' AND dom.enabled=1 AND al.address='%u' AND al.enabled=1 AND
al.extmboxes<>'';
vincent.
Le 13/04/2015 19:55, Iyobo Eki a écrit :
@tonioo commented on GitHub (Apr 30, 2015):
@buffonomics Hi, have you tried the proposed solution ?
@tonioo commented on GitHub (Jun 11, 2015):
This issue was moved to modoboa/modoboa-admin#24
@bernd-wechner commented on GitHub (Dec 30, 2022):
Hmmm, am getting this on webmail too, but see no clue in logs and wondering where "modoboa/modoboa-admin#24" is?