1 (edited by misieq 2014-01-26 09:44:39)

Topic: Multiple servers and LMTP configuration

==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
======== Required information ====
- iRedMail version: 0.8.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Linux/BSD distribution name and version: CentOS 6.5
- Related log if you're reporting an issue:
====

I want to use configuration with two MXservers and one storage node. For this test I've chosen mysql backend.
I've configured LMTP (in transport_maps) and servers are talking to each other, unless I have some problem with SQL structure.
On MX I can see in maillog:

to=<user@domain.ltd>, relay=10.10.10.10[10.10.10.10]:24, delay=569, delays=568/0.03/0/0.04, dsn=4.3.0, status=deferred (host 10.10.10.10[10.10.10.10] said: 451 4.3.0 <user@domain.ltd> Internal error occurred. Refer to server log for more information. (in reply to RCPT TO command))
 

In dovecot.log on storage server I can see:

Jan 26 02:14:18 auth-worker: Info: mysql(127.0.0.1): Connected to database vmail
Jan 26 02:14:18 auth-worker: Error: mysql: Query failed, retrying: Unknown column 'mailbox.enablelmtp' in 'where clause'
Jan 26 02:14:18 auth-worker: Error: sql(user@domain.ltd,10.10.10.10): User query failed: Unknown column 'mailbox.enablelmtp' in 'where clause'
Jan 26 02:14:18 lmtp(4785): Error: user user@domain.ltd: Auth USER lookup failed

I cannot see column enablelmtp in the database.


I have tested similar configuration with LDAP (AD) and it worked fine.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Multiple servers and LMTP configuration

You can simply create this column to solve this issue. Just like existing one: mailbox.enablesmtp.

3

Re: Multiple servers and LMTP configuration

ZhangHuangbin wrote:

You can simply create this column to solve this issue. Just like existing one: mailbox.enablesmtp.

Ok,
I'll try that :-)
Can you explain one more thing to me ?
I guess it has to do something with /etc/dovecot/dovecot-mysql.conf file and below query:

user_query = SELECT \
    '%u' AS master_user, \
    CONCAT(mailbox.storagebasedirectory, '/', mailbox.storagenode, '/', mailbox.maildir) AS home, \
    CONCAT('*:bytes=', mailbox.quota*1048576) AS quota_rule \
FROM mailbox,domain \
WHERE mailbox.username='%u' \
    AND mailbox.domain='%d' \
    AND mailbox.`enable%Ls%Lc`=1 \
    AND mailbox.domain=domain.domain \
    AND domain.backupmx=0 \
    AND domain.active=1 \
    AND mailbox.active=1

Unluckilly I have no idea what enable%Ls%Lc`=1 stands for.

4

Re: Multiple servers and LMTP configuration

Reference: http://wiki2.dovecot.org/Variables

%s -> service name. e.g. smtp, lmtp.
%c -> 'secured'.

So, for example, service smtps will be 'enablesmtpsecured'. "L" in '%Ls' is used to convert service name to lower cases.