This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

My SMTP Rules are not being applied !!!

Hello all,

I have setup my SMTP rules for example not to allow any message that contains "football" to be sent. But my mail client (Outlook express) is sending these messages ignoring my rule ! Any idea ?


This thread was automatically locked due to age.
  • 2010:02:18-15:52:32 ***xx-1 exim[25044]: 2010-02-18 15:52:32 SMTP connection from [xx.xx.xx.xx]:63458 (TCP/IP connection count = 1)
    2010:02:18-15:52:32 ***xx-1 exim[7563]: 2010-02-18 15:52:32 [xx.xx.xx.xx] F= R= Accepted: from relay
    2010:02:18-15:52:32 ***xx-1 exim[7563]: 2010-02-18 15:52:32 1Ni8g4-0001xz-2r xx@yy.net H=xx@xx.org [xx.xx.xx.xx]:63458 P=esmtp S=1216 id=DC52F700-DDC5-439C-AC19-ED0F91C84868@***.net
    2010:02:18-15:52:32 ***xx-1 exim[7563]: 2010-02-18 15:52:32 SMTP connection from xx@xx.org [xx.xx.xx.xx]:63458 closed by QUIT
    2010:02:18-15:52:34 ***xx-1 smtpd[24974]: QMGR[24974]: 1Ni8g4-0001xz-2r moved to work queue
    2010:02:18-15:52:40 ***xx-1 smtpd[7571]: SCANNER[7571]: id="1001" severity="info" sys="SecureMail" sub="smtp" name="email quarantined" srcip="xx.xx.xx.xx" from="xx@yy.net" to="***@***.com" subject="Test" queueid="11ic67-0001xz-2r" size="5"" reason="exp" extra="****"
    2010:02:18-15:53:00 ***xx-1 exim[7614]: 2010-02-18 15:53:00 Start queue run: pid=7614

    The address I sent this to was a yahoo.com account, however any outgoing emails containing expressions configured in the expressions list are captured by the mail manager.  extra="****" contained the banned expression.
  • Arrgghhh! - I have an 'Exception' that I had totally forgotten about!  Darren, you are 100% correct!

    Now that I found that, I remember that I put it in because the Astaro captures the email, but doesn't bounce the mail back or even tell the sender.

    I have several threads over the last months that I need to correct.  I'm glad I participated here!

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • I thought I was going crazy there for a while [:D]  Good to see the feature is working for others.

    I did expect the captured outgoing emails to be in my daily spam report but they're not there.  So you are indeed correct that the sender would have no idea that the email had not been sent.  Feature request for Astaro methinks.
  • In earlier versions, Astaro used the SpamAssassin engine, and that did do a complete spam analysis on outbound mail.  With the new TrustedSource engine, no SpamAssassin-type of scoring is done, so the only anti-spam scan is the expression filter.  The documentation and on-screen notes should be changed.

    You're right about that.  Maybe you could add a feature request at Astaro Gateway Feature Requests.

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • hey Bob,

    By turning the DNAT off, I cannot receive any email to my email server.

    But I can compose messages and they are not checked for spam as you mentioned.

    Any Idea ?

    You wanna team viewer my machine to see what the heck I'm doing wrong [:D]
  • When you turned the DNAT off, did you, on the 'Routing' tab, change 'Route by:' to "Static host list" and put "Mail1/222" in the 'Host list'?

    Since your outbound emails don't show the AntiVirus footer, I guess that your emails are not going through the proxy.  You should remove your packet filter rule that opens the SMTP port, and add your mail server to 'Allowed hosts/networks' in the 'Host-based relay' section on the 'Relaying' tab.

    I don't do teamviewer, but if you want me to look at your Astaro, click on my name beside my avatar and email me.

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Yes. I have changed that to Mail1/222


    Here is a snap of my rules, do I need to remove the ANY==> ANY==>ANY ?
    I will give this a try.


    here is a snap of my rules...I know it doesn't look very secure, but this is for testing only [:)]


  • Definitely get rid of Any -> Any -> Any.

    Also, the Astaro is a stateful firewall.  That means that it tracks connections so, with a very few possible exceptions, you don't need to allow inbound packets - Astaro knows what traffic is a response to a request it has sent, and it allows that while blocking unrequested packets.  That means that you should replace "Any" as the 'Source' in your Packet Filter rules with "Internal (Network)".

    There is something wrong with your mail configuration.  I think we've covered everything in your Astaro, so it appears that you need to configure your mail server to use the Astaro as a smarthost.

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • OK, musab, I'm looking at your Astaro now.

    On the 'Routing' tab, I'm confused now that you wrote on the picture of your mail server configuration that it is a "linksys wireless" at 1.1.1.222.  (Also, note that, normally, local networks don't use public IP ranges; the private IP ranges are 10.0.0.0/8, 172.16.0.0/16 and 192.168.0.0/16.)

    Also on the 'Routing' tab, you say that you will accept mail for a domain named "yourdomain.no-ip.info."  When I check the public DNS records for that domain, I see that your MX record points to 94.***.yyy.238, yet that's not the address you identified as the one for your Zain smarthost.  Maybe 94.***.yyy.238 is the address of a router in front of your ASG, but it seems like your configuration is inconsistent with your public DNS records.  Was the mail server receiving email before the ASG was put in place?

    On the 'Relaying' tab, it appears that you use Zain as a smarthost for your inbound email. Also, on the 'Relaying' tab, in the 'Host-bast relay' section, I see that you have the networks of all of the interfaces on your Astaro, and you don't want that.  You should have only the host "mail 1/222" in that list; or "Internal (Network)" if you want any internal user to be able to bypass your mail server and send mail to the internet directly.  For now, your Astaro is an open relay for every criminal on the internet.

    Please correct your relaying tab and answer the above questions.  Also, could you explain or show a diagram of your network showing the Astaro relative to the router you have connected to a public IP?

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • OK, musab, I'm looking at your Astaro now.

    On the 'Routing' tab, I'm confused now that you wrote on the picture of your mail server configuration that it is a "linksys wireless" at 1.1.1.222.  (Also, note that, normally, local networks don't use public IP ranges; the private IP ranges are 10.0.0.0/8, 172.16.0.0/16 and 192.168.0.0/16.)



    Hello Bob,


    Yes, I meant that WindowsSERVER2003 with IP 1.1.1.222 is connected to the wireless Default Gateway 1.1.1.1.

    Should I change that to 10.0.0.0 Address ?






    Also on the 'Routing' tab, you say that you will accept mail for a domain named "yourdomain.no-ip.info."  When I check the public DNS records for that domain, I see that your MX record points to 94.***.yyy.238, yet that's not the address you identified as the one for your Zain smarthost.  Maybe 94.***.yyy.238 is the address of a router in front of your ASG, but it seems like your configuration is inconsistent with your public DNS records.  Was the mail server receiving email before the ASG was put in place?



    Yes..94.**.yy is my actual IP Address provided by Zain. NO-IP is just a Dynamic DNS service. I'm not sure if the mail was working before ASG is put because I just started managing this network a couple of weeks ago.

    BTW : I get the ability to change the MX Record in the NO-IP.INFO , should I change that to point to Zain smart host ? and how do I find the address of the smarthost ?

    Here is a snapshot where I can change the MX record in NO-IP









    On the 'Relaying' tab, it appears that you use Zain as a smarthost for your inbound email. Also, on the 'Relaying' tab, in the 'Host-bast relay' section, I see that you have the networks of all of the interfaces on your Astaro, and you don't want that.  You should have only the host "mail 1/222" in that list; or "Internal (Network)" if you want any internal user to be able to bypass your mail server and send mail to the internet directly.  For now, your Astaro is an open relay for every criminal on the internet.

    Please correct your relaying tab and answer the above questions.  Also, could you explain or show a diagram of your network showing the Astaro relative to the router you have connected to a public IP?

    Cheers - Bob


    Sure, thanks again. Here is how the network is mapped:


    LinksysWireless (1.1.1.1) ===>ASTARO(192.168.0.1)====>Modem(94.***.yyy)


    Every computer is located behind the wireless, for example my server2003 has the mail server (Majodio software) and the IPCONFIG is

    1.1.1.222
    255.255.255.0
    DG : 1.1.1.1