[vchkpw] Forwarding spec. users w/o local domain

2006-06-28 Thread Ted Fines
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 [EMAIL PROTECTED] I would like to be able to set a 
forward for that address to [EMAIL PROTECTED] or wherever. I would like to 
have a file with entries like:
[EMAIL PROTECTED]:[EMAIL PROTECTED]
[EMAIL PROTECTED]:[EMAIL PROTECTED]
...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.

A user on the qmail mailing list suggested using qmailtap.  I think it would 
almost do what I need, so I thought it was worth posting the question to this 
list too.  qmailtap sends a copy to a specific address, however it would still 
allow qmail to attempt delivery of the original message, which would result in 
a failure notice for the sender.  The end result would be that the user would 
receive a forwarded copy of the message, but the sender would think it didn't 
work.  

Does anyone have any ideas on how to accomplish this goal, using qmailtap or 
something else?

Thanks in advance,
Ted



Re: [vchkpw] Forwarding spec. users w/o local domain

2006-06-28 Thread Tom Collins

On Jun 28, 2006, at 6:11 AM, Ted Fines wrote:
Does anyone have any ideas on how to accomplish this goal, using  
qmailtap or something else?


If the server that accepts mail for macalester.edu can be convinced to  
accept mail for somehost.macalester.edu, you can use vpopmail and  
qmailadmin to accomplish your goals.  Make sure  
[EMAIL PROTECTED] is working correctly before modifying your  
gateway system.


Stop qmail-smtpd and qmail-send before doing any of this, to make sure  
you get it set up right.


You're going to add macalester.edu as a vpopmail domain on your gateway  
system.  Change the catchall to [EMAIL PROTECTED].  If  
you're using qmailadmin, you can just enter @somehost.macalester.edu  
as the catchall email address, and it will automatically set it up.


Here's the feature request on that undocumented feature:  
http://sourceforge.net/tracker/index.php? 
func=detailaid=910410group_id=6691atid=356691


Remove the entry from smtproutes.  At this point, you might be able to  
start qmail-send (leaving qmail-smtpd off) and use qmail-inject to  
inject a test message.  Watch the logs to make sure it gets through.   
If so, you can start qmail-smtpd back up.


Now, add aliases for the addresses you want forwarded elsewhere.  Use  
QmailAdmin, or just create a .qmail-user45 file in the domain  
directory.


If an alias exists, the email will be forwarded.  If it doesn't exist,  
it will go to [EMAIL PROTECTED]  You'll probably also want  
to modify the postmaster user to have its mail get forwarded to  
[EMAIL PROTECTED]


If you really want to be safe, you could add the domain as test.com  
first, make sure everything works (using qmail-inject, or manually  
telnetting to port 25 on localhost) before doing it with the real  
domain.


--
Tom Collins  -  [EMAIL PROTECTED]
Vpopmail - virtual domains for qmail: http://vpopmail.sf.net/
QmailAdmin - web interface for Vpopmail: http://qmailadmin.sf.net/