Hi everyone, Im new to postfix (kinda) and am having a problem with a new install of the postfix software. This server is to act as a mail gateway with my exchange server. I already have a script pulling recipients from ldap, so that part is out of the way. I seem to be at the last hurdle, which has something to do with transport. Although I have configured the transport db to point to my internal mail server, postfix is still using dns to lookup up the domain and trying to deliver the mail to the IP asssociated with the domain name. I'll illustrate in my logs below... I changed IP and hostname information. From maillog - Apr 28 12:01:56 myhost sendmail[19444]: m3SJ1tU5019444: [email protected], ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30044, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (m3SJ1un1019445 Message accepted for delivery) Apr 28 12:01:56 myhost sendmail[19447]: m3SJ1un1019445: to=<[email protected]>, ctladdr=<[email protected]> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120337, relay=myfirstdomain.com. [12.47.x.x], dsn=5.0.0, stat=Service unavailable In the bolded part seems to be the problem. My transport table specifically says myfirstdomain smpt:[172.16.x.x], yet it still tries to relay to the domain name, and it is getting the correct DNS info for the domain, not that matters. This server is the primary MX for "myfirstdomain.com". What am I doing wrong? Does anyone have any ides? (yes this domain is in the "mydestinations" section of my main.cf Any help will be appreciated! Blaine
That is where you are wrong, the domain name should NOT be in mydestinations, it should be in relay_domains because the mail is not destined for that machine it is destined for another machine meaning it is going to be relayed.
Still doesnt work Thanks for the idea. Seemed logical, but it didnt work. Previously, relay_domains = $mydestinations I took "myfirstdomain.com" out of mydestinations and added it to relay_domains, and removed $mydestinations from relay_domains, so it looked like this relay_domains = myfristdomain.com Reloaded postfix configuration, but still had the same results. It still appears as thought it is not using the transport db (transport_maps = hash:\etc\postfix\transport) Perhaps I should have added that I currently have this running properly on an older system using postifx 2.0.11 (configured by an admin who is no longer with the company). I am trying to upgrade to newer hardware/software and am using postfix 2.1.5 on the new system. I attempted to mirror the configuration as best I could, but I cannot seem to get postfix to use the trasnport map... Any other ideas? Any other ideas?
output of postconf -n alias_maps = hash:/etc/postfix/aliases command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix debug_peer_level = 2 header_checks = regexp:/etc/postfix/header_checks html_directory = no inet_interfaces = all local_recipient_maps = hash:/etc/postfix/recipients mail_owner = postfix mail_spool_directory = /var/spool/mail mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost, mydomain = myfirstdomain.com myhostname = mail3.myfirstdomain.com newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.:1.5/README_FILES relay_domains = myfirstdomain.com sample_directory = /usr/share/doc/postfix-2.1.5/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtpd_banner = $myhostname ESMTP smtpd_helo_required = yes smtpd_helo_restrictions = reject_invalid_hostname smtpd_sender_restrictions = reject_non_fqdn_sender reject_unknown_sender_do main transport_maps = hash:/etc/postfix/transport unknown_local_recipient_reject_code = 550 Is this enough? Or do you wan the output of postmap without options? Thanks again for the help!
Actually i have just checked something it seems like you are running sendmail not postfix as per what the logs are saying. use the alternatives command to make sure postfix is the default mta and stop any running sendmail processes.
Worked!! Thanks so much! It was right in front of my face and I didnt even notice it.... I made postfix the primary in manual mode throough alternatives and it worked.... Now, I have one other question - Im not very familiar with the use of alternatives. Will this setting hold if I reboot the system? Do I need to make any changes to init.d or anything else? Or, can I modify alternatives to give postfix the higher priority over sendmail and set it back to auto? Thanks again for your help!
alternatives will persist through reboots, but to be on the safe side Code: chkconfig sendmail off as well