[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Exim domain setup problem for dialup use



On Mon, Nov 25, 2002 at 09:39:29PM -0800, Bill Moseley wrote:
| I've got a Debain machine running exim acting as a MASQ machine on a pppoe
| connection (e.g. the machine has two NICs).
| 
| The hostname is "burn".  The domain, for this example, is "burn.foo.net"
| 
| The problem is if I send mail to outside machines:
| 
|    echo "hello" | mail moseley@hank.org
| 
| gives this:
| 
|      ...error from remote mailer after MAIL FROM: ...
|      501 5.1.8 <moseley@burn.foo.net>... Domain of sender address
|      moseley@burn.foo.net does not exist
| 
| Which is correct, burn.foo.net does not resolve.
| 
| So, in exim.conf I can add:
| 
|   qualify_domain = foo.net
| 
| And that fixes that problem (since foo.net) exists, but it now means that 
| 
|   echo "hello" | mail moseley
| 
| gets sent to moseley@foo.net instead of delivered locally.
| 
| I only want unqualified MAIL FROM: addresses modified, not the RCPT TO:
| addresses.

The first thing you need to do is ensure that your machine doesn't
think it's name is the same as some real host or domain.  For example,
don't name your machine "hotmail.com" just because you think it's a
cute name.  If you don't have a real domain for your site, use
something like "somethingcute.invalid".  The .invalid Top Level Domain
is reserved for "invalid" uses such as your site (or laptops, etc)
that lack a valid domain.

The second thing is to see what is in /etc/email-addresses and look at
the rewrite rules section of your exim.conf.  The default debian
setup assumes that most people will have a "home" system and aren't
running their own mail server.  (which is reasonable, and the a
knowledgeable admin at an ISP or corporation or whatever can change
the config accordingly)  The rewrite rule
    # look up the real MAIL FROM: address for all local users
    *@foo.invalid "${lookup{$1}lsearch{/etc/email-addresses} {$value}fail}" frFs
takes any address which has your domain as the domain part and looks
for the local part in the /etc/email-addresses file.  This is one
reason it is important not to make your domain clash with a real
domain.  The 'frFs' flags tell exim which locations of the address it
should rewrite (look in the manual for an explanation of them).  The
/etc/email-addresses file should have something like
    dman: dsh8290@rit.edu
in it.  That says that the local user "dman"'s real email address is
dsh8290@rit.edu.  So exim will take an address like "dman@foo.invalid"
and change it to "dsh8290@rit.edu".

I suspect you have something mismatched in the combination of your
host or domain name, the contents of /etc/email-addresses, or the
rewrite rule to cause you to have this "weird" effect.

One more comment, regarding qualify_domain.  As it says, it is the
domain which exim will use to qualify unqualified addresses.  So if
you specify "foo.net", and then send mail to "auser".  exim will
dutifully qualify it as "auser@foo.net" and then see how it is
supposed to handle messages for "auser@foo.net".  Clearly if "foo.net"
is not your machine, the message won't be delivered locally.  Don't
set qualify_domain, and definitely don't set it to some real domain
that you don't own.

HTH,
-D

-- 
Stay away from a foolish man,
for you will not find knowledge on his lips.
        Proverbs 14:7
 
http://dman.ddts.net/~dman/

Attachment: pgpspo7_yMHDG.pgp
Description: PGP signature


Reply to: