Mailing List Archive

.qmail forwarding problem
Lo,

This one has me stumped. The setup works and has done for years.

The domains firstb2b.net and sf.firstb2b.net are both handled by the same
.qmail
and all mails go into the Maildir, as per standard setup.

Here are the entries from the assign:

+sf-firstb2b-net-:popuser:1011:100:/var/qmail/popboxes/firstb2b-net/sf:::
=support:popuser:1011:100:/var/qmail/popboxes/firstb2b-net/sf:::

If I send an email to:
support@firstb2b.net or
support@sf.firstb2b.net

it ends up in the Maildir, as expected.

However, if I add an address to .qmail, things don't work as expected.
The address can be _any_ address and it still doesn't work.
I've tried it with domains that I control and with a googlemail address.

.qmail:

&foo@bar.com
./Maildir/

Now, if I send a mail to support@firstb2b.net, the mail ends up in the
Maildir and is forwarded to foo@bar.com.
However, if I send a mail to support@sf.firstb2b.net, the mail ends up
in the Maildir, but is NOT forwarded to foo@bar.com.

In short, I want all mail for support@firstb2b.net or <anything>@
sf.firstb2b.net
to be forwarded to foo@bar.com.

Anyone any ideas, please?

virtualdomains:
sf.firstb2b.net:sf-firstb2b-net
support.firstb2b.net:support-firstb2b-net
openas2.firstb2b.net:openas2-firstb2b-net

locals:
biggles.firstb2b.net
firstb2b.net

rcpthosts:
firstb2b.net
biggles.firstb2b.net
sf.firstb2b.net
openas2.firstb2b.net
b2b-composer.com
Re: .qmail forwarding problem [ In reply to ]
On Wednesday 04 January 2012 11:24:23 roseyq.20.ftumsh@xoxy.net wrote:
> This one has me stumped. The setup works and has done for years.

You have a somewhat confusing setup where some domains are handled by
control/locals, and others by control/virtualdomains. Unpicking this gives the
solution.

> The domains firstb2b.net and sf.firstb2b.net are both handled by the same
> .qmail

No they're not, see below.

> and all mails go into the Maildir, as per standard setup.

Yes, for different reasons.

> Here are the entries from the assign:
>
> +sf-firstb2b-net-:popuser:1011:100:/var/qmail/popboxes/firstb2b-net/sf:::

Will handle (support@) sf.firstb2b.net (sf.firstb2b.net in
control/virtualdomains).

No 'dash' field given, so will look for files .qmailsupport or .qmaildefault for
any delivery instructions; if not found will deliver to a Maildir in that
directory (if Maildir is the default delivery instruction for qmail-send).

I suggest adding a 'dash' field to the above users/assign line, so instead of
':::' at the end you'd have ':-::'. Then qmail will look for .qmail-support or
.qmail-default which is a more typical qmail setup (use qmail-newu to update
users/cdb after editing).


> =support:popuser:1011:100:/var/qmail/popboxes/firstb2b-net/sf:::

Will handle support (@firstb2b.net) (firstb2b.net in control/locals)


> If I send an email to:
> support@firstb2b.net or
> support@sf.firstb2b.net
>
> it ends up in the Maildir, as expected.
>
> However, if I add an address to .qmail, things don't work as expected.
> The address can be _any_ address and it still doesn't work.
> I've tried it with domains that I control and with a googlemail address.
>
> .qmail:
>
> &foo@bar.com
> ./Maildir/
>
> Now, if I send a mail to support@firstb2b.net, the mail ends up in the
> Maildir and is forwarded to foo@bar.com.

uses .qmail

> However, if I send a mail to support@sf.firstb2b.net, the mail ends up
> in the Maildir, but is NOT forwarded to foo@bar.com.

In fact this looks for .qmailsupport, .qmaildefault; neither found, assumes
default delivery of Maildir (qmail-send startup argument). That's why you're
not seeing the expected outcome of consulting the .qmail file.

> In short, I want all mail for support@firstb2b.net or <anything>@
> sf.firstb2b.net
> to be forwarded to foo@bar.com.
>
> Anyone any ideas, please?

Link .qmail to .qmailsupport (or .qmail-support if you adjust users/assign as
suggested above). Let us know if that solves the problem.

> virtualdomains:
> sf.firstb2b.net:sf-firstb2b-net
> support.firstb2b.net:support-firstb2b-net
> openas2.firstb2b.net:openas2-firstb2b-net
>
> locals:
> biggles.firstb2b.net
> firstb2b.net
>
> rcpthosts:
> firstb2b.net
> biggles.firstb2b.net
> sf.firstb2b.net
> openas2.firstb2b.net
> b2b-composer.com

Best regards,

Andrew.
--
====================================================================
* Custom email solutions * Systems Administration * Networking
http://www.acrconsulting.co.uk/email/qmail.html
====================================================================
Re: .qmail forwarding problem [ In reply to ]
Andrew,

On 4 January 2012 13:31, Andrew Richards - ar-djblists@acrconsulting.co.uk
<+roseyq+ftumsh+4e4e1ffb85.ar-djblists#acrconsulting.co.uk@spamgourmet.com>wrote:

> On Wednesday 04 January 2012 11:24:23 roseyq.20.ftumsh@xoxy.net wrote:
> > This one has me stumped. The setup works and has done for years.
>
>
> Link .qmail to .qmailsupport (or .qmail-support if you adjust users/assign
> as
> suggested above). Let us know if that solves the problem.
>
>
I put the dash in and made a .qmail-default and all works fine. My mistake
was thinking the dash, ext worked the same for wildcards as it did simple
assignments.
After 10 minutes of RTFM with a bit more care I spotted it.

Thank you very much for your time.

Warmly

John