Mail does not get trough Postfix

Questions and answers about how to do stuff
Post Reply
Justin
Posts: 111
Joined: 18 Sep 2014 13:00
Location: The Netherlands
Contact:

Mail does not get trough Postfix

Post by Justin »

Hi everyone,

I just set up a 3.0.0.8 EFA mailscanner as our second MX.
Sadly enough I can't get it working.

Everything is working, untill the e-mail reaches Postfix.
I have receive the following errors so far.

May 29 08:55:48 mx99 postfix/smtpd[27226]: NOQUEUE: reject: RCPT from smtp97.iad3a.emailsrvr.com[173.203.187.97]: 554 5.7.1 <xxx@xxx.xxx>: Recipient address rejected: Relay access denied; from=<xxx@xxx.xxx> to=<xxx@xxx.xxx.xxx> proto=ESMTP helo=<smtp97.iad3a.emailsrvr.com>

and:

May 29 08:48:48 mx99 postfix/smtpd[26449]: NOQUEUE: reject: RCPT from unknown[115.79.63.39]: 554 5.7.1 Service unavailable; Client host [115.79.63.39] blocked using zen.spamhaus.org; http://www.spamhaus.org/query/bl?ip=115.79.63.39; from=<xxx@xxx.xxx> to=<xxx@xxx.xxx> proto=ESMTP helo=<adsl.viettel.vn>

The error about spamhaus, is not that bad.
But the first one is the issue. It's not passing any email trought the system.

I've searched Google and this forum, but nothing helped so far.
Please help me out! :pray:

Kind regards,
Justin
User avatar
pdwalker
Posts: 1553
Joined: 18 Mar 2015 09:16

Re: Mail does not get trough Postfix

Post by pdwalker »

Have you configured the system to allow it to accept mail for that domain?

https://efa-project.org/wiki/Adding_mail_domains
Justin
Posts: 111
Joined: 18 Sep 2014 13:00
Location: The Netherlands
Contact:

Re: Mail does not get trough Postfix

Post by Justin »

pdwalker wrote:Have you configured the system to allow it to accept mail for that domain?

https://efa-project.org/wiki/Adding_mail_domains
Yes,

I did a copy-paste from our mx1, and pasted it in the new mx config file.
Or do i have to manually add them, with the link you provided?

Kind regards,
Justin
User avatar
pdwalker
Posts: 1553
Joined: 18 Mar 2015 09:16

Re: Mail does not get trough Postfix

Post by pdwalker »

How exactly did you configure postfix? I am not sure what you mean by "copy paste from mx1 to mx".

EFA is an appliance and is relatively simple to setup. Use EFA-Configure from those screen shots to configure postfix to accept mail for the domain.

Can you give me a block diagram of your mail system? For example, mine is

Internet <-> Firewall <-> EFA (port 25) <-> Exchange Server
Justin
Posts: 111
Joined: 18 Sep 2014 13:00
Location: The Netherlands
Contact:

Re: Mail does not get trough Postfix

Post by Justin »

pdwalker wrote:How exactly did you configure postfix? I am not sure what you mean by "copy paste from mx1 to mx".

EFA is an appliance and is relatively simple to setup. Use EFA-Configure from those screen shots to configure postfix to accept mail for the domain.

Can you give me a block diagram of your mail system? For example, mine is

Internet <-> Firewall <-> EFA (port 25) <-> Exchange Server
Hi,

I have not configured the hosts on the command line like in the guide you showed me.
I did the following: Webmin -> Postfix Mail Server -> Transport Mapping and copy pasted the hosts from our mx1 (leading MX) and pasted them in this one.
For some reason it is not working.

It's just a basic install with only those hosts added.

Mine is Internet -> Firewall -> EFA (port 25) -> Exchange Server

EDIT: I have just seen 2 emails trought the EFA. This is to our own Domain which is also defined as domain of the server:
mx99.domain.nl
So only those email are going trough. Any idea if this could give you any direction?

EDIT2:
I found out, only the 2 e-mail adress which have been added under de "E-mail adresses" at Greylist are going trough.
Please help me out :pray:

EDIT3:
Keep finding more.
May 29 16:05:01 mx99 sqlgrey: 2015/05/29-16:05:01 Can't connect to TCP port 2501 on localhost [Cannot assign requested address]#012 at line 88 in file /usr/share/perl5/vendor_perl/Net/Server/Proto/TCP.pm
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Mail does not get trough Postfix

Post by shawniverson »

