Not able to send mail from postfix on openbsd

I am setting up postfix for the fist time and in a jam.  The following is the error message:

May 14 06:25:31 mail postfix/error[17751]: 163CEB1A85: to=<name@todomain.gov>, relay=none, delay=4524, delays=4524/0.01/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to todoamin.gov[166.90.54.70]:25: Can't assign requested address)

Open in new window


Where should I begin to send you sufficient data to help fix?
LVL 6
miketech99Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Zephyr ICTCloud ArchitectCommented:
Did you check the main.cf file that it has 127.0.0.1 instead of 'localhost', something like this:

inet_interfaces = 127.0.0.1
0
miketech99Author Commented:
Thank you for the reply.  I made that change and attempted to apply the changes by restarting the postfix services.  The service is stopped and when I now start the service it returns
"postsuper: warning: smtputf8_enable is true, but EAI support is not compiled in"

Open in new window



It does not display anything after "in".  

I added smtputf8_enable = no to the main.cf and attempted to start the service.  This time it returned
Failed to start Postfix : 

Open in new window


main.cf

non-default parameters
append_dot_mydomain       yes
broken_sasl_auth_clients       yes
compatibility_level       2
debugger_command       PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
ignore_mx_lookup_error       yes
inet_interfaces       127.0.0.1
inet_protocols       ipv4
mydestination       $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain       mail.dmz.PublicDoamin.org      (This is the hostname if I ping 10.10.251.8 from in the network)
myhostname       mail.publicDomainorg        (This is the hostname with a public IP address and is not reachable from internal network since it points to public IP)
mynetworks       168.100.189.0/28, 127.0.0.0/8, 10.10.0.0/16, 192.168.100.0/24, 192.168.101.0/24
mynetworks_style       class
myorigin       $mydomain
relay_domains       reject_non_fqdn_recipient
smtpd_delay_reject       no
smtpd_sasl_security_options       
smtputf8_enable       no
0
Zephyr ICTCloud ArchitectCommented:
The smtputf8 warning is a known "bug" the workaround you implemented does make it work normally, another option is to reinstall/compile Postfix with EAI support (if you didn't before)... It also exists for FreeBSD

Also, maybe it's from pasting it into EE but that line with "non-default parameters" should not be there (on a separate line that is)...

Might there be more info in the logs?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

miketech99Author Commented:
May 14 09:48:33 mail postfix/postfix-script[30146]: starting the Postfix mail system
May 14 09:48:33 mail postfix/master[20171]: fatal: bind 127.0.0.1 port 25: Address already in use
May 14 09:48:34 mail postfix/master[30414]: fatal: daemon initialization failure
May 14 09:48:35 mail postfix/postfix-script[23251]: fatal: mail system startup failed

So I have removed 127.0.0.1 iNet_interfaces and changed it to private IP 10.10.251.8.  The service is now started.

Sending email now consist of a "no route to host"?  
May 14 10:30:36 mail postfix/error[19513]: 70805B1A88: to=<name@sendingTO.gov>, relay=none, delay=19229, delays=19229/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to cmailb.sub.fromdomain.gov[1<wbr ></wbr><wbr ></wbr>66.67.65.1<wbr ></wbr>82]:25: No route to host)
May 14 10:30:36 mail postfix/qmgr[20076]: 70FE2B1A85: from=<email@fromdomain.gov<wbr ></wbr><wbr ></wbr>>, size=771, nrcpt=1 (queue active)
May 14 10:30:36 mail postfix/error[31435]: 70FE2B1A85: to=<name@sendingTO.gov>, relay=none, delay=82447, delays=82447/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to cmailb.sub.fromdomain.gov[<wbr ></wbr>x<wbr ></wbr>xx.x.x.x.x<wbr ></wbr>]:25: No route to host)
May 14 10:32:57 mail postfix/scache[28667]: statistics: start interval May 14 10:29:36
May 14 10:32:57 mail postfix/scache[28667]: statistics: domain lookup hits=0 miss=2 success=0%
May 14 10:32:57 mail postfix/scache[28667]: statistics: address lookup hits=0 miss=2 success=0%

Open in new window

0
Zephyr ICTCloud ArchitectCommented:
Ah, I see the address was already in use ... ok

The "no route to host" is another cookie ...

Some things to try and test:

Perform a "netstat -lnp | grep :25" to check for duplicate ports.

Comment out the SASL entries in the main.cf file, that has proven to cause this error message sometimes.
I trust your DNS is working properly?

You can try a traceroute to the end client to see if you run into routing issues.

Are you using a relay host? I'm not seeing it in the config so probably not.

Make sure port 25 isn't blocked by your ISP

Test if you can telnet/netcat to port 25 of the host you're trying to send mail to.
0
miketech99Author Commented:
I executed netstat -l and -n just fine.  netstat -p 25 did not work.

Active Internet connections
Proto   Recv-Q Send-Q  Local Address          Foreign Address        (state)
tcp          0     52  10.10.251.8.22         10.10.251.1.6836       ESTABLISHED


# netstat -p :25
netstat: :25: unknown protocol
# netstat -p 25
netstat: 25: unknown protocol

I commented out 4 lines with SASL.
It could be a DNS problem.  However, it may not.  nslookup google.com came up with desired results.  Pinging google with the IP or hostname did not work. Also traceroute returns
traceroute: sendto: No route to host
 5 traceroute: wrote gmail.com 40 chars, ret=-1
 *traceroute: sendto: No route to host
traceroute: wrote gmail.com 40 chars, ret=-1

25 isn't blocked.

If I telnet to that host(s) it returns the message Can't assign requested address.  Interesting.
0
Zephyr ICTCloud ArchitectCommented:
Ok, so it seems there's something blocking your way out ... Can you ping your gateway? Can you do a traceroute to something else, like Google DNS (8.8.8.8) or something? Any firewall in place blocking things? Maybe disable the local firewall on your OpenBSD if it's enabled (#pfctl -d)...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
miketech99Author Commented:
I am now able to ping destinations after locating a file with the default gateway.  It was not using the correct gateway.

Error logs now displays "refused to talk to me: 554" and"Your access to this mail system has been rejected due to the sending MTA's poor reputation. If you believe that this failure is in error, please contact the intended recipient via alternate means."
 I think this is due to DNS not resolving; however, it does.  I get a hostname if I do a nslookup either on IP or domain.
0
Zephyr ICTCloud ArchitectCommented:
It could also mean that your public IP-address has a bad reputation, you can check this at http://mxtoolbox.com/SuperTool.aspx to see what/if any issues show up ...
0
miketech99Author Commented:
No records exist is what it says.  All checkmarks are green for mail.domain.org.
0
Zephyr ICTCloud ArchitectCommented:
Hmmmm difficult to say, can you try other destinations?
I'll have another think about it all tapped out for today.
0
miketech99Author Commented:
The MTA 554 error was a firewall problem.  Strange.   Thank you for the assistance you provided in each thread. You really nailed it!

I even got MX records working in DNS.  However reverse DNS does not work.  If I do a simple nslookup on another network it works; however, running test from sites like mxtoolbox.com fails.  I will open a separate question regarding the wall I ran into with the reverse DNS.  

I'm happy now the new PostFix server now sends mail!
0
Zephyr ICTCloud ArchitectCommented:
Sweet, that's great to hear ... Thanks for the follow up!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.