[Dovecot] Dovecot 2.2.4/sendmail with sql user and aliases

Cedric cedrict at derytelecom.ca
Tue Jul 23 14:51:32 EEST 2013


Hi,

Thank you,it fixed the issue i had.

Regards
Cedric




Le 2013-07-23 03:49, Axel Luttgens a écrit :
> Le 23 juil. 2013 à 02:41, Cedric a écrit :
>
>> Hi,
>>
>> Ok thank for the interpretation, we used sendmail the last 16 years and I'm trying to migrate a old linuxconf/imapd setup here.
>> [...]
>> Below i provided two differents sql attempt, your input on how to make dovecot lda understand it should deliver the mail to the correct file are welcome
>> [...]
>> There's a new debug output fixing the domain entry
>>
>> The querry i pasted seem to be wrong for a previous configuration there's the correct one :
>>
>> [...]
>> *************************** 1. row ***************************
>>     user:cedrict at mail.vdl
>> username: cedrict
>>   domain: mail.vdl
>>     home: /vhome/mail.vdl/home/cedrict
>>    index: /vhome/mail.vdl/home/cedrict/mail/index
>> control: /vhome/mail.vdl/home/cedrict/mail/control
>>    inbox: /var/spool/vmail/mail.vdl/cedrict
>>   layout: maildir++
>>      uid: 60001
>>      gid: 231
>>
>> [...]
>> *************************** 1. row ***************************
>> user:cedrict at mail.vdl
>> inbox: /var/spool/vmail/mail.vdl/cedrict
>> home: /vhome/mail.vdl/home/cedrict
>>   uid: 60001
>>   gid: 231
>> 1 row in set (0,54 sec)
>>
>> [...]
> Hello Cédric,
>
> In both cases, your queries provide sufficient info for overriding or for providing a full substitute to mail_home (left empty in your dovecot.conf), but fail to do the same for mail_location.
>
> Perhaps could you try something like this:
>
> 	SELECT
> 		concat(
> 			s_courriel_utilisateur.utilisateur,
> 			'@',
> 			s_courriel_domaine.nom
> 		) AS user,
> 		concat(
> 			'mbox:~/mail:LAYOUT=maildir++:INDEX=MEMORY:CONTROL=~/mail/control:INBOX=/var/spool/vmail/',
> 			s_courriel_domaine.nom,
> 			'/',
> 			s_courriel_utilisateur.utilisateur
> 		) AS mail,
> 		concat(
> 			"/vhome/",
> 			s_courriel_domaine.nom,
> 			"/home/",
> 			s_courriel_utilisateur.utilisateur
> 		) AS home,
> 		s_courriel_utilisateur.uid AS uid,
> 		s_courriel_domaine.gid AS gid
> 	FROM
> 		[...]
>
> Not sure whether you still need the "AS user" part, but it should not hurt with such a query.
>
> More info at:
>
> 	http://wiki2.dovecot.org/UserDatabase
> 	http://wiki2.dovecot.org/AuthDatabase/SQL
>
> HTH,
> Axel




More information about the dovecot mailing list