Re: [SLUG] Debian, Logcheck and Postfix (oh my!)

From: Robert Haeckl (rhaeckl@tampabay.rr.com)
Date: Mon Jun 11 2001 - 12:24:16 EDT


I have the same issue as I'm sure many people do who have private
domains behind a NAT server connected to their ISP. I would like to
masquerade my sender address based on where the mail is going. If it is
being sent locally -> don't masquerade; if it is to be forwarded to my
ISP -> change the sender address to my email address at the ISP.

I went through the Postfix website and could not find anything other
than simple masquerading. For example, if you want to masquerade, all
sender addresses are masqueraded. I don't see control structure
mechanisms (if/else) like Sendmail has. Even with Sendmail, I think
I'll have to edit the .cf file directly. Maybe someone on the SLUG list
has already done this with Postfix, Sendmail, QMail.... This seems like
it should have a quick fix, maybe even a one-liner.

-Robert

Paul M Foster wrote:
>
> In Debian 2.2, logcheck is configured out of the box to mail reports to
> root every hour. I'm using Postfix for my MTA. Here's what's happening:
>
> logcheck mails its report to root, which is translated into
> root@quillandmouse.com. On my local lan, the domain is mars.lan, but I
> get my email from my ISP at quillandmouse.com. So the "root" address is
> being rewritten as root@quillandmouse.com. So what happens is that
> Postfix sends this out to my ISP. On my domain at my ISP, any mail not
> to a known addressee at quillandmouse.com gets forwarded to me. So I get
> all these hourly messages when I fetch mail for paulf@quillandmouse.com.
>
> I don't mind getting the messages, but they're going all the way to my
> ISP and then back down, when they should really just be locally mailed
> to me.
>
> But here's what makes it worse: My ISP won't accept any mail from anyone
> at mars.lan. It insists mail going to it has the quillandmouse.com
> domain on it. So I've had to make nearly everything in postfix so that
> it has quillandmouse.com on the end of it. I'm just not sure what to
> change so that mail for local delivery (like from root) gets delivered
> _locally_.
>
> Any ideas what I'm doing wrong?
>
> Paul



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:35:25 EDT