|
|
|
|
|
|
| Author |
Message |
Ted Fines *nix forums addict
Joined: 21 Jan 2005
Posts: 73
|
Posted: Wed Jun 28, 2006 11:50 am Post subject:
Forwarding spec. users w/o local domain
|
|
|
Hi,
Our system: netqmail-1.05 on RHEL4.
I have a 'gateway' qmail system. It delivers nothing locally, and just does some filtering and logging before passing all messages through. "locals" contains only "LOCALHOST", and there are no virtual domains. "smtproutes" contains the line "macalester.edu:141.140.1.31:26", and "rcpthosts" contains "macalester.edu".
I'd like to do something I would think is very simple and possible, but I am stuck. I would like to setup some user forwards on this system. For example, if a message comes in for "user1@macalester.edu" I would like to be able to set a forward for that address to "something@hotmail.com" or wherever. I would like to have a file with entries like:
user1@macalester.edu:something@hotmail.com
user45@macalester.edu:something.else@adifferent.edu
....and so on... Of course I don't care about the syntax, but you get the idea. All other addresses would just follow the rule in smtproutes.
Here's the line of thinking I've been following and the conclusions I've come to.
1. Since no mail is delivered locally, creating local user qmail accounts with .qmail files has no effect.
2. The moresmtproutes patch is not applicable here because it is for forwarding a given address to a specific destination host, not a specific destination address.
3. Since no mail is delivered locally, the ~alias/.qmail-default file isn't processed either. I had tried populating that file wth the line "| /var/qmail/bin/fastforward -d /etc/aliases.cdb", created an aliases file, installed fastforward, etc., but it just doesn't get used.
I was thinking one option would be to change qmail's locals file to include "macalester.edu", create accounts only for the users with forwards, then create a line in ~alias/.qmail-default to send everything else on to 141.140.1.31:26, as I currently have in my smtproutes file? That seems possible, but what would such a line look like?
Thanks in advance,
Ted |
|
| Back to top |
|
 |
Thomas Raef *nix forums beginner
Joined: 10 Apr 2006
Posts: 21
|
Posted: Wed Jun 28, 2006 12:18 pm Post subject:
RE: Forwarding spec. users w/o local domain
|
|
|
I believe you could use qmailtap http://www.inter7.com/?page=qmailtap
This will give you the functionality you seek and you can use it exactly
as you have envisioned.
-----Original Message-----
From: Ted Fines [mailto:fines@macalester.edu]
Sent: Wednesday, June 28, 2006 6:51 AM
To: qmail_mailing_list
Subject: Forwarding spec. users w/o local domain
Hi,
Our system: netqmail-1.05 on RHEL4.
I have a 'gateway' qmail system. It delivers nothing locally, and just
does some filtering and logging before passing all messages through.
"locals" contains only "LOCALHOST", and there are no virtual domains.
"smtproutes" contains the line "macalester.edu:141.140.1.31:26", and
"rcpthosts" contains "macalester.edu".
I'd like to do something I would think is very simple and possible, but
I am stuck. I would like to setup some user forwards on this system.
For example, if a message comes in for "user1@macalester.edu" I would
like to be able to set a forward for that address to
"something@hotmail.com" or wherever. I would like to have a file with
entries like:
user1@macalester.edu:something@hotmail.com
user45@macalester.edu:something.else@adifferent.edu
....and so on... Of course I don't care about the syntax, but you get the
idea. All other addresses would just follow the rule in smtproutes.
Here's the line of thinking I've been following and the conclusions I've
come to.
1. Since no mail is delivered locally, creating local user qmail
accounts with .qmail files has no effect.
2. The moresmtproutes patch is not applicable here because it is for
forwarding a given address to a specific destination host, not a
specific destination address.
3. Since no mail is delivered locally, the ~alias/.qmail-default file
isn't processed either. I had tried populating that file wth the line
"| /var/qmail/bin/fastforward -d /etc/aliases.cdb", created an aliases
file, installed fastforward, etc., but it just doesn't get used.
I was thinking one option would be to change qmail's locals file to
include "macalester.edu", create accounts only for the users with
forwards, then create a line in ~alias/.qmail-default to send everything
else on to 141.140.1.31:26, as I currently have in my smtproutes file?
That seems possible, but what would such a line look like?
Thanks in advance,
Ted |
|
| Back to top |
|
 |
Ted Fines *nix forums addict
Joined: 21 Jan 2005
Posts: 73
|
Posted: Wed Jun 28, 2006 1:00 pm Post subject:
RE: Forwarding spec. users w/o local domain
|
|
|
--- Original Message ---
| Quote: | I'd like to do something I would think is very simple and
possible, but
I am stuck. I would like to setup some user forwards on this
system.
For example, if a message comes in for "user1@macalester.edu"
I would
like to be able to set a forward for that address to
"something@hotmail.com" or wherever. I would like to have a
file with
entries like:
user1@macalester.edu:something@hotmail.com
user45@macalester.edu:something.else@adifferent.edu
...and so on... Of course I don't care about the syntax, but
you get the
idea. All other addresses would just follow the rule in
smtproutes.
--- Original Message ---
I believe you could use qmailtap http://www.inter7.com/?page=qmailtap
This will give you the functionality you seek and you can use
it exactly
as you have envisioned.
|
Thanks. I'd not really looked at that patch before. I think it is close to what I need, but not quite. The specific addresses I'd like to *forward* to, not send a copy to. The normal destination system named in smtproutes will not accept messages for these users. So if I used qmailtap, the user would receive a forwarded copy, but the sender would also receive a failure notice. If I have this wrong, please let me know!
Thanks,
Ted |
|
| Back to top |
|
 |
Thomas Raef *nix forums beginner
Joined: 10 Apr 2006
Posts: 21
|
Posted: Wed Jun 28, 2006 1:03 pm Post subject:
RE: Forwarding spec. users w/o local domain
|
|
|
No, I believe you are correct. I think it will deliver to the original
and send a copy to the other address.
Sorry.
-----Original Message-----
From: Ted Fines [mailto:fines@macalester.edu]
Sent: Wednesday, June 28, 2006 8:00 AM
To: qmail_mailing_list
Subject: RE: Forwarding spec. users w/o local domain
--- Original Message ---
| Quote: | I'd like to do something I would think is very simple and
possible, but
I am stuck. I would like to setup some user forwards on this
system.
For example, if a message comes in for "user1@macalester.edu"
I would
like to be able to set a forward for that address to
"something@hotmail.com" or wherever. I would like to have a
file with
entries like:
user1@macalester.edu:something@hotmail.com
user45@macalester.edu:something.else@adifferent.edu
...and so on... Of course I don't care about the syntax, but
you get the
idea. All other addresses would just follow the rule in
smtproutes.
--- Original Message ---
I believe you could use qmailtap http://www.inter7.com/?page=qmailtap
This will give you the functionality you seek and you can use
it exactly
as you have envisioned.
|
Thanks. I'd not really looked at that patch before. I think it is
close to what I need, but not quite. The specific addresses I'd like to
*forward* to, not send a copy to. The normal destination system named
in smtproutes will not accept messages for these users. So if I used
qmailtap, the user would receive a forwarded copy, but the sender would
also receive a failure notice. If I have this wrong, please let me
know!
Thanks,
Ted |
|
| Back to top |
|
 |
Kyle Wheeler *nix forums Guru Wannabe
Joined: 07 Jan 2005
Posts: 208
|
Posted: Wed Jun 28, 2006 1:45 pm Post subject:
Re: Forwarding spec. users w/o local domain
|
|
|
On Wednesday, June 28 at 06:50 AM, quoth Ted Fines:
| Quote: | I'd like to do something I would think is very simple and possible,
but I am stuck. I would like to setup some user forwards on this
system. For example, if a message comes in for
"user1@macalester.edu" I would like to be able to set a forward for
that address to "something@hotmail.com" or wherever. I would like to
have a file with entries like:
user1@macalester.edu:something@hotmail.com
user45@macalester.edu:something.else@adifferent.edu
...and so on... Of course I don't care about the syntax, but you get the idea. All other addresses would just follow the rule in smtproutes.
|
From the man page of qmail-send:
virtualdomains
List of virtual users or domains, one per line. A virtual user
has the form user@domain:prepend, without any extra spaces.
When qmail-send sees the recipient address user@domain, it
converts it to prepend-user@domain and treats it as local.
So what you do is put:
user1@macalester.edu:forward1
…into your virtualdomains file. Then create a file,
~alias/.qmail-forward1-default that contains:
&something@hotmail.com
Presto, you’re done. No patches needed.
~Kyle
--
Strong coffee, much strong coffee, is what awakens me. Coffee gives me
warmth, waking, an unusual force and a pain that is not without very
great pleasure.
-- Napoleon Bonaparte |
|
| Back to top |
|
 |
Jeremy Kitchen *nix forums Guru Wannabe
Joined: 14 Jan 2005
Posts: 212
|
Posted: Wed Jun 28, 2006 5:07 pm Post subject:
Re: Forwarding spec. users w/o local domain
|
|
|
On Wednesday 28 June 2006 04:50, you wrote:
| Quote: | I have a 'gateway' qmail system. It delivers nothing locally, and just
does some filtering and logging before passing all messages through.
"locals" contains only "LOCALHOST", and there are no virtual domains.
"smtproutes" contains the line "macalester.edu:141.140.1.31:26", and
"rcpthosts" contains "macalester.edu".
I'd like to do something I would think is very simple and possible, but I
am stuck. I would like to setup some user forwards on this system. For
example, if a message comes in for "user1@macalester.edu" I would like to
be able to set a forward for that address to "something@hotmail.com" or
wherever. I would like to have a file with entries like:
user1@macalester.edu:something@hotmail.com
user45@macalester.edu:something.else@adifferent.edu
...and so on... Of course I don't care about the syntax, but you get the
idea. All other addresses would just follow the rule in smtproutes.
|
well there are a couple of ways you can do it. one of them being similar to
what you described:
1) set up a virtualdomain, let's say your line looks like:
macalester.edu:macalester
in ~macalester/.qmail-default put a line like:
|forward "$default@int.macalester.edu"
then set up your other mail server to accept mail destined for
int.macalester.edu as the same as macalester.edu
then for each forward you want to add, simply make ~macalester/.qmail-luser
files for them.
2) same virtualdomain as above, but slightly different:
use a second qmail instance in the machine.. let's say /var/qmail2
instead of simply |forward, you'd use:
|/var/qmail2/bin/forward "$default@macalester.edu"
then your other /var/qmail2 instance is configured with no virtualdomains, and
the smtproutes is the same as it is now.
3) set up a 'virtualdomain' for each user:
one of the features(?) of qmail's virtualdomain system is that you have
user-level granularity on the virtualdomains file. So, let's say you want to
forward postmaster@macalester.edu and abuse@macalester.edu to
ted@example.com. You would create a virtualdomains file like:
postmaster@macalester.edu:macalester-ted
abuse@macalester.edu:macalester-ted
and then you'd create ~macalester/.qmail-ted with your forward. This requires
no internal domain, no second qmail instance, but will make for a slightly
larger virtualdomains file, and will also require sending a HUP to qmail-send
after each forward is added or removed.
-Jeremy
| Quote: | Thanks in advance,
Ted
|
--
Jeremy Kitchen ++ kitchen@scriptkitchen.com
http://www.pirate-party.us/ -- defend your rights |
|
| Back to top |
|
 |
Ted Fines *nix forums addict
Joined: 21 Jan 2005
Posts: 73
|
Posted: Tue Jul 11, 2006 2:26 pm Post subject:
Re: Forwarding spec. users w/o local domain
|
|
|
--- Original Message ---
| Quote: | On Wednesday, June 28 at 06:50 AM, quoth Ted Fines:
I'd like to do something I would think is very simple and possible,
but I am stuck. I would like to setup some user forwards on this
system. For example, if a message comes in for
"user1@macalester.edu" I would like to be able to set a forward for
that address to "something@hotmail.com" or wherever. I would like to
have a file with entries like:
user1@macalester.edu:something@hotmail.com
user45@macalester.edu:something.else@adifferent.edu
...and so on... Of course I don't care about the syntax, but you get the idea. All other addresses would just follow the rule in smtproutes.
From the man page of qmail-send:
virtualdomains
List of virtual users or domains, one per line. A
virtual user
has the form user@domain:prepend, without any extra
spaces.
When qmail-send sees the recipient address user@domain,
it
converts it to prepend-user@domain and treats it as
local.
So what you do is put:
user1@macalester.edu:forward1
?into your virtualdomains file. Then create a file,
~alias/.qmail-forward1-default that contains:
&something@hotmail.com
Presto, you?re done. No patches needed.
~Kyle
|
Great. Worked perfectly, thanks. |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Sun Nov 23, 2008 1:16 pm | All times are GMT
|
|
Debt Consolidation | Repair Bad Credit | Loans | Loans | Credit Cards
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|