Virtual user alias in a virtual domain?

This is a discussion on Virtual user alias in a virtual domain? within the alt.comp.mail.qmail forums, part of the Mail Servers and Related category; Hi all, Having a struggle with qmail, basically I've inherited a server hosting e-mail for a bunch of ...


Go Back   Usenet Forums > Mail Servers and Related > alt.comp.mail.qmail

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-19-2004
Jonathan Thorpe
 
Posts: n/a
Default Virtual user alias in a virtual domain?

Hi all,

Having a struggle with qmail, basically I've inherited a server hosting
e-mail for a bunch of domains and one of the customers wants a
financial@theirdomain.com e-mail address to go to several different people
in their finance department. Sounds easy enough and indeed it is on my other
servers running Exim but I just can't get it working with qmail. Any
suggestions?

My domains are all listed in control/virtualdomains and control/rcpthosts
and none of the domain users have a system local account, all of their
mailboxes are held in qmail/mailnames/theirdomain.com/username.

I've tried setting up .qmail files in the alias folder but I don't think I'm
understanding how these work properly with virtual domains because I'm
getting nothing from it. I've compiled and installed fastforward-0.51 and
the manual tests with "env DEFAULT=financial HOST=theirdomain.com
fastforward -nd /etc/aliases.cdb" gives me the correct result and expands
the financial address to the correct domain users but if I send a test
e-mail I get a bounce message saying "<financial@theirdomain.com>: Address
unknown for theirdomain.com" from qmail. It seems that it isn't processing
the alias list with fastforward before it rejects the message because
'financial' isn't a real user within their domains.

I'm so confused with this stuff, if I read the "Life with qmail" docs
anymore I'll go mad, I'm sure it can all be done, and probably with .qmail
files too but I just either can't work out how to name them or where to put
them when using multiple domains with virtual users.

Any help appreciated.
Jon.


Reply With Quote
  #2 (permalink)  
Old 08-19-2004
Dave Sill
 
Posts: n/a
Default Re: Virtual user alias in a virtual domain?

"Jonathan Thorpe" <jpt@nsoft.co.uk> writes:

> My domains are all listed in control/virtualdomains and control/rcpthosts
> and none of the domain users have a system local account, all of their
> mailboxes are held in qmail/mailnames/theirdomain.com/username.


What exactly is listed in control/virtualdomains? Better yet, run
qmail-showctl and post the output. How is mail getting delivered to
qmail/mailnames/theirdomain.com/username? Do you have a
qmail/users/assign file? What's in it?

--
Dave Sill Oak Ridge National Lab, Workstation Support
Author, The qmail Handbook <http://web.infoave.net/~dsill>
<http://lifewithqmail.org/>: Almost everything you always wanted to know.
Reply With Quote
  #3 (permalink)  
Old 08-19-2004
Jonathan Thorpe
 
Posts: n/a
Default Re: Virtual user alias in a virtual domain?

"Dave Sill" <MaxFreedom@sws5.ornl.gov> wrote in message
news:wx03c2jcl0i.fsf@sws5.ornl.gov...
> "Jonathan Thorpe" <jpt@nsoft.co.uk> writes:
>
> > My domains are all listed in control/virtualdomains and

control/rcpthosts
> > and none of the domain users have a system local account, all of their
> > mailboxes are held in qmail/mailnames/theirdomain.com/username.

>
> What exactly is listed in control/virtualdomains? Better yet, run
> qmail-showctl and post the output. How is mail getting delivered to
> qmail/mailnames/theirdomain.com/username? Do you have a
> qmail/users/assign file? What's in it?


Hi Dave,

