Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-19-2004, 05:28 PM   #1
Registered: Dec 2003
Distribution: Cent OS 4.1
Posts: 38

Rep: Reputation: 15
Domain Routing to Postfix from Sendmail = Wrong IP information in Mail Logs!

This may sound like a silly question, but does anyone know how to get the correct mail relay IP when using domain routing/mailertables in Sendmail to forward all traffic for a domain to Postfix, which is on another machine inside the LAN?

From the Postfix Mail Log, here’s an example:

May 19 17:04:21 mail postfix/smtpd[7004]: connect from unknown[]

May 19 17:04:21 mail postfix/smtpd[7004]: 806E32E600: client=unknown[]

May 19 17:04:21 mail postfix/cleanup[7005]: 806E32E600: message-id=<>

May 19 17:04:21 mail postfix/nqmgr[4146]: 806E32E600: from=<>, size=972, nrcpt=1 (queue active)

May 19 17:04:21 mail postfix/smtpd[7004]: disconnect from unknown[]

May 19 17:04:22 mail postfix/smtp[7007]: 806E32E600: to=<>, relay=[], delay=1, status=sent (250 Ok: queued as D7EA45A069)

Here’s the same message, “before” it was routed through Postfix:

May 19 17:41:33 mirage sendmail[1629]: i4JLfT001629: from=<>, size=535, class=0, nrcpts=1, msgid=<>, bodytype=8BITMIME, proto=SMTP, daemon=MTA, []

May 19 17:41:34 mirage sendmail[1631]: i4JLfT001629: to=<>, delay=00:00:01, xdelay=00:00:01, mailer=smtp, pri=30535, relay=[] [], dsn=2.0.0, stat=Sent (Ok: queued as 3EF502E600)

See what I mean? “ []” is present in the Sendmail log, but is stripped and replaced with my server IP when it’s routed through Postfix.

Why is this a bad thing? It’s not the end of the world, however I’m testing Postfix on a test machine inside my Lan. Without the correct “originating” IP information, this renders Postfixe’s many Spam prevention features pretty much useless, and because all it sees is or In fact, it makes testing UCE features almost impossible, as these features rely on the originating IP information.

Maybe this is an inherent, and unavoidable side effect when routing through another host perhaps? I don’t know, but I’ve tried everything, and I can’t get that dam originating IP information to show up in the Postfix logs. Is this even possible, or am I wasting my time here?

Would really appriciated some help people

Dave H
Old 05-20-2004, 12:52 AM   #2
Senior Member
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
It's unavoidable the way your have your architecture setup. The MTA only sees the IP that it receives the message from, nothing else can be trusted (because it may have been altered). If Sendmail is attaching Received: headers to the body, than the IP that Sendmail received the message from will be in the body of the message (otherwise known as the RFC[2]822 section), but it won't be on the envelope (the RFC[2]821 section).

The short answer is no, you cannot make that show up in the Postfix logs and your RBLs or other IP-based anti-spam measures will not work (unless they scan the message body headers, but MTAs never look at that).
Old 05-20-2004, 10:06 AM   #3
Registered: Dec 2003
Distribution: Cent OS 4.1
Posts: 38

Original Poster
Rep: Reputation: 15
I have another box I’m not doing anything with, so I installed Postfix on that. On the Linksys, I’m now pointing port 25 to this box, and using Postfixes domain routing to route my domains back to the Sendmail box, as well as another mail server I’m setting up, (also with Postfix on it). This way, Postfix receives all inbound traffic first.

What I don’t know yet, is if the Postfix UCE features are actually applicable to domains that are routed from it. Ideally speaking, I could utilize all its UCE features before mail is routed to the other servers. Grin… That would be too easy, and I bet I’ll probably discover otherwise. The real pitfall, is that all testing will need to done without disrupting my 'live' domains.

Man… How the hell do these admins setup a server farm consisting of 10’s or hundreds of servers without losing a few years off their life. Albeit this is small home based setup, the amount of complexities that can emerge with a “multiple” MTA configuration is beyond description.

Thanks for your help chort –really appreciate it!



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
PostFix & mail routing. abhijeetudas Linux - Networking 0 08-01-2005 01:21 AM
Sendmail - wrong mail sender domain display jika Linux - Newbie 1 05-27-2005 02:29 AM
postfix, mysql and mail routing demian Linux - Networking 0 09-09-2004 09:37 AM
Postfix as a mail server for domain LJ151 Linux - Software 2 07-16-2004 03:53 PM
Sendmail, domain routing to Postfix (Problems) dholingw Linux - Newbie 0 05-03-2004 11:27 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:56 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration