The pfSense Store

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

0 Members and 1 Guest are viewing this topic.

Offline darklogic

  • Full Member
  • ***
  • Posts: 175
  • Karma: +0/-0
    • View Profile
Re: NEW Postfix antispam and relay package
« Reply #15 on: October 17, 2011, 12:08:10 pm »
Hello,

I must say I am glad to see this package. Mail proxies and mail forwarders with filtering is a must have these days. I am new to this package and was wondering if there is any documentation on how to configure and set it up for use. Some of the setting are unclear to me.

I am not sure what the binding setting is for the WAN, LAN, and loopback and can't find anything that explains it better or what basic settings should be set to. Also, when I removed my SMTP port forward form NAT and rules to use this package, I am having trouble recieving mails. I went to mxtoolbox.com and did a diagnostics test and I don't get a header response or anything. It just says host times out from inactivity.

I really did not change any of the default setting from the install and yes I did add the domain with a forwarding internal address.

Could someone help or post a basic setup that would get this working. It is a little hard to figure settings with no documentation or explinations of settings.

Thanks,

MDP

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 9983
  • Karma: +2/-0
    • View Profile
Re: NEW Postfix antispam and relay package
« Reply #16 on: October 17, 2011, 12:43:09 pm »
at docs.pfsense.com has some info but not so detailed.

the basic setup is:

  • remove nat from port 25
  • create a wan rule to permit smtp traffic to wan address
  • check enable postfix option
  • choose at least wan loopback interfaces
  • fill your domain/internal smtp info

Many options has recommend, default and link option to postfix documentation.

I recommend enable all antispam settings too.

att,
Marcello Coutinho
« Last Edit: October 17, 2011, 12:49:34 pm by marcelloc »

Offline darklogic

  • Full Member
  • ***
  • Posts: 175
  • Karma: +0/-0
    • View Profile
Re: NEW Postfix antispam and relay package
« Reply #17 on: October 17, 2011, 09:04:34 pm »
Hey thanks very much for the info. I will give a try. I really like the concept of this package and have waited a while to see something like this come out for pfsense, so thanks for all your hard work.

I do have one question for your response. When you say WAN loopback interface, do you mean select the WAN interface only, the loopback interface only, or both?

Thanks Again,

Offline darklogic

  • Full Member
  • ***
  • Posts: 175
  • Karma: +0/-0
    • View Profile
Re: NEW Postfix antispam and relay package
« Reply #18 on: October 17, 2011, 11:14:56 pm »
So I have e-mails forwarding ok now and thanks for the basic info for that. Just curious, as I seen in early to mid last month a post you made about mailscanner, and was wondering if this will become part of the base install of the postfix forwarder package?

Currently I am unsure how to implement this ability and not really sure on what the ACLs/Filter maps tab does.

If you made this package an all inclusive install with all the components needed for a full SMTP filter, that would be sweet.

Thanks

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 9983
  • Karma: +2/-0
    • View Profile
Re: NEW Postfix antispam and relay package
« Reply #19 on: October 18, 2011, 06:35:11 am »
Mailscanner + spamassassin will be released soon as a new package with more then 500 options to filter spam. As I told in other posts, I'm waiting Mailscanner package compilation by core team. But if you know how mailscanner works you can add freebsd package and configure it.

Can you feedback in % how postfix + all antispam settings reduced spam messages on mailboxes?


Offline darklogic

  • Full Member
  • ***
  • Posts: 175
  • Karma: +0/-0
    • View Profile
Re: NEW Postfix antispam and relay package
« Reply #20 on: October 18, 2011, 07:44:49 am »
Yeah, I will post some stats in a about a week. I will compare report files from our other filtering system and see what a rough % in reduction maybe. I can say that I have noticed a difference already just from last night when I enabled it. I am seeing a lot of RBLS blocks and invalide host address blocks. Normally this would get cought by our other filter, but not always for some reason.

For the most part, it seems to be working very well and I am excited for the Mailscanner package.

I have been playing around with the ACLs/Filter Maps section and was wondering if a manual blacklist block and whitelist allow will be added?

Thanks,

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 9983
  • Karma: +2/-0
    • View Profile
Re: NEW Postfix antispam and relay package
« Reply #21 on: October 18, 2011, 08:06:56 am »
The ACLs allow you to block or permit ips, subjects, atachments and Also filter message body.

Take a look at samples below each field.

Offline darklogic

  • Full Member
  • ***
  • Posts: 175
  • Karma: +0/-0
    • View Profile
Re: NEW Postfix antispam and relay package
« Reply #22 on: October 18, 2011, 09:52:39 am »
Ahhh yes, I am starting to understand how you are laying this out. This all makes sense now. I guess I have just been getting to use to check boxes and enable buttons way to much LOL.

Thanks again for the info.

Take Care

MDP

Offline mauricioniñoavella

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +0/-0
    • View Profile
Re: NEW Postfix antispam and relay package
« Reply #23 on: October 18, 2011, 09:56:00 am »
hello

marcelloc

I can confirm you this module can function as a relay host, thatis I work as an SMTP forwarder to an external mail Server using STARTTLS


I congratulate you for your great support for this great pauqete, Proxies and redirects mail, I'm new in this package I would like know if there is some configuration information, as a forwarder (SMTP) mail to an external Server "Outbound Relay Hosts"



