Re: MTA and Friends for the domainless


Subject: Re: MTA and Friends for the domainless
From: James Zuelow (e5z8652@zuelow.net)
Date: Thu May 15 2003 - 14:52:13 AKDT


On Thu, 15 May 2003 12:13:41 -0800
"Fielder George Dowding" <fgdowding@iceworm-enterprises.net> wrote:

>
> Greetings all,
>
> There was much discussion of MTA's recently. I had been trying to
> get qmail configured, but found "Living With qmail" helpful but not
> what I could use to configure _MY_ system in _MY_ situation. I
> suspect there are other members of aklug that are in situations
> similar to mine who would also benefit from a properly configured
> _LOCAL_ dns/mta system.
>
> To wit: I have several POP3 accounts out there in cyberspace which I
> can retrieve with any ol' email client or fetchmail. I have a test
> set up for fetchmail on two POP3 accounts, but I have not been able
> to configure exim, postfix, or qmail to make the local delivery.
>
> Please do not, repeat NOT, suggest alternatives to getting email.
> This is the way I want to do it. I want a single point of
> configuration, i.e.: fetchmail, and a single local delivery
> mechanism. I am applying this to my home system, but it is basically
> a test bed for Mabel T. Caverly Senior Center and any other clients
> I may acquire in the future at the John Thomas Building (325 E 3rd
> St).
>
OK, Fetchmail is not the problem. From the Fetchmail man page:

       As each message is retrieved fetchmail normally delivers it via
SMTP to port 25 on the machine it is running on (localhost), just as
though it were being passed in over a normal TCP/IP link. The mail will
then be delivered locally via your system's MDA (Mail Delivery Agent,
usually sendmail(8) but your system may use a different one such as
smail, mmdf, exim, or qmail). All the delivery-control mechanisms
(such as .forward files) normally available through your system MDA and
local delivery agents will therefore work.

       If no port 25 listener is available, but your fetchmail
compilation detected or was told about a reliable local MDA, it will use
 that MDA for local delivery instead. At build time, fetchmail normally
looks for executable procmail(1) and sendmail(1) binaries.

Since Postfix is a drop-in replacement for Sendmail, Fetchmail will find the sendmail binary and act accordinly. I don't use qmail, but I'll bet it is the same. And fetchmail already handles the problem of getting mail for "fred@isp.com" and redoing the headers to deliver it to a local user "mary." So the incoming mail should be fine.

> So, the big problem I am having is configuring an MTA to do the SMTP
> thing with various domains out there in cyberspace and not reveal my
> local host and fake (bogus) domain in the headers. I have had
> embarrasing success with qmail. I don't want to polute cyberspace
> with bogus addresses anymore.
>

OK, take a peek at my headers. You'll see where I sent this mail from a bogus domain, it hit my mail server (Postfix), and the address was re-written to my legit public domain. Compare the IP address of my personal domain with that of Juneau-lug.org - same mail server. Now - I don't take great pains to conceal my bogus domain in the headers. Do you really want to do that, or do you mean you want the e-mail address re-written so that someone else can hit reply and have it work?

> I know deep in my Unice Heart that this can be done. Has anyone on
> this list done this?
>

If I understand what you want to do, yes I have. I use Fetchmail to collect mail from a couple POP3 accounts such as gci.net, and send mail from one of various domains using Postfix.

You are interested in the following items in the Postfix main.cf:

myorigin & mydomain if you only want to send mail from one domain.

If you want to send and recieve mail from more than one domain (say zuelow.net & juneau-lug.org), use the sender_canonical_maps and recipient_canonical_maps. Using these two maps, you can arbitrarily re-write the message headers, so that "George@bogus.network" gets written "fgdowding@legit.network" as it passes through the MTA. Don't use the plain canonical_maps for this purpose, as it rewrites addresses going both ways. (It is used to change "james" to "James_Zuelow", etc.)

Note that these are different from the alias maps! An alias will deliver mail for "Postmaster" into the mailbox for user "james" - however when I read it, it is still addressed to Postmaster. The canonical maps actually rewrite the headers.

Now the sender_canonical_maps are cool when you have a good MUA. I use Sylpheed, which lets me choose one of several e-mail addresses to send mail from. So I can send mail from this workstation that when it appears on the internet can be from zuelow.net, juneau-lug.org, or even gci.net when I want to use the account that comes with my internet service. All I do is choose when when I send the message. If your MUA doesn't do that, you can create an account for each address you use. So you might have users "gci" "hotmail" "mailcom" etc. that would get mapped to gci.net, hotmail.com, and mail.com on the way out. Just setting up Sylpheed with multiple accounts is a lot easier.

> If this is too much noise on this list we can keep it private. Thank
> you in advance. fgd. kl7fhx

The Postfix documentation is pretty da*n good. (/usr/share/doc/postfix or wherever your distro puts it.) Even has examples.

Cheers,

James

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Thu May 15 2003 - 14:52:28 AKDT