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

Re: Difficulty configuring exim for use with fetchmail and as external MTA.

On Mon, Mar 17, 2003 at 12:59:39AM -0500, Chris Metzler wrote:
> Hi.  I'm a new-ish Debian home user, and exim was the default
> SMTP handler at installation time.  I have a problem with exim
> that I've put up with for quite some time; but enough is enough,
> and I'm trying to solve it now, and hope someone can help.
> I don't use exim to listen on port 25; no incoming SMTP connections
> are allowed.  I use exim 1) as an MTA for outgoing external mail,
> and 2) as a local MDA.
> Email sent to users on my host first goes to an IMAP server at my
> ISP, speakeasy.net; I fetch it from them using fetchmail, which then
> passes it off to exim for local delivery.  Since the email grabbed by
> fetchmail, and then passed to exim for local delivery, will come in
> with addresses of the form <username@speakeasy.net>, exim needs to
> recognize that incoming mail with that domain is indeed local, and
> should be put in <username>'s mailbox in /usr/mail, rather than being
> forward via outgoing SMTP back to mail.speakeasy.net.  This implies
> that "speakeasy.net" should be set as a local domain in exim.conf.
> Also, outgoing email needs a domain tacked on.  In particular,
> outgoing external mail, to be passed to mail.speakeasy.net by SMTP,
> needs "@speakeasy.net" to be tacked on to <username> in the "From:"
> header.  At present, I take care of this by having qualify-domain
> -- the domain automatically tacked on to all unqualified addresses
> -- set to "speakeasy.net".
> THE PROBLEM:  outbound external email to an address at speakeasy.net
> which is not on my local host -- <some_external_user@speakeasy.net> --
> fails.  exim sees the "@speakeasy.net" and interprets the mail as being
> local, because "speakeasy.net" is in the local domain list.  It then
> tries to deliver the mail to <some_external_user> on my local host, and
> fails because there is no such user.
> The only solution I can think of is to use something other than exim as
> the local MDA (e.g. procmail or another MDA/MTA like qmail or whatever).
> If I did that, then exim would no longer need to think that speakeasy.net
> is a local domain.  But that seems like a Rube Goldberg solution to what
> I would naively think is a very common user situation.
> What am I missing here?  Any pointers would be appreciated.  Thanks.

It seems you've got pretty much the same setup as me; in my
/etc/exim/exim.conf I have:

qualify_domain = nestie.pigeonloft

local_domains = localhost:nestie.pigeonloft

local_domains_include_host = true
local_domains_include_host_literals = true

# This rewriting rule is particularly useful for dialup users who
# don't have their own domain, but could be useful for anyone.
# It looks up the real address of all local users in a file

*@nestie.pigeonloft    ${lookup{$1}lsearch{/etc/email-addresses}\
						{$value}fail} frFs

and in /etc/email-addresses:

# This is /etc/email-addresses. It is part of the exim package
# This file contains email addresses to use for outgoing mail. Any local
# part not in here will be qualified by the system domain as normal.
# It should contain lines of the form:
#user: someone@isp.com
#otheruser: someoneelse@anotherisp.com
pigeon: jah.pigeon@ukonline.co.uk

There's no need to get rid of exim - it works fine!


Reply to: