Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-12-2011, 08:39 AM
|
#1
|
LQ Newbie
Registered: Jun 2010
Posts: 6
Rep:
|
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!
|
|
|
04-12-2011, 10:40 PM
|
#2
|
Senior Member
Registered: Aug 2009
Posts: 3,790
|
Could you please run 'ls -l /etc/postfix/transport*' ?
|
|
|
04-13-2011, 04:40 AM
|
#3
|
LQ Newbie
Registered: Jun 2010
Posts: 6
Original Poster
Rep:
|
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...
|
|
|
04-13-2011, 07:58 PM
|
#4
|
Senior Member
Registered: Aug 2009
Posts: 3,790
|
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
|
|
|
04-16-2011, 04:14 PM
|
#5
|
LQ Newbie
Registered: Jun 2010
Posts: 6
Original Poster
Rep:
|
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.
|
|
|
04-21-2011, 07:18 AM
|
#6
|
LQ Newbie
Registered: Jun 2010
Posts: 6
Original Poster
Rep:
|
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!
|
|
|
All times are GMT -5. The time now is 03:28 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|