LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-12-2011, 07:39 AM   #1
donty
LQ Newbie
 
Registered: Jun 2010
Posts: 6

Rep: Reputation: 0
Postfix won't stop doing MX lookups


Hi all

I have an odd issue with postfix 2.5.5 trying to relay email internally to a range of mail servers and it keeps ignoring the transport map [ ] and instead always doing mx lookups.

Essentially the server is only allowing connections from an internal network and only for certain domains that it will relay to other mail servers.

It has no local delivery and yet every time I get email passed to it, it will check the local network DNS server for MX information or with diable_dns_lookups enabled (as below) the A record for the domain, and try to deliver to that instead of the transport map destination.

Here's the main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
disable_dns_lookups = yes
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination =
myorigin = another.domain
local_recipient_maps =
local_transport = error:local mail delivery is disabled
relayhost =
mynetworks = 127.0.0.0/8, 192.168.70.0/24
parent_domain_matches_subdomains = debug_peer_list, smtpd_access_maps
relay_domains = test.domain.here
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
relay_recipient_maps =
inet_interfaces = all
recipient_delimiter = +
transport_maps = hash:/etc/postfix/transport
virtual_alias_maps = hash:/etc/postfix/virtual

Here is the transport_maps file:
/etc/postfix/transport
# test.domain.here
test.domain.here. smtp:[destination.mail.server]

Whether I put destination IP address or name in the transport file it is the same result.

I run the postmap command and hash the transport file, stop/start postfix after each change but it is still doing an MX lookup

I have now got to the worn grove stage and need some fresh input from smarter bunnies than me!

Can anyone help?

Thanks!
 
Old 04-12-2011, 09:40 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Could you please run 'ls -l /etc/postfix/transport*' ?
 
Old 04-13-2011, 03:40 AM   #3
donty
LQ Newbie
 
Registered: Jun 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for getting back to me. Output is:

-rw-r--r-- 1 root root 319 2011-04-12 17:34 /etc/postfix/transport
-rw-r--r-- 1 root root 12288 2011-04-12 17:34 /etc/postfix/transport.db

Which looks like at least read for postfix user/group.

As a mind refresher, I rebuilt a clean Debian box and started from scratch and still get the same result, so unless I have found some incredible new bug in postfix I must be messing up somewhere in my approach ;-)


Any more help very gratefully received...
 
Old 04-13-2011, 06:58 PM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
So postmap is probably working as expected, I know you've tried by ip address but could you modify the format slightly and retry ...

Code:
test.domain.here              :[<ip_address>]
thanks
 
Old 04-16-2011, 03:14 PM   #5
donty
LQ Newbie
 
Registered: Jun 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Sorry for the delay, will try removing the smtp statement and seeing if that works over the next day or so and will get back to let you know.

We are in the middle of a DC move at the moment, not a time to go looking for more stuff to do ;-)

Thanks for the suggestion.
 
Old 04-21-2011, 06:18 AM   #6
donty
LQ Newbie
 
Registered: Jun 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Hi Again

Just been playing with the format and the deciding factor seems to be the . at the end of the domain name.

domain.name.one. :[xxx.xxx.xxx.xxx]

domain.name.two :[xxx.xxx.xxx.xxx]

domain.name.three. :[mail.server.name]

domain.name.four :[mail.server.name]


Domain one will relay via MX, as will domain three. Domains two and four will forward to the ip or servername.

Not seen this mentioned on my travels on the various forums trawled through so hopefully this will help others to at least get some pointers.

Thanks very much for your help in this, never thought being precise with a DNS record would cause an adverse change in behaviour!
 
  


Reply



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
Stop relaying with postfix samnjugu Linux - Server 4 06-25-2010 07:21 AM
Postfix: Rewriting sender email address from ldap lookups endfx Linux - Server 3 04-18-2008 03:53 PM
LXer: Ie 7 won’t stop Firefox growth say users LXer Syndicated Linux News 0 05-10-2006 02:54 PM
Postfix LDAP lookups with Active Directory paul_mat Linux - Networking 1 11-02-2005 08:44 PM
Require PTR lookups for postfix paintcheck200 Linux - Networking 1 11-01-2004 03:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:39 AM.

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