The mail is all POP, I'm assuming it's being delivered to the mailboxes by
qmail-local (although I'm not sure), user authentication is definitely being
done with an assign file which contains the right virtual domain id - user
matches etc.

Below is the output from qmail-showctl - all of listed virtual hosts / users
work perfectly SMTP and POPing their e-mail, just need a virtual alias now.


qmail home directory: /var/qmail.
user-ext delimiter: -.
paternalism (in decimal): 2.
silent concurrency limit: 1000.
subdirectory split: 23.
user ids: 2021, 2020, 2022, 0, 2023, 2520, 2521, 2522.
group ids: 2020, 2520.

badmailfrom: (Default.) Any MAIL FROM is allowed.
bouncefrom: (Default.) Bounce user name is MAILER-DAEMON.
bouncehost: (Default.) Bounce host name is p15150867.pureserver.info.
concurrencylocal: (Default.) Local concurrency is 10.
concurrencyremote: (Default.) Remote concurrency is 20.
databytes: SMTP DATA limit is 0 bytes.
defaultdomain: (Default.) Default domain name is p15150867.pureserver.info.
defaulthost: (Default.) Default host name is p15150867.pureserver.info.
doublebouncehost: (Default.) 2B recipient host: p15150867.pureserver.info.
doublebounceto: (Default.) 2B recipient user: postmaster.
envnoathost: (Default.) Presumed domain name is p15150867.pureserver.info.
helohost: (Default.) SMTP client HELO host name is
p15150867.pureserver.info.
idhost: (Default.) Message-ID host name is p15150867.pureserver.info.
localiphost: (Default.) Local IP address becomes p15150867.pureserver.info.
locals:
Messages for localhost are delivered locally.
me: My name is p15150867.pureserver.info.
percenthack: (Default.) The percent hack is not allowed.
plusdomain: (Default.) Plus domain name is p15150867.pureserver.info.
qmqpservers: (Default.) No QMQP servers.
queuelifetime: (Default.) Message lifetime in the queue is 604800 seconds.

rcpthosts:
SMTP clients may send messages to recipients at nsoftweb.net.
SMTP clients may send messages to recipients at p15150867.pureserver.info.
SMTP clients may send messages to recipients at resourcebankrecruitment.com.
SMTP clients may send messages to recipients at sigma-assoc.co.uk.
SMTP clients may send messages to recipients at lanyonbowdler.co.uk.
SMTP clients may send messages to recipients at lanyonbowdler.com.
SMTP clients may send messages to recipients at communic8international.com.
SMTP clients may send messages to recipients at
resourcebankrecruitment.co.uk.
SMTP clients may send messages to recipients at shropshiremgrover.co.uk.
SMTP clients may send messages to recipients at furrowsmgrover.co.uk.
SMTP clients may send messages to recipients at shropshiremazda.co.uk.
SMTP clients may send messages to recipients at furrowsmazda.co.uk.
SMTP clients may send messages to recipients at shropshireford.co.uk.
SMTP clients may send messages to recipients at furrowsford.co.uk.
SMTP clients may send messages to recipients at adrian-miles.co.uk.
SMTP clients may send messages to recipients at rubberloc.co.uk.
SMTP clients may send messages to recipients at owendavidsafety.net.
SMTP clients may send messages to recipients at manbat.co.uk.
SMTP clients may send messages to recipients at barbers-online.co.uk.
SMTP clients may send messages to recipients at wacemorgan.co.uk.

morercpthosts: (Default.) No effect.
morercpthosts.cdb: (Default.) No effect.
smtpgreeting: (Default.) SMTP greeting: 220 p15150867.pureserver.info.
smtproutes: (Default.) No artificial SMTP routes.
timeoutconnect: (Default.) SMTP client connection timeout is 60 seconds.
timeoutremote: (Default.) SMTP client data timeout is 1200 seconds.
timeoutsmtpd: (Default.) SMTP server data timeout is 1200 seconds.

virtualdomains:
Virtual domain: nsoftweb.net:1
Virtual domain: p15150867.pureserver.info:2
Virtual domain: resourcebankrecruitment.com:3
Virtual domain: sigma-assoc.co.uk:5
Virtual domain: lanyonbowdler.co.uk:6
Virtual domain: lanyonbowdler.com:7
Virtual domain: communic8international.com:8
Virtual domain: resourcebankrecruitment.co.uk:4
Virtual domain: shropshiremgrover.co.uk:10
Virtual domain: furrowsmgrover.co.uk:11
Virtual domain: shropshiremazda.co.uk:12
Virtual domain: furrowsmazda.co.uk:13
Virtual domain: shropshireford.co.uk:14
Virtual domain: furrowsford.co.uk:15
Virtual domain: adrian-miles.co.uk:16
Virtual domain: rubberloc.co.uk:17
Virtual domain: owendavidsafety.net:18
Virtual domain: manbat.co.uk:9
Virtual domain: barbers-online.co.uk:19
Virtual domain: wacemorgan.co.uk:20

servercert.pem: I have no idea what this file does.
clientcert.pem: I have no idea what this file does.


Reply With Quote
  #4 (permalink)  
Old 08-19-2004
Dave Sill
 
Posts: n/a
Default Re: Virtual user alias in a virtual domain?

"Jonathan Thorpe" <jpt@nsoft.co.uk> writes:

> "Dave Sill" <MaxFreedom@sws5.ornl.gov> wrote in message
> news:wx03c2jcl0i.fsf@sws5.ornl.gov...
>> "Jonathan Thorpe" <jpt@nsoft.co.uk> writes:
>>
>> > My domains are all listed in control/virtualdomains and

> control/rcpthosts
>> > and none of the domain users have a system local account, all of their
>> > mailboxes are held in qmail/mailnames/theirdomain.com/username.

>>
>> What exactly is listed in control/virtualdomains? Better yet, run
>> qmail-showctl and post the output. How is mail getting delivered to
>> qmail/mailnames/theirdomain.com/username? Do you have a
>> qmail/users/assign file? What's in it?

>
> The mail is all POP, I'm assuming it's being delivered to the mailboxes by
> qmail-local (although I'm not sure), user authentication is definitely being
> done with an assign file which contains the right virtual domain id - user
> matches etc.


Do you have a /var/qmail/users/assign file? If so, post the contents.

Authentication is not done using the assign file, and isn't relevent
to your problem.

> Below is the output from qmail-showctl - all of listed virtual hosts / users
> work perfectly SMTP and POPing their e-mail, just need a virtual alias now.


OK, that looks good.

--
Dave Sill Oak Ridge National Lab, Workstation Support
Author, The qmail Handbook <http://web.infoave.net/~dsill>
<http://lifewithqmail.org/>: Almost everything you always wanted to know.
Reply With Quote
  #5 (permalink)  
Old 08-20-2004
Jonathan Thorpe
 
Posts: n/a
Default Re: Virtual user alias in a virtual domain?

"Dave Sill" <MaxFreedom@sws5.ornl.gov> wrote in message
news:wx0isbfau8y.fsf@sws5.ornl.gov...
<< SNIP >>
> >> What exactly is listed in control/virtualdomains? Better yet, run
> >> qmail-showctl and post the output. How is mail getting delivered to
> >> qmail/mailnames/theirdomain.com/username? Do you have a
> >> qmail/users/assign file? What's in it?

> >
> > The mail is all POP, I'm assuming it's being delivered to the mailboxes

by
> > qmail-local (although I'm not sure), user authentication is definitely

being
> > done with an assign file which contains the right virtual domain id -

user
> > matches etc.

>
> Do you have a /var/qmail/users/assign file? If so, post the contents.
>


Yep I have an assign file, it's quite large due to the number of individual
POP accounts so I've stripped most of the users from the first two domains.

---> Begin assign file <---
=19-mab:popuser:110:110:/var/qmail/mailnames/barbers-online.co.uk/mab:::
=19-jacqueline.guy:popuser:110:110:/var/qmail/mailnames/barbers-online.co.uk
/j.guy:::
=19-m.taylor:popuser:110:110:/var/qmail/mailnames/barbers-online.co.uk/m.tay
lor:::
+20:popuser:110:110:/var/qmail/mailnames/wacemorgan.co.uk:::
=18-mike.vale:popuser:110:110:/var/qmail/mailnames/owendavidsafety.net/mike.
vale:::
+19:popuser:110:110:/var/qmail/mailnames/barbers-online.co.uk:::
=1-jpt:popuser:110:110:/var/qmail/mailnames/nsoftweb.net/jpt:::
=18-webmaster:popuser:110:110:/var/qmail/mailnames/owendavidsafety.net/webma
ster:::
=18-peter:popuser:110:110:/var/qmail/mailnames/owendavidsafety.net/peter.tal
bot:::
=18-dan.jenkins:popuser:110:110:/var/qmail/mailnames/owendavidsafety.net/dan
..jenkins:::
+18:popuser:110:110:/var/qmail/mailnames/owendavidsafety.net:::
+17:popuser:110:110:/var/qmail/mailnames/rubberloc.co.uk:::
=16-p.webster:popuser:110:110:/var/qmail/mailnames/adrian-miles.co.uk/info::
:
=16-patrick.webster:popuser:110:110:/var/qmail/mailnames/adrian-miles.co.uk/
info:::
=16-patrick:popuser:110:110:/var/qmail/mailnames/adrian-miles.co.uk/info:::
=16-info:popuser:110:110:/var/qmail/mailnames/adrian-miles.co.uk/info:::
+16:popuser:110:110:/var/qmail/mailnames/adrian-miles.co.uk:::
+15:popuser:110:110:/var/qmail/mailnames/furrowsford.co.uk:::
+14:popuser:110:110:/var/qmail/mailnames/shropshireford.co.uk:::
+13:popuser:110:110:/var/qmail/mailnames/furrowsmazda.co.uk:::
+12:popuser:110:110:/var/qmail/mailnames/shropshiremazda.co.uk:::
+11:popuser:110:110:/var/qmail/mailnames/furrowsmgrover.co.uk:::
+10:popuser:110:110:/var/qmail/mailnames/shropshiremgrover.co.uk:::
=9-davemorgan:popuser:110:110:/var/qmail/mailnames/manbat.co.uk/dave.morgan:
::
=9-dave.morgan:popuser:110:110:/var/qmail/mailnames/manbat.co.uk/dave.morgan
:::
=9-markbaker:popuser:110:110:/var/qmail/mailnames/manbat.co.uk/mark.baker:::
=9-mark.baker:popuser:110:110:/var/qmail/mailnames/manbat.co.uk/mark.baker::
:
=9-shefford:popuser:110:110:/var/qmail/mailnames/manbat.co.uk/shefford:::
=9-talk:popuser:110:110:/var/qmail/mailnames/manbat.co.uk/talk:::
=9-preston:popuser:110:110:/var/qmail/mailnames/manbat.co.uk/preston:::
=9-kgw:popuser:110:110:/var/qmail/mailnames/manbat.co.uk/kgw:::
=9-mjp:popuser:110:110:/var/qmail/mailnames/manbat.co.uk/mjp:::
=9-rbp:popuser:110:110:/var/qmail/mailnames/manbat.co.uk/rbp:::
=9-stevesheppard:popuser:110:110:/var/qmail/mailnames/manbat.co.uk/steve.she
ppard:::
=9-s.sheppard:popuser:110:110:/var/qmail/mailnames/manbat.co.uk/steve.sheppa
rd:::
=9-steve.sheppard:popuser:110:110:/var/qmail/mailnames/manbat.co.uk/steve.sh
eppard:::
=9-glasgow:popuser:110:110:/var/qmail/mailnames/manbat.co.uk/glasgow:::
=9-sales:popuser:110:110:/var/qmail/mailnames/manbat.co.uk/sales:::
=9-shrewsbury:popuser:110:110:/var/qmail/mailnames/manbat.co.uk/shrewsbury::
:
=9-manchester:popuser:110:110:/var/qmail/mailnames/manbat.co.uk/manchester::
:
=9-chesterfield:popuser:110:110:/var/qmail/mailnames/manbat.co.uk/chesterfie
ld:::
=9-bristol:popuser:110:110:/var/qmail/mailnames/manbat.co.uk/bristol:::
=9-abergele:popuser:110:110:/var/qmail/mailnames/manbat.co.uk/abergele:::
=9-post:popuser:110:110:/var/qmail/mailnames/manbat.co.uk/post:::
+9:popuser:110:110:/var/qmail/mailnames/manbat.co.uk:::
=1-phil:popuser:110:110:/var/qmail/mailnames/nsoftweb.net/phil:::
=1-synctelford:popuser:110:110:/var/qmail/mailnames/nsoftweb.net/synctelford
:::
=1-syncironbridge:popuser:110:110:/var/qmail/mailnames/nsoftweb.net/synciron
bridge:::
+8:popuser:110:110:/var/qmail/mailnames/communic8international.com:::
+7:popuser:110:110:/var/qmail/mailnames/lanyonbowdler.com:::
+6:popuser:110:110:/var/qmail/mailnames/lanyonbowdler.co.uk:::
+5:popuser:110:110:/var/qmail/mailnames/sigma-assoc.co.uk:::
+4:popuser:110:110:/var/qmail/mailnames/resourcebankrecruitment.co.uk:::
+3:popuser:110:110:/var/qmail/mailnames/resourcebankrecruitment.com:::
=2-webmaster:popuser:110:110:/var/qmail/mailnames/p15150867.pureserver.info/
webmaster:::
+2:popuser:110:110:/var/qmail/mailnames/p15150867.pureserver.info:::
+1:popuser:110:110:/var/qmail/mailnames/nsoftweb.net:::
..
---> End assign file <---

As you can see all of the POP Maildir's are in the
mailnames/domainname/username directories, I've seen a few entries for
individual user aliases in the assign file as just an alternative name
pointing to the same Maildir and that seems to work for them quite happily.


Reply With Quote
  #6 (permalink)  
Old 08-20-2004
Dave Sill
 
Posts: n/a
Default Re: Virtual user alias in a virtual domain?

"Jonathan Thorpe" <jpt@nsoft.co.uk> writes:

> Yep I have an assign file, it's quite large due to the number of individual
> POP accounts so I've stripped most of the users from the first two domains.


OK... So that explains why .qmail files in ~alias were ignored--the
users/assign was overriding them.

> ---> Begin assign file <---


Let's filter this down to the entries for one example domain:

> =19-mab:popuser:110:110:/var/qmail/mailnames/barbers-online.co.uk/mab:::
> =19-jacqueline.guy:popuser:110:110:/var/qmail/mailnames/barbers-online.co.uk
> /j.guy:::
> =19-m.taylor:popuser:110:110:/var/qmail/mailnames/barbers-online.co.uk/m.tay
> lor:::
> vale:::
> +19:popuser:110:110:/var/qmail/mailnames/barbers-online.co.uk:::


The first three lines, starting with =, are simple assignments, which
match only one address. The last line, starting with +, is a wildcard
assignment, matches all other addresses starting with "19".

In your previous message you showed that control/virtualdomains
contains:

barbers-online.co.uk:19

So mail to foo@barbers-online.co.uk is going to be delivered locally
to the address 19-foo. Since there's no simple assignment in
users/assign for 19-foo, the wildcard 19 assignment will apply, and
the message will be delivered according to the contents of
/var/qmail/mailnames/barbers-online.co.uk/.qmail.

If you want to make foo@barbers-online.co.uk an alias, you should an
entry to users/assign like:

=19-foo:popuser:110:110:/var/qmail/mailnames/barbers-online.co.uk/foo:::

And put the .qmail file in /var/qmail/mailnames/barbers-online.co.uk/foo.

After modifying users/assign, run qmail-newu to generate a new
users/cdb--the machine-readable database version of users/assign that
qmail uses.

--
Dave Sill Oak Ridge National Lab, Workstation Support
Author, The qmail Handbook <http://web.infoave.net/~dsill>
<http://lifewithqmail.org/>: Almost everything you always wanted to know.
Reply With Quote
  #7 (permalink)  
Old 08-20-2004
Jonathan Thorpe
 
Posts: n/a
Default Re: Virtual user alias in a virtual domain?

"Dave Sill" <MaxFreedom@sws5.ornl.gov> wrote in message
news:wx0llga6kf0.fsf@sws5.ornl.gov...

> And put the .qmail file in /var/qmail/mailnames/barbers-online.co.uk/foo.
>
> After modifying users/assign, run qmail-newu to generate a new
> users/cdb--the machine-readable database version of users/assign that
> qmail uses.


Yep that did it! It all came down to having the .qmail file in the alias
folder, can't believe it was that simple. Would the assign file and .qmail
files be overriding delivery via fastforward too? I did try getting this to
work via fastforward at first because it allows me to port an existing
Sendmail alias file but had no luck. I've tried renaming the .qmail file in
my aliased users directory to see if it would drop through to fastforward
but it hasn't. Anyway, it works this way which is good enough.

Thanks for all your help.
Regards,
Jon.


Reply With Quote
  #8 (permalink)  
Old 08-20-2004
Dave Sill
 
Posts: n/a
Default Re: Virtual user alias in a virtual domain?

"Jonathan Thorpe" <jpt@nsoft.co.uk> writes:

> Yep that did it! It all came down to having the .qmail file in the alias
> folder, can't believe it was that simple. Would the assign file and .qmail
> files be overriding delivery via fastforward too?


Yes. Fastforward only works as a catch-all. If you've got a matching
wildcard assignment in users/assign, that will control the delivery,
so fastforward will never see it.

--
Dave Sill Oak Ridge National Lab, Workstation Support
Author, The qmail Handbook <http://web.infoave.net/~dsill>
<http://lifewithqmail.org/>: Almost everything you always wanted to know.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:08 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0