Could anyone help me with the basic configuration to work as mail forwarder to an external server authentication through a little priest specified. It's a bit difficult to understand the configuration without documentation or configuration give some tics.

thanks for your collaboration
« Last Edit: October 18, 2011, 12:22:42 pm by mauricioniñoavella »

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 9983
  • Karma: +2/-0
    • View Profile
Re: NEW Postfix antispam and relay package
« Reply #24 on: October 18, 2011, 08:54:08 pm »
mauricioniñoavella,

The basic setup is already in this topic.
http://forum.pfsense.org/index.php/topic,40622.msg217539.html#msg217539

All features in postfix forwarder package was include after many hours reading official postfix documentation.

Many features in this packages, has samples or direct links to postfix website, take a look.

Also you have the options to see the result of gui setup in View confi files tab.

Some docs about SASL say that are many implementations for it in postfix, now I'm trying to find one compatible with pfsense.

see considerations on enabling TLS
http://www.postfix.org/TLS_README.html


Offline darklogic

  • Full Member
  • ***
  • Posts: 175
  • Karma: +0/-0
    • View Profile
Re: NEW Postfix antispam and relay package
« Reply #25 on: October 19, 2011, 11:20:23 am »
marcelloc

I have a e-mail that seems to be getting blocked, which I think is a false positive. Here is the log I get back. Note that I removed the actual domain name and IP.

postfix/smtpd[32719]: NOQUEUE: reject: RCPT from mail.example.org[XXX.XXX.XXX.XXX]: 450 4.7.1 <EX02.example.local>: Helo command rejected: Host not found; from=<someone@example.org> to=<someone@mydomain.com> proto=ESMTP helo=<EX02.example.local>


I added this filter rule in the header to allow. This did not seem to work, but when I added a different rule to REJECT a different domain name, it worked.

/^From:.*@example.org/ OK

Any idea on this?

Thanks,

MDP

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 9983
  • Karma: +2/-0
    • View Profile
Re: NEW Postfix antispam and relay package
« Reply #26 on: October 19, 2011, 05:03:34 pm »
The host that remote server announce on Helo smtp command Does not exist.

This is one of the header verification tests.

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 9983
  • Karma: +2/-0
    • View Profile
Re: NEW Postfix antispam and relay package
« Reply #27 on: October 20, 2011, 11:05:41 am »
Hi all,

Postfix compilation on x64 now includes cyrus-SASL2 and TLS.

who need or want to test it, reinstall or remove/install postfix package.

No changes in gui for this option. Include all your SASL and/or TLS config in custom main.cf options

att,
Marcello Coutinho

Offline darklogic

  • Full Member
  • ***
  • Posts: 175
  • Karma: +0/-0
    • View Profile
Re: NEW Postfix antispam and relay package
« Reply #28 on: October 21, 2011, 07:31:28 am »
marcelloc,

I am getting a lot of these messages and I have seen a lot of them that are from domains and users I know. What can I do to stop these false positives. Here is the message I recieve minus real IP and domain names.

postfix/smtpd[61721]: NOQUEUE: reject: RCPT from mail.someonesdomain.com[xxx.xxx.xxx.xxx]: 450 4.7.1 <CNASRV.CNA.local>: Helo command rejected: Host not found; from=<someone@someonesdomain.com> to=<user@mydomain.com> proto=ESMTP helo=<CNASRV.CNA.local>

Here is my configuration. I have messed around trying to find out what is causing it and had no luck.

ACL Filter MIME:
/^name=[^>]*\.(com|vbs|js|jse|exe|bat|cmd|vxd|scr|hlp|pif|shs|ini|dll)/ REJECT W do not allow files of type "$3" because of security concerns - "$2" caused the block.
/^Content-(Disposition|Type):\s+.+?(?:file)?name="?.+?\.(386|ad[ept]|drv|em(ai)?l|ex[_e]|xms|\{[\da-f]{8}(?:-[\da-f]{4}){3}-[\da-f]{12}\})\b/ REJECT ".$2" file attachment types not allowed

ACL Filter CIDR:My Internal Subnet xxx.xxx.xxx.xxx/24

Antispam:
Header Verification = strong

Zombie Blocker = Enabled with enforce

After greetins Test= all selected

Softbounce= enabled

RBL with = dnsbl.sorbs.net, bl.spamcop.net*2, dnslb.local*-5, cbl.abuseat.org, b.barracudacentral.org

RBL threshold = 1

SPF Check = Recomended setting

I have tried litteraly disabling everything and setting head check to basic to see if the messages would pass. I even added rules to the ACL filter list such as /^From:.*@someonesdomain.com OK

Is there something I can do? Do you have any suggestions?

Thanks,

MDP
« Last Edit: October 28, 2011, 12:29:28 pm by darklogic »

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 9983
  • Karma: +2/-0
    • View Profile
Re: NEW Postfix antispam and relay package
« Reply #29 on: October 21, 2011, 08:27:40 am »
As I told you last post, postfix is very judicious in header checks, so check your DNS server to see if this host announced by remote SMTP does exist or not.

You can also try to white-list this host in your local RBL and CIDR ACL.

I have many of these alerts too, but all of them are really spam or 'misconfigured' hosts.