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=<>, relay=none, delay=4524, delays=4524/0.01/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to[]:25: Can't assign requested address)

Open in new window

Where should I begin to send you sufficient data to help fix?
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 file that it has instead of 'localhost', something like this:

inet_interfaces =
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 and attempted to start the service.  This time it returned
Failed to start Postfix : 

Open in new window

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_protocols       ipv4
mydestination       $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain      (This is the hostname if I ping 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_style       class
myorigin       $mydomain
relay_domains       reject_non_fqdn_recipient
smtpd_delay_reject       no
smtputf8_enable       no
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?
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook 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 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 iNet_interfaces and changed it to private IP  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=<>, relay=none, delay=19229, delays=19229/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to[1<wbr ></wbr><wbr ></wbr><wbr ></wbr>82]:25: No route to host)
May 14 10:30:36 mail postfix/qmgr[20076]: 70FE2B1A85: from=<<wbr ></wbr><wbr ></wbr>>, size=771, nrcpt=1 (queue active)
May 14 10:30:36 mail postfix/error[31435]: 70FE2B1A85: to=<>, relay=none, delay=82447, delays=82447/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to[<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

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 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.
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       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 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 40 chars, ret=-1
 *traceroute: sendto: No route to host
traceroute: wrote 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.
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 ( or something? Any firewall in place blocking things? Maybe disable the local firewall on your OpenBSD if it's enabled (#pfctl -d)...

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.
Zephyr ICTCloud ArchitectCommented:
It could also mean that your public IP-address has a bad reputation, you can check this at to see what/if any issues show up ...
miketech99Author Commented:
No records exist is what it says.  All checkmarks are green for
Zephyr ICTCloud ArchitectCommented:
Hmmmm difficult to say, can you try other destinations?
I'll have another think about it all tapped out for today.
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 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!
Zephyr ICTCloud ArchitectCommented:
Sweet, that's great to hear ... Thanks for the follow up!
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

From novice to tech pro — start learning today.