Forward undeliverable mail?

This is a discussion on Forward undeliverable mail? within the alt.comp.mail.qmail forums, part of the Mail Servers and Related category; Hi group, I have a "local" qmail server for lan users here, but not all of the users ...


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 09-23-2003
Jaco van Tonder
 
Posts: n/a
Default Forward undeliverable mail?

Hi group,

I have a "local" qmail server for lan users here, but not all of the users
in the domain are configured on the local box. There is also a remore box
that contains all the mailboxes. Mail is being retrieved from the remote
"public" mail server using fetchmail.

The local box is on a ppp dialup. The remote box is permanent online. The
local box allows users to send each other mail locally. However, I want
qmail to forward the mail for this domain for users that does NOT exist
locally to another smtp server.

eg.
tom@domain.tld gets mail locally, he is in the local lan, qmail accepts the
message and hands it to vpopmail
jaco@domain.tld gets mail locally, he is in the local lan qmail accepts the
message and hands it to vpopmail
pete@domain.tld gets mail from the remote server, seeing that he is not in
the local lan. Qmail bounces this message locally :(

How do I tell qmail not to bounce the message, but forward it to an smtp
server of my choice on the next dialup?

Thanks in advance,
Jaco


Reply With Quote
  #2 (permalink)  
Old 09-24-2003
Premnath
 
Posts: n/a
Default Re: Forward undeliverable mail?

This is not possible natively in qmail. Means you have to patch qmail
to do so. Fortunately, you dont have to invent the wheel. It has
already been invented (thanks to Nick) and it is here
"http://www.leverton.org/qmail.html". Though you will need to do some
coding to signal qmail to hold remote deliveries until the local
server connects to the Internet.

I have used this and it works.

regards,

Premnath.

Statutory Warning: * Nothing is as simple as I say it is *
Reply With Quote
  #3 (permalink)  
Old 09-24-2003
Dave Sill
 
Posts: n/a
Default Re: Forward undeliverable mail?

mailpremnath@yahoo.com (Premnath) writes:

> This is not possible natively in qmail.


Sure it is. Instead of using a virtual domain entry in
control/virtualdomains, use a set of virtual user entries for the
users that are hosted locally.

--
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
  #4 (permalink)  
Old 09-24-2003
Dave Sill
 
Posts: n/a
Default Re: Forward undeliverable mail?

"Jaco van Tonder" <jaco@premsoft.co.za> writes:

> tom@domain.tld gets mail locally, he is in the local lan, qmail accepts the
> message and hands it to vpopmail
> jaco@domain.tld gets mail locally, he is in the local lan qmail accepts the
> message and hands it to vpopmail
> pete@domain.tld gets mail from the remote server, seeing that he is not in
> the local lan. Qmail bounces this message locally :(
>
> How do I tell qmail not to bounce the message, but forward it to an smtp
> server of my choice on the next dialup?


In control/virtualdomains you have an entry something like:

domain.tld:alias-domain.tld

Replace that with:

tom@domain.tld:alias-domain.tld
jaco@domain.tld:alias-domain.tld
etc.

Then add an entry to control/smtproutes to direct the rest of the mail
to domain.tld to the other server:

domain.tld:otherserver.domain.tld

--
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 09-24-2003
Jaco van Tonder
 
Posts: n/a
Default Re: Forward undeliverable mail?

>
> In control/virtualdomains you have an entry something like:
>
> domain.tld:alias-domain.tld
>
> Replace that with:
>
> tom@domain.tld:alias-domain.tld
> jaco@domain.tld:alias-domain.tld
> etc.
>
> Then add an entry to control/smtproutes to direct the rest of the mail
> to domain.tld to the other server:
>
> domain.tld:otherserver.domain.tld
>

Dave,

Thank you good sir. I think I must purchase your book, The qmail Handbook,
and really get to know it well. :)

Have a good one.
Jaco


Reply With Quote
  #6 (permalink)  
Old 09-25-2003
Premnath
 
Posts: n/a
Default Re: Forward undeliverable mail?

Dave Sill <MaxFreedom@sws5.ornl.gov> wrote in message news:<wx0ad8u2x35.fsf@sws5.ornl.gov>...
> mailpremnath@yahoo.com (Premnath) writes:
>
> > This is not possible natively in qmail.

>
> Sure it is. Instead of using a virtual domain entry in
> control/virtualdomains, use a set of virtual user entries for the
> users that are hosted locally.


I think the scenario here is that he has the domain configured both
localy and on the remote server. But, some of the user mail boxes are
not present in the local server(probably because they are roaming).
When a mail for a remote user arrives at the local server, qmail will
accpet the mail and try to try to deliver it locally, but will fail
saying "there is no such mailbox".

Your solution will prevent that problem by routing the mail for the
remote users to the alias domain. But, if the local server is not
online at that time, qmail-remote will try to contact the remote
server; fail to do so and bounce the message.

How do you instruct qmail-remote to wait until the server is connected
to the Internet before attempting remote deliveries. That is not
possible natively in qmail is what I meant. Please do correct me if I
am wrong !! Nick's patch does the job !!.

regards,

Premnath.
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 03:29 PM.


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