Benches Networking

14

Mail not playing nice with 3rd party SPAM filter

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

We just got ourselves an evaluation unit of a Barracuda Spam Firewall, which is also a Spamassassin ClamAV solution, but with a much more elegant web based UI. I spent several days playing with and configuring the Barracuda before routing email through it.

Once email was set to route through it, all the email was getting "Deffered" on the Barracuda. Now I know this isn't the place for Barracuda tech support, but I truly believe the problem was our mail server. The SMTP log on our server kept reporting a "451 Server configuration error":

Mar 7 21:40:13 noahprecision postfix/smtpd[1292]: NOQUEUE: reject: RCPT from unknown[67.137.191.69]: 451 Server configuration error; from=<[email protected]> to=<pwharff#noahprecision.com> proto=SMTP helo=<mail>
Mar 7 21:40:13 noahprecision postfix/cleanup[1481]: D863575272D: message-id=<[email protected]>
Mar 7 21:40:13 noahprecision postfix/smtpd[1505]: disconnect from unknown[67.137.191.69]
Mar 7 21:40:13 noahprecision postfix/qmgr[880]: D863575272D: from=<[email protected]>, size=863, nrcpt=1 (queue active)

I am convinced that some setting on the mail server is rejecting email to come from the barracuda and have looked over "main.cf" for any clues. I've searched this discussion board and all over Google and was on tech support with Barracuda for many hours and they couldn't figure it out.

Both the Barracuda and Mail server have public IP addresses, so I need to ALLOW email to come from the IP and/or domain name of our Barracuda.

Thank you in advance for any help!

14 replies

Sign in or join Beachball Help to reply.

  1. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I did find some info here, but not sure if it applies to me:

    http://discussions.apple.com/thread.jspa?messageID=2967011&#2967011

    Just want to make sure I do it right this time so that I don't have to wait for DNS propagation.

  2. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I followed the instructions below originally posted by UptimeJeff and they worked flawlessly. Thanks again Jeff for your help, you truly are one of the best OS X mail admins around (along with Alex too ofcourse!)

    Paul Wharff wrote:
    Change your public DNS, replace the lower MX record with the host name
    of the barracuda. This will deliver mail to the barracuda first and your
    backup server (if you have one) second. No point in listing your real
    server's host name as an MX because port 25 will be blocked.

    Then... Block port 25 at your firewall except when the source is the IP
    of the barracuda.

    With port 25 blocked, you'll have some other config changes which would
    make sense.

    - Disable content filtering in your OS X Server
    - Disable smtpdclientrestrictions
    - Alt SMTP Port. If you have users who relay through your server, you'll
    need to open an alternate port (587 is the standard) so they can
    continue relaying.

    I haven't listed any specific directions here, too many options (and too
    little time). Work through what you can and post questions as you have
    them.

    Jeff

  3. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Also, I forgot to disable "Content Filtering" but everything still seems to be working properly.

    Is it Ok? Since both systems use Spamassassin and ClamAV, can this cause problems or is it better for an added layer of protection?

  4. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Also, I forgot to disable "Content Filtering" but everything still seems to be working properly.

    No harm, but certainly overkill. I'd turn it off on your Server.

  5. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Thanks Alex.

    A newer problem (not really a problem but rather annoying). Even though I changed my DNS mx to point to the Barracuda's public IP address, some SPAM is just bypassing the Barracuda/ignoring the DNS and going directly to the mail servers public IP.

    What can I change so that our email server only accepts incoming email from the Barracuda?

    Also, it could be that the DNS hasn't fully propagated yet?

    Message was edited by: Paul Wharff

  6. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    This really depends on your setup/network layout.
    Can be done at the firewall/router or postfix level. Firewall is preferable. If you can't we'll take it from there.

    Don't count on DNS for this. Spammers will find your mail server anyway.

  7. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Both mail server and barracuda are in the DMZ. The mail server ofcourse uses the Firewall service NAT'd with 2 NICs and am blocking port 25 and using 587. I would like to use both methods if possible.

  8. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    If you are blocking port 25 on your mail server, no mail should get to it in the first place. Are you sure the firewall rules are OK? There is absolutely no need to modify the postfix configuration if port 25 is not accessible from the outside.

    You should make sure, port 587 accepts only mail from your internal network or authenticated users, but that's about it (although spam for time being only arrives on port 25).

  9. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Could you try to telnet to my server on port 25 and see what you get? All networks that I have access to are in my trusted networks.

    telnet mail.noahprecision.com 25

  10. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I just did a port scan from a remote system and it sees port 25 open even though in SA under firewall I have port 25 closed! Maybe my firewall is jacked-up?

  11. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    This is the error I get when I make any changes to my firewall:

    Mar 12 09:37:50 noahprecision /usr/sbin/serveradmin: servermgr_ipfilter:ipfw config:Error:Failure code returned by ipfw command: 64, message: 'Line 47: missing dst addressn'
    Mar 12 09:37:50 noahprecision /usr/sbin/serveradmin: servermgr_ipfilter:ipfw config:Error:The invalid rule and all subsequent rules were skipped.

    Also, in Server Admin the firewall rule blinks with an "Exclamation Mark" and says there was an error and to check the log (above).

  12. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Pull down the box off the network -- to allow me to quickly knock a box off a network, I usually set up a "offline" location with the Ethernet network controllers turned off and select it as needed in the Preferences - Network panel -- and I'd probably then first poke around in the ipfw configuration files and plists (/etc/ipfilter) to see if I could locate the error, and (if not) would then look to wipe and reset the ipfw rules to default, and start anew.

    Here's a previous discussion with how to wipe your rules and restart:

    http://discussions.apple.com/thread.jspa?threadID=1400144&tstart=45

    That IPFW reset sequence probably works for both Leopard server and Tiger server. Check the Command Line manual and other such for related goodness.

  13. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Yep I can telnet in just fine.

    telnet mail.noahprecision.com 25
    Trying 67.137.191.66...
    Connected to ns1.noahprecision.com.
    Escape character is '^]'.
    220 mail.noahprecision.com ESMTP Postfix

  14. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Not sure why you are using the OS X Firewall in the first place? I would do this at your router/hw firewall.