 |
Qmail Support Forum Qmail Email Server Support Forums
|
| View previous topic :: View next topic |
| Author |
Message |
Tim Guest
|
Posted: Fri Jul 29, 2005 4:42 pm Post subject: dot qmail files |
|
|
Hi all,
ok, is there a way to have a command in a .qmail file that simply
delivers the message back into the queue instead of a local delivery ?
The reason I ask this is that I have built a rcpt check system that
accepts the mail only if it finds the corresponding .qmail-user file.
But in this particular case, I want to use the smtproutes file to send
the mail elsewhere, so I would need to get this message in the queue.
Can you use the |preline to pipe it to qmail-inject ? or would that
create a loop ?
qmail-remote is the one that looks into the smtproutes file, and it will
use those configurations before it would use the local stuff, right ?
I guess I need a way to tell the system that this is a remote address
from within the .qmail file...
Is that possible ?
Tim. |
|
| Back to top |
|
 |
Charles Guest
|
Posted: Sat Jul 30, 2005 8:31 pm Post subject: |
|
|
Tim Traver <tt-list@simplenet.com> wrote:
>
> ok, is there a way to have a command in a .qmail file that simply
> delivers the message back into the queue instead of a local delivery ?
Yes; forwarding lines ("&...") do this, as does the forward command ("|forward
...").
> The reason I ask this is that I have built a rcpt check system that
> accepts the mail only if it finds the corresponding .qmail-user file.
> But in this particular case, I want to use the smtproutes file to send
> the mail elsewhere, so I would need to get this message in the queue.
Mail arrives for joe@..., is controlled by ~joe/.qmail. In that file:
|sam@otherhost.example.org
Would then deliver the message to another host. You could have an smtproutes
entry for "otherhost.example.org" if you wanted.
> Can you use the |preline to pipe it to qmail-inject ? or would that
> create a loop ?
That's what "&" and "forward" are for -- no need to re-process the message
content, as qmail-inject does.
You could create a loop if you're trying to forward to the same address, i.e.,
the one doing the forwarding.
> qmail-remote is the one that looks into the smtproutes file, and it will
> use those configurations before it would use the local stuff, right ?
qmail-remote isn't involved in "local stuff". Either a message delivery is
local/virtual, or it's remote.
Charles |
|
| Back to top |
|
 |
Tim. Guest
|
Posted: Sat Jul 30, 2005 8:38 pm Post subject: |
|
|
Charles,
thanks for answering...
Charles Cazabon wrote:
Tim Traver <tt-list@simplenet.com> wrote:
ok, is there a way to have a command in a .qmail file that simply
delivers the message back into the queue instead of a local delivery ?
Yes; forwarding lines ("&...") do this, as does the forward command ("|forward
...").
yes, I know how to use the regular forwarding commands to forward the message to a particular address.
I guess what I forgot to say was that I would be using this in a .qmail-default file, so I would not know the particular user name that it was being delivered for.
So what I want to happen is this :
Mail arrives for joe@domain.com. That is controlled by /var/qmail/domains/domain.com/.qmail-default (by a users file config). I want to be able to put something in that .qmail-default file that tells it that it is going to be a remote delivery, so it puts it in the queue, and then qmail-remote uses the smtproutes to deliver that message to another specific mail server.
Tim. |
|
| Back to top |
|
 |
Charles Guest
|
Posted: Sat Jul 30, 2005 8:40 pm Post subject: |
|
|
Tim Traver <tt-list@simplenet.com> wrote:
>
> thanks for answering...
You're welcome.
> I guess what I forgot to say was that I would be using this in a
> .qmail-default file, so I would not know the particular user name that
> it was being delivered for.
>
> So what I want to happen is this :
>
> Mail arrives for joe@domain.com. That is controlled by
> /var/qmail/domains/domain.com/.qmail-default (by a users file config). I
> want to be able to put something in that .qmail-default file that tells
> it that it is going to be a remote delivery, so it puts it in the queue,
> and then qmail-remote uses the smtproutes to deliver that message to
> another specific mail server.
In /var/qmaildomains/domain.com/.qmail-default:
|forward "$DEFAULT"@otherdomain.example.org
In /var/qmail/control/smtproutes:
otherdomain.example.org:1.2.3.4
If this isn't what you're asking for, then you're probably asking a variant of
the "How do I make qmail treat a domain as local, so I can pass it through
.qmail, and then treat the /same/ domain as remote, so it'll deliver the
messages elsewhere?" question. The answer to that is: you don't. If you must
do this, you can do it with multiple qmail installs on the same machine -- see
the list archives for much discussion of how and why.
Charles |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|