Something is wrong with your greylisting. When you restart sqlgrey, you should see the following:
May 29 17:27:26 efa sqlgrey: 2015/05/29-17:27:26 sqlgrey (type Net::Server::Multiplex) starting! pid(26275)
May 29 17:27:26 efa sqlgrey: Using default listen value of 128
May 29 17:27:26 efa sqlgrey: Binding to TCP port 2501 on host localhost#012
May 29 17:27:26 efa sqlgrey: Setting gid to "500 500"
May 29 17:27:26 efa sqlgrey: Setting uid to "500"

Code: Select all

sudo service sqlgrey restart
Justin
Posts: 111
Joined: 18 Sep 2014 13:00
Location: The Netherlands
Contact:

Re: Mail does not get trough Postfix

Post by Justin »

shawniverson wrote:Something is wrong with your greylisting. When you restart sqlgrey, you should see the following:
May 29 17:27:26 efa sqlgrey: 2015/05/29-17:27:26 sqlgrey (type Net::Server::Multiplex) starting! pid(26275)
May 29 17:27:26 efa sqlgrey: Using default listen value of 128
May 29 17:27:26 efa sqlgrey: Binding to TCP port 2501 on host localhost#012
May 29 17:27:26 efa sqlgrey: Setting gid to "500 500"
May 29 17:27:26 efa sqlgrey: Setting uid to "500"

Code: Select all

sudo service sqlgrey restart
Still telling me something like: Cant connect to :2501
I will perform a reinstall to check if this fixes the issue.

After that i will reply here.
Justin
Posts: 111
Joined: 18 Sep 2014 13:00
Location: The Netherlands
Contact:

Re: Mail does not get trough Postfix

Post by Justin »

I just reinstalled the efa server with 3.0.0.8
SQLGrey is running and bind(ed)

It still shows:
Jun 1 16:13:16 mx99 postfix/smtpd[1050]: NOQUEUE: reject: RCPT from mail201.atl101.mcdlv.net[198.2.130.201]: 451 4.7.1 <xx@xxx.xx>: Recipient address rejected: Greylisted for 5 minutes; from=<bounce-mc.us2_4053370.1603233-info=xxx.xxx@mail201.atl101.mcdlv.net> to=<xxx@xxx.xxx> proto=ESMTP helo=<mail201.atl101.mcdlv.net>

The only logfile im aware pf is /var/log/maillog
Are there other logfiles i can check?

I have added the mail hosts which are "whitelisted" in de EFA Shell. But they are not shown at SQLGrey, but i dont know if thats normal.

So my questions are:
- Any idea what's going wrong.
- Are there other logfile i can check
- Why are the whitelisted hosts rejected?
User avatar
pdwalker
Posts: 1553
Joined: 18 Mar 2015 09:16

Re: Mail does not get trough Postfix

Post by pdwalker »

That looks like it is working.

After 5-15 minutes, does the mail come through?
Justin
Posts: 111
Joined: 18 Sep 2014 13:00
Location: The Netherlands
Contact:

Re: Mail does not get trough Postfix

Post by Justin »

pdwalker wrote:That looks like it is working.

After 5-15 minutes, does the mail come through?
Since it's a failover machine, it's not activly scanning.
Our mx01 is primary.

I thought SQLGrey was bouncing the emails, but is was just working as i'm reading your comment.

It just did 2 emails, so i guess that means it working.
I will check it out for a couple of days and report back.

One more question: The rejeceted message, does that mean the mail gets bounced? Or does it retry after a couple of minutes.
User avatar
darky83
Site Admin
Posts: 540
Joined: 30 Sep 2012 11:03
Location: eFa
Contact:

Re: Mail does not get trough Postfix

Post by darky83 »

The connection is rejected the first time, so the 'sending' mailserver can not deliver the mail and thus will queue the mail and try again later.
Version eFa 4.x now available!
User avatar
pdwalker
Posts: 1553
Joined: 18 Mar 2015 09:16

Re: Mail does not get trough Postfix

Post by pdwalker »

Justin wrote:One more question: The rejeceted message, does that mean the mail gets bounced? Or does it retry after a couple of minutes.
Greylisting means that the efa server temporarily rejects the message for first time senders.

If the sending mailserver is a "good" mailserver, then the mail will be re-queued and resent. EFA will recognize the sender the second time and let the message through. It will also "autowhitelist" the server/sender at some point so that future mails are not rejected.

If the server is a "spamming" server, then the spammer is unlikely to resend the message, thus you don't get the spam. This cuts down on a lot of spam.

Does that make more sense?
Justin
Posts: 111
Joined: 18 Sep 2014 13:00
Location: The Netherlands
Contact:

Re: Mail does not get trough Postfix

Post by Justin »

Thanks for the quick and helpfull support!
It is fully functional :D

Keep up the good work :clap:
Post Reply