On Friday 09 April 2004 02:42, Roger Ward wrote:
> Basically, when I attempt to put an external email address 
> in /etc/courier/aliases/hosted (after running makealiases to hash the files 
> of course) it rewrites the email address with an odd format like this 
> (my mail server: mx.host.com, to: [EMAIL PROTECTED], needs to go to 
> [EMAIL PROTECTED]):
> 
> [EMAIL PROTECTED]
> 
> The alias file itself has this:
> @domain.com: [EMAIL PROTECTED]

Courier is doing here exactly what you told it to.  The format for this kind 
of virtual domain is

@domain.com: localuser

So when courier sees a message for "[EMAIL PROTECTED]" it removes the 
"@domain.com" and rewrites the message as "localuser-bob" and then tries to 
deliver this message.  Assuming there is no actual "localuser-bob" on this 
machine that means it gets delivered to "localuser" and courier looks for a 
dot-courier file that tells it what to do with mail with this extension 
("-bob").

So you told courier that mail for domain.com should be delivered to LOCAL USER 
"[EMAIL PROTECTED]".  So when a message comes for [EMAIL PROTECTED] it 
gets rewritten with "-bob" stuck to the end of what it thinks is a local 
account named "[EMAIL PROTECTED]", and so you get 
"[EMAIL PROTECTED]".  Of course this user doesn't really exist so 
this doesn't work.

>  Is there a perhaps better way to do it? I'd like to bypass the entire
>  authdaemon step at this point if possible... (get mail for a domain that
>  isn't stored  locally, and forward it to the specific external address. 
>  Not like backup mx hosting, just plain 'ol forward).

So what do you want to have happen here?  Is mail for [EMAIL PROTECTED] supposed 
to be rewritten as "[EMAIL PROTECTED]" and then sent on?  If so then 
there are several ways to do it.  One way very close to what you're doing now 
is to create the alias

@domain.com: localuser

and then create the file  '/etc/courier/aliasdir/.courier-localuser-default' 
which has one line in it:

[EMAIL PROTECTED]

Now when mail that comes in for "[EMAIL PROTECTED]" it gets rewritten 
"localuser-bob" and courier will use the .courier-localuser-default file 
(since there is no 'localuser-bob' user to deliver this message to), grab the 
"bob", which is what $EXT is equal to in this case, and forward it on to

[EMAIL PROTECTED]

Clear as mud, huh? :-)  All is revealed in the dot-courier man page if you 
want the official explanation of how aliases and delivery instructions work 
in dot-courier files.

Jeff Jansen


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to