Here's an email from a non qmailtoaster-list correspondence where I/we were checking this very thing (it seems user and domain alias' work):

<begin email>

I'm trying to get around patching, but if my experiments don't work that's the only option.

So, if you use an alias domain doesn't it have to be registered with a registrar?

So here's what I've done so far which allows for a user alias, and an alias domain:

 # /home/vpopmail/bin/valias -i t...@testdomain.de testal...@testdomain.de
 # /home/vpopmail/bin/valias -i t...@testdomain.de t...@testaliasdomain.de

# echo "select * from valias" | mysql -u root -p vpopmail
Enter password:
alias  domain  valias_line
testalias   testdomain.de t...@testdomain.de
test   testaliasdomain.de t...@testdomain.de

# passdb query to retrieve the password. It can return fields:
password_query = SELECT CONCAT( pw_name ,'@', pw_domain ) AS user, \
  pw_passwd AS password, \
  pw_dir as userdb_home, \
  89 AS userdb_uid, \
  89 AS userdb_gid \
  FROM vpopmail vp \
  LEFT JOIN valias va ON concat(vp.pw_name,'@',vp.pw_domain) = va.valias_line \   WHERE (( va.alias = '%n' ) AND ( va.domain = '%d' )) OR (( vp.pw_name = '%n' ) AND ( vp.pw_domain = '%d' )) \
  LIMIT 1

# doveadm auth test t...@testdomain.de xxx
passdb: t...@testdomain.de auth succeeded
extra fields:
user=t...@testdomain.de

# doveadm auth test testal...@testdomain.de xxx
passdb: testal...@testdomain.de auth succeeded
extra fields:
user=t...@testdomain.de

original_user=testal...@testdomain.de
# doveadm auth test t...@testaliasdomain.de xxx
passdb: t...@testaliasdomain.de auth succeeded
extra fields:
user=t...@testdomain.de

original_user=t...@testaliasdomain.de

<end email>

On 5/2/2022 4:26 PM, AAL wrote:
Hello all

I don't know if this topic was posted before, let me refresh it. Just to share with the list.

Dovecot with many-domains option uses sql driver as Eric  warned on point 2 of QMT install. And that driver doesn't support authentication of alias domains by itself.

I mean, if you have q...@maindomain.com and   define an alias domain for  maindomain.com,  Dovecot will not authenticate q...@aliasdomain.com

I've found some workarounds  to manipulate /etc/dovecot/dovecot-sql.conf.ext  and/or patching vpopmail  in https://notes.sagredo.eu/en/qmail-notes-185/dovecot-vpopmail-auth-driver-removal-migrating-to-the-sql-driver-241.html

Meanwhile I am redefining a few alias domains as main ones in order to keep authentication flowing.

best,

-- Abel


---------------------------------------------------------------------
To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com
For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com
For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com

Reply via email to