Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Qmail: users

virtualdomains and -owner problem

 

 

Qmail users RSS feed   Index | Next | Previous | View Threaded


lists-qmail at maexotic

Mar 5, 2008, 12:09 PM

Post #1 of 3 (466 views)
Permalink
virtualdomains and -owner problem

Hoi,

in all the years I use qmail I ran into a problem today (looks like I
tried to use .qmail-name-owner for the first time with virtualdomains).

I created a .qmail-joe and a .qmail-joe-owner for a virtual domain
"example.com". However the resulting NEWSENDER has been
example.com-joe-owner [at] example
instead of (correctly IMHO)
joe-owner [at] example

Looking at the code in qmail-local.c I noticed that in constructing
the NEWSENDER the "LOCAL" was used instead of (IMHO correctly) EXT.
Changing the two occurences of
if (!stralloc_copys(&ueo,local)) temp_nomem();
to
if (!stralloc_copys(&ueo,ext)) temp_nomem();
fixed the problem.

Has anyone else seen this? Found nothing searching the web. Is anyone
seeing a problem with the change?

\Maex


kyle-qmail at memoryhole

Mar 5, 2008, 3:03 PM

Post #2 of 3 (416 views)
Permalink
Re: virtualdomains and -owner problem [In reply to]

On Wednesday, March 5 at 09:09 PM, quoth Markus Stumpf:
>I created a .qmail-joe and a .qmail-joe-owner for a virtual domain
>"example.com". However the resulting NEWSENDER has been
> example.com-joe-owner [at] example
>instead of (correctly IMHO)
> joe-owner [at] example
>
>Looking at the code in qmail-local.c I noticed that in constructing
>the NEWSENDER the "LOCAL" was used instead of (IMHO correctly) EXT.
>Changing the two occurences of
> if (!stralloc_copys(&ueo,local)) temp_nomem();
>to
> if (!stralloc_copys(&ueo,ext)) temp_nomem();
>fixed the problem.

EXT is only (somewhat) correct in a virtualdomain setting. For
example, if a system user (e.g. joe) creates a ~joe/.qmail file to
forward email, what should NEWSENDER be? EXT is empty! If a system
user creates a ~joe/.qmail-owner file, with your change NEWSENDER will
be owner [at] example, which doesn't seem quite right.

If I remember correctly, qmail uses that information to detect mail
loops. If we start stripping the virtualdomain stuff off, is there a
way to create a situation that is not a mail loop but that will be
detected as a mail loop? I'm not sure, I'd have to think about it.

~Kyle
--
To invent, you need a good imagination and a pile of junk.
-- Thomas Jefferson


lists-qmail at maexotic

Mar 5, 2008, 8:31 PM

Post #3 of 3 (409 views)
Permalink
Re: virtualdomains and -owner problem [In reply to]

On Wed, Mar 05, 2008 at 05:03:37PM -0600, Kyle Wheeler wrote:
> EXT is only (somewhat) correct in a virtualdomain setting. For
> example, if a system user (e.g. joe) creates a ~joe/.qmail file to
> forward email, what should NEWSENDER be? EXT is empty! If a system
> user creates a ~joe/.qmail-owner file, with your change NEWSENDER will
> be owner [at] example, which doesn't seem quite right.

Missed that.
Made a ~alias/.qmail-testme file with "|env > /tmp/testme" and found
LOCAL == EXT == "testme" and thought it was ok, but with ~/.qmail-testme
I got LOCAL == "maex-testme" and EXT = "testme".
I'll have to look at this in more detail and probably some more tests
are necessary in the code to decide whether to use "local" or "ext" :(

> If I remember correctly, qmail uses that information to detect mail
> loops. If we start stripping the virtualdomain stuff off, is there a
> way to create a situation that is not a mail loop but that will be
> detected as a mail loop? I'm not sure, I'd have to think about it.

This shouldn't be a problem. Mail loops are detected by Delivered-To
lines (i.e. the recipient) and the modification is only relevant for
setting the NEWSENDER in case that there is a -owner or -owner-default file.

To be sure we're not misunderstanding each other:
qmail has a "feature" that if there is a e.g. .qmail-list and there is
also a .qmail-list-owner qmail will rewrite the sender of outgoing
messages - due to forwards in .qmail-list - to list-owner instead of the
original sender. This is useful for "poor man's mailing lists" to
catch bounces that would otherwise go to the original sender (see
"man dot-qmail"). AFAICS this is broken for virtualdomains.
ezmlm has a workaorund for this with the inlocal configuration file
(as there is no -default in my situation, using ezmlm's DEFAULT hack
is not possible).

\Maex

Qmail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.