[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: aliases default dotqmail



Hello Adam,

To add multiple recipients in one alias, you should enter them _exactly_ as you would do so with a .qmail: i 'cut-and-paste' them usually, but you can also use '\n' as delimiter. Placing a .qmail-file in a homedir won't work: if qmail-sql finds a matching
'login-extension@virtual_host' in the database, it will use that one.

I hope this helps.
Michael Devogelaere

--

Michael Devogelaere.
Linux Consultant at Mind NV.
+32 (0)473 939352
michael@xxxxxxx

============================
Mind Linux Solutions
Vaartkom 11
3000 Leuven
Belgium
tel: +32 (0)16 309 666
fax:+32 (0) 16 309 644
http://mind.be
============================




Hello,

I am moving from sendmail to qmail.  I would really like to see
everything kept in the database, but it appears that large alias lists
cannot be kept within SQL.  For example, this is what I have
currently:

	select * from dotqmails;
	+-------+----------------------+-----------+-----------------------------+
	| login | virtual_host         | extension | dotqmail                    |
	+-------+----------------------+-----------+-----------------------------+
	| alias | bogus.marinar.com    | default   | &ahank@xxxxxxxxxxxxxxxxx    |
	| alias | volatile.marinar.com | default   | &ahank@xxxxxxxxxxxxxxxxxxxx |
	+-------+----------------------+-----------+-----------------------------+

	select login,uid,gid,home,virtual_host from passwd;
	+-------+-----+-----+----------------------------------------------+----------------------+
	| login | uid | gid | home                                         | virtual_host         |
	+-------+-----+-----+----------------------------------------------+----------------------+
	| alias | 516 | 516 | /home/virtualmail/volatile.marinar.com       | volatile.marinar.com |
	| ahank | 516 | 516 | /home/virtualmail/volatile.marinar.com/ahank | volatile.marinar.com |
	| ahank | 516 | 516 | /home/virtualmail/bogus.marinar.com/ahank    | bogus.marinar.com    |
	| alias | 516 | 516 | /home/virtualmail/bogus.marinar.com          | bogus.marinar.com    |
	+-------+-----+-----+----------------------------------------------+----------------------+

With this configuration, everything works as expected.  I can mail
these two users, and if the user is unknown at a domain, mail is
forwarded to the respective default user.  However, if I put a
'.qmail-everyone' file under 'bogus.marinar.com/', containing the two
users from different domains on separate lines, the mail will only be
delivered to the first user listed when mail is
sent to 'everyone@xxxxxxxxxxxxxxxxx'.  It seems like if there is a
default entry in dotqmails, then all .qmail files will be ignored in
the home directory.

I hope that I don't have to create separate 'alias' users for each of
my virtual domains.  Is there any way to use use alias lists within SQL
itself?  I attempted to add something like this to dotqmails:

	select * from dotqmails;
	+-------+----------------------+-----------+-----------------------------+
	| login | virtual_host         | extension | dotqmail                    |
	+-------+----------------------+-----------+-----------------------------+
	| alias | bogus.marinar.com    | default   | &ahank@xxxxxxxxxxxxxxxxx    |
	| alias | bogus.marinar.com    | everyone  | &ahank@xxxxxxxxxxxxxxxxxxxx |
	| alias | bogus.marinar.com    | everyone  | &ahank@xxxxxxxxxxxxxxxxx    |
	| alias | volatile.marinar.com | default   | &ahank@xxxxxxxxxxxxxxxxxxxx |
	+-------+----------------------+-----------+-----------------------------+

But dotqmail isn't a primary key.  Or even this:

	select * from dotqmails;
	+-------+----------------------+-----------+-----------------------------+
	| login | virtual_host         | extension | dotqmail                    |
	+-------+----------------------+-----------+-----------------------------+
	| alias | bogus.marinar.com    | default   | &ahank@xxxxxxxxxxxxxxxxx    |
	| alias | bogus.marinar.com    | everyone  |
                          &ahank@xxxxxxxxxxxxxxxxxxxx, &ahank@xxxxxxxxxxxxxxxxx |
	| alias | volatile.marinar.com | default   | &ahank@xxxxxxxxxxxxxxxxxxxx |
	+-------+----------------------+-----------+-----------------------------+

But I'm not sure how the patch handles this, but it doesn't work.  Is
my delimiter wrong?

When I remove the default alias entries from dotqmails, and add the
same .qmail files to the domain's home directory, everything works as
expected:  Delivering mail to 'everyone' mails all mentioned users, and
delivering mail to 'noneexistentaccount', delivers to the user I
established in '.qmail-default'.

So, I can get this to work, but it doesn't appear that dotqmails
offers the flexibility I need.  I could install the forward patch for
qmail, but I would prefer to handle everything inside of SQL.

I would be greatly pleased to hear anyone's experience doing what I'm
trying to do.  Thank you for your time reading this long post.

Hank