pfSense Gold Subscription

Author Topic: Postfix - antispam and relay package  (Read 84909 times)

0 Members and 1 Guest are viewing this topic.

Online marcelloc

  • Hero Member
  • *****
  • Posts: 9951
    • View Profile
Re: Postfix - antispam and relay package
« Reply #225 on: May 21, 2012, 08:38:44 am »
But when I connect from other webclient like http://www.mail2web.com I got the following logs:

This log means that you are using postscreen and he is doing his job, first connect of each ip after service start(on boot for example) will be rejected, next connections from this ip will be accepted.

att,
Marcello Coutinho

Online marcelloc

  • Hero Member
  • *****
  • Posts: 9951
    • View Profile
Re: Postfix - antispam and relay package
« Reply #226 on: May 21, 2012, 08:40:23 am »
This is the log that I getting while want to send emails through Webclient:
May 21 13:00:33 pfsense postfix/smtpd[55803]: lost connection after AUTH from localhost[127.0.0.1]

I did not included any authentication feature to this package yet. If you have this config on other server, just paste postfix authentication options on custom field at gui.

att,
Marcello Coutinho

Offline nahid

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: Postfix - antispam and relay package
« Reply #227 on: May 21, 2012, 08:45:36 am »
Marcello,

I am getting emails through my Internal Mail Server IP and unable to get those emails through external email server such as 94.55.59.130 or mail2.sesric.org. When I configure Outlook with local mail server ip with 10.10.1.5 it works but it doesn't worh with external ip. Thats the problem I am facing. I can only get email in office but unable to get them at home.

best regards,
Nahid

Online marcelloc

  • Hero Member
  • *****
  • Posts: 9951
    • View Profile
Re: Postfix - antispam and relay package
« Reply #228 on: May 21, 2012, 09:05:38 am »
nahid,

This package is just a mail forwarder with antispam features, it will not replace your internal server, if you need external access to your internal server, use a nat rule for it on another ip/port and leave postfix filtering messages from internet to your internal server.

att,
Marcello Coutinho

Offline nahid

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: Postfix - antispam and relay package
« Reply #229 on: May 21, 2012, 09:23:32 am »
Marcello,

My problem is that I can access from Webclient like mail2web and send mail via my mailserver but unable to connect through mail my external outgoing mail server. Thats problem I am getting. My incoming and outgoing server is same. Thats why I cant change to access from external through another IP.

best regards
Nahid

Online marcelloc

  • Hero Member
  • *****
  • Posts: 9951
    • View Profile
Re: Postfix - antispam and relay package
« Reply #230 on: May 21, 2012, 09:27:59 am »
My incoming and outgoing server is same. Thats why I cant change to access from external through another IP.

Create a nat from external port 587 redirecting it to your internal server. This way you can use auth to send email to your internal server.

att,
Marcello Coutinho

Offline nahid

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: Postfix - antispam and relay package
« Reply #231 on: May 21, 2012, 09:32:36 am »
This is the log when I choose my external mail server ip:

May 21 17:33:33 pfsense postfix/postscreen[16712]: CONNECT from [127.0.0.1]:7002
May 21 17:33:39 pfsense postfix/postscreen[16712]: PASS OLD [127.0.0.1]:7002
May 21 17:33:39 pfsense postfix/smtpd[30639]: connect from localhost[127.0.0.1]
May 21 17:33:39 pfsense postfix/smtpd[30639]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 450 4.7.1 <ABUNASER>: Helo command rejected: Host not found; from=<anhuda@sesric.org> to=<networkadmin@sesric.org> proto=ESMTP helo=<ABUNASER>
May 21 17:33:39 pfsense postfix/smtpd[30639]: disconnect from localhost[127.0.0.1]
May 21 17:34:39 pfsense postfix/postscreen[16712]: CONNECT from [127.0.0.1]:58545
May 21 17:34:39 pfsense postfix/postscreen[16712]: PASS OLD [127.0.0.1]:58545
May 21 17:34:39 pfsense postfix/smtpd[30639]: connect from localhost[127.0.0.1]
May 21 17:34:39 pfsense postfix/smtpd[30639]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 450 4.7.1 <ABUNASER>: Helo command rejected: Host not found; from=<anhuda@sesric.org> to=<networkadmin@sesric.org> proto=ESMTP helo=<ABUNASER>
May 21 17:34:39 pfsense postfix/smtpd[30639]: disconnect from localhost[127.0.0.1]

Even I couldn't send between my networks.

Nahid

Offline nahid

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: Postfix - antispam and relay package
« Reply #232 on: May 21, 2012, 09:38:20 am »
Marcello,

I will try with 587 port. But could you please look over the logs I posted. Even I want to send emails between my network it rejected as "Helo command rejected: Host not found; from=<anhuda@sesric.org> to=<networkadmin@sesric.org> proto=ESMTP helo=<ABUNASER>"

But my domain is sesric.org. Even I have passed my network by given 10.10.1.0/24 to my client access list. ıs there anything wrong with the config?

Nahid

Offline nahid

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: Postfix - antispam and relay package
« Reply #233 on: May 21, 2012, 11:22:32 am »
Marcello,

When I uncheck "Use SMTP Authentication" I get the following logs:

May 21 19:23:28 pfsense postfix/postscreen[8009]: CONNECT from [127.0.0.1]:29580
May 21 19:23:28 pfsense postfix/postscreen[8009]: PASS OLD [127.0.0.1]:29580
May 21 19:23:28 pfsense postfix/smtpd[3010]: connect from localhost[127.0.0.1]
May 21 19:23:28 pfsense postfix/smtpd[3010]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 450 4.7.1 <sesric.org?[10.10.1.254]>: Helo command rejected: Host not found; from=<networkadmin@sesric.org> to=<anhuda@sesric.org> proto=ESMTP helo=<sesric.org?[10.10.1.254]>
May 21 19:23:28 pfsense postfix/smtpd[3010]: lost connection after RCPT from localhost[127.0.0.1]
May 21 19:23:28 pfsense postfix/smtpd[3010]: disconnect from localhost[127.0.0.1]

And I think it is something wrong with my config that is not going to accept my domain name. Because here also I just tried to send mail inside my domain.

Best regards,
Nahid

Online marcelloc

  • Hero Member
  • *****
  • Posts: 9951
    • View Profile
Re: Postfix - antispam and relay package
« Reply #234 on: May 21, 2012, 01:42:29 pm »
Helo command rejected: Host not found; from=<networkadmin@sesric.org> to=<anhuda@sesric.org> proto=ESMTP helo=<sesric.org?[10.10.1.254]>

This is your error.

Change your client helo info to a valid dns name(internal or external).

If you want, you can disable the helo check on antispam settings too.(I do not recomend, but in some cases this is the easier way to workaround misconfigured servers)

att,
Marcello Coutinho

Offline nahid

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: Postfix - antispam and relay package
« Reply #235 on: May 21, 2012, 02:14:45 pm »
Marcello,

As you recommend to use helo. In the doamin tab I wrote my domain name as "sesric.org" and the internal ip 10.10.1.5. My mail server is "mail2.sesric.org". So do I need to change my domain with mail server.  Or how can I convert helo to a valid dns name with Internal / External mail server name.

Best regards,
Nahid

Online marcelloc

  • Hero Member
  • *****
  • Posts: 9951
    • View Profile
Re: Postfix - antispam and relay package
« Reply #236 on: May 21, 2012, 03:35:07 pm »
Marcello,

As you recommend to use helo. In the doamin tab I wrote my domain name as "sesric.org" and the internal ip 10.10.1.5. My mail server is "mail2.sesric.org". So do I need to change my domain with mail server.  Or how can I convert helo to a valid dns name with Internal / External mail server name.


No domain tab modification is required. Each smtp client has it's own config options. I have no idea how to fix the helo info on your client.

Offline nahid

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: Postfix - antispam and relay package
« Reply #237 on: May 21, 2012, 03:51:25 pm »
Marcello,

After inspecting Postfix configuration I added myhostname and smtpd_banner through which I solved the rDNS. Now I get the real mail server name when I connect through telnet over 25 port.

Actually here I think there is something unusual with my webclient as always it tries to connect through 127.0.0.1. Every time I tried to connect through webclient I inspect the logs of postfix shows that it tries to connect from 127.0.0.1. If I make a port forward on 25 where the source address would be the localhost(127.0.0.1) and forward them to Internal mail server (10.10.1.5) will it work?

What do you think? If I do so will cause any problem on postfix?

Nahid

Offline nahid

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: Postfix - antispam and relay package
« Reply #238 on: May 22, 2012, 01:46:56 am »
From yesterday I am getting the following error and unable to get emails.

(mail for [10.10.1.5] loops back to myself) It bounced the emails.

Need help.

Offline RobinGill

  • Jr. Member
  • **
  • Posts: 33
    • View Profile
Re: Postfix - antispam and relay package
« Reply #239 on: May 22, 2012, 04:45:48 pm »
Hi Marcello,


Many thanks for the information! I've managed to get LDAP working - problem turned out to be a space in a user name. Just thought I would also mention that once the import has worked, I can see all the entries in the GUI when looking at view config/relay_recipients.

Also after reinstalling yet again it seems to be working perfectly! Thanks again for the package :)
« Last Edit: May 22, 2012, 09:01:08 pm by RobinGill »