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

Mail relaying by Astaro?

I have a bit of a problem and I am at a loss as to how to fix it.
It would seem that my Astaro firewall is being used as an open mail relay.
About a month ago my ISP reported that in two days I had a usage of over 750MB.
I did some changes to my filters and to the SMTP relay settings and all seemed to be fine after making these changes and I put it all down to experience (or maybe I should have said lack of experience).
This week it happened again. I was hit with 250MB in a day that was not mine.
After the last attack I enabled accounting to try and track as much as I could but this does not seem to have helped.
My environment is as follows:
Netgear NAT router in front of the Astaro box
Windows 2000 AD server with Exchange 2000 server installed behind Astaro.
The Exchange server is definitely set not to relay and does not send NDRs out of the internal network. NDRs are only sent to the administrator.
The Astaro box is configured as follows:
SMTP Relay enabled
SMTP routes table is set to my domain and the SMTP host is configured in Networks as ExchangeServer  (specified as the Exchange server’s IP address)
No networks are selected in the Outgoing Mail (empty list)
Sender address verification is enabled

I do not know what else I can configure!

When I get hit I can neither confirm or deny if the Astaro box is relaying mail.
I get multiple message stuck in the SMTP queue. Some frozen, some bounced.
As I said, I cannot confirm that the Astaro box is relaying mail but other than sending multiple NDRs back to the originating address I have no other explanation as to how my usage could have been as high as it was.

I am open to suggestions and even more interested if finding a way to stop this from happening again.
Another thing. Is it possible to stop Astaro from sending NDRs? I would like to configure it the same way I have configured Exchange so that any NDRs that are created are only sent to the administrator internally. Is this possible?

Any suggestions are welcome.


This thread was automatically locked due to age.
Parents
  • Do you have the SOCKS or HTTP proxies enabled, and do you use any NAT rules ?

    Download the SMTP log files for the days with the traffic explosion and check if there are any suspicious entries.

    regards,

    /tom
  • Try the "Test an Open Relay" at  http://www.ordb.org/.  Once you confirm by email, it takes them a day to two to email you the results.

    This should allow you to confirm or rule out smtp as the culprit.
     
     [size="1"][ 10 December 2002, 08:32: Message edited by: BillH ][/size]
  • Originally posted by The Big O:


    I do not know what else I can configure!

    Any suggestions are welcome.
    Hello Big O,

    there is a thread about relaying at anywhere at the BB. Maybe your box is relaying 'someone%anydomain@yourdomain'-type mails. You have to tweak your configuration like in 

    http://www.astaro.org/ubb/ultimatebb.php?ubb=get_topic;f=9;t=000430
  • Tom,
    Yes I do have HTTP proxy enabled but not SOCKS. I do not use any NAT rules. The only NATing I have is via the NetGear router.
    How does this relate to my problem? (just asking because I do not know. I am not trying to be facetious)
    When you say download the SMTP log files and look for suspicious entries what exactly am I looking for? What entries should I consider suspicious?   [:S]  

    BillH,
    I considered using ordb.org but I am a bit concerned about doing this. If it is true that the box is acting as an open relay, do I want to advertise this to the world? Maybe not . . .

    jader,
    Sorry, but the post you pointed me to is beyond me. I am not a Unix person by any means. Thanks anyway     [:(]    

    All I want to do is stop the ability of the Astaro box to relay and, if possible, stop it from sending NDRs.
    Surely there are many others of you out there with a mail server behind Astaro. What am I missing here. Surely there is a simple way to stop Astaro from acting as an open relay . . .
     
     [size="1"][ 10 December 2002, 20:23: Message edited by: The Big O ][/size]
Reply
  • Tom,
    Yes I do have HTTP proxy enabled but not SOCKS. I do not use any NAT rules. The only NATing I have is via the NetGear router.
    How does this relate to my problem? (just asking because I do not know. I am not trying to be facetious)
    When you say download the SMTP log files and look for suspicious entries what exactly am I looking for? What entries should I consider suspicious?   [:S]  

    BillH,
    I considered using ordb.org but I am a bit concerned about doing this. If it is true that the box is acting as an open relay, do I want to advertise this to the world? Maybe not . . .

    jader,
    Sorry, but the post you pointed me to is beyond me. I am not a Unix person by any means. Thanks anyway     [:(]    

    All I want to do is stop the ability of the Astaro box to relay and, if possible, stop it from sending NDRs.
    Surely there are many others of you out there with a mail server behind Astaro. What am I missing here. Surely there is a simple way to stop Astaro from acting as an open relay . . .
     
     [size="1"][ 10 December 2002, 20:23: Message edited by: The Big O ][/size]
Children
  • I haven't been busy with configuring smtp proxy for a while, but try to add the incoming domains for which you want to receive mail (i.e. mydomain1.com, mydomain2.com). If I'm correct Astaro then only accepts these messages.

    If you're using bSMTP you could also define the range of servers that your provider uses and block everything else using the packetfilter.
    i.e.
    providermail smtp exchangeserver allow
  • Big O,

    please check the 'allowed networks' in your HTTP proxy - make sure there is no external net allowed to use it (e.g. 'any')

    if there is not one allowed to use ASL for outgoing mail - maybe your internal server relays!?

    e.g. check if your server accepts mail like:
    rcpt to:

    if yes, try disabling chars like %,! or double @ in incoming mails on your mailserver

    hth

    cheers
    Marcel
  • To answer responses first:

    adminVMW,
    Thanks for the tip. At this point however putting in a filter like "providermail smtp exchangeserver allow" I do not believe will help as it would seem that the problem is happening at the Astaro SMTP Relay not at the Exchange server.

    Marcell,
    I have now disabled the HTTP proxy. 
    Previously however it was set to the internal network (eth0_Network).
    I have confirmed that the Exchange server does not relay by telneting to it from eth1 and trying to relay. That was one of the first things I did.

    Okay, I think I have determined that the Astaro box is not relaying (still not 100% sure however, I still need convincing).

    My SMTP logs are swamped with "Refused Relay" entries (1000's of them). I am now thinking that the last attack where I was hit with 250MB may just have been downloads to my IP (that's a real bummer as I can't stop that).
    The bit that concerns me now is the amount of "frozen" and "bounced messages that end up in the SMTP Queue. 
    Is the Astaro SMTP Relay trying to resend all of these messages that it refused relay?
    Below is a snippet of one of my SMTP Relay logs. Help in interpreting them would be appreciated.

    Dec  5 20:07:19 firewall exim[301]: 2002-12-05 20:07:19 refused relay (host) to  from  H=(192.168.0.1) [192.168.0.1]
    Dec  5 20:07:19 firewall exim[301]: 2002-12-05 20:07:19 refused relay (host) to  from  H=(192.168.0.1) [192.168.0.1]
    Dec  5 20:07:21 firewall exim[322]: 2002-12-05 20:07:21 refused relay (host) to  from  H=(192.168.0.1) [192.168.0.1]
    Dec  5 20:07:21 firewall exim[322]: 2002-12-05 20:07:21 refused relay (host) to  from  H=(192.168.0.1) [192.168.0.1]
    Dec  5 20:07:21 firewall exim[32600]: 2002-12-05 20:07:21 refused relay (host) to  from  H=(192.168.0.1) [192.168.0.1]
    Dec  5 20:07:21 firewall exim[32600]: 2002-12-05 20:07:21 refused relay (host) to  from  H=(192.168.0.1) [192.168.0.1]
    Dec  5 20:07:21 firewall exim[301]: 2002-12-05 20:07:21 unexpected disconnection while reading SMTP command from (192.168.0.1) [192.168.0.1]

    Dec  5 21:56:18 firewall exiscanv2[14905]: exiscan clearing ID cache
    Dec  5 21:56:21 firewall exiscanv2[14905]: 18JKKw-0001Go-00 R:resent or delayed
    Dec  5 21:56:21 firewall exiscanv2[14905]: 18Jnsr-00052k-00 R:resent or delayed
    Dec  5 21:56:21 firewall exiscanv2[14905]: 18JEZ0-0002A4-00 R:resent or delayed
    Dec  5 21:56:22 firewall exim[17267]: 2002-12-05 21:56:22 18Jnsr-00052k-00 Message is frozen
    Dec  5 21:56:22 firewall exim[17266]: 2002-12-05 21:56:22 18JEZ0-0002A4-00 Message is frozen
    Dec  5 21:56:23 firewall exim[17268]: 2002-12-05 21:56:23 18JKKw-0001Go-00 Message is frozen
    Dec  5 21:56:23 firewall exiscanv2[14905]: 18Jnph-0004n4-00 R:resent or delayed
    Dec  5 21:56:23 firewall exiscanv2[14905]: 18JL7e-0007K3-00 R:resent or delayed
    Dec  5 21:56:23 firewall exiscanv2[14905]: 18JM6y-0005u1-00 R:resent or delayed
    Dec  5 21:56:24 firewall exim[17274]: 2002-12-05 21:56:24 18JL7e-0007K3-00 Message is frozen
    Dec  5 21:56:24 firewall exim[17273]: 2002-12-05 21:56:24 18JM6y-0005u1-00 Message is frozen
    Dec  5 21:56:25 firewall exim[17275]: 2002-12-05 21:56:25 18Jnph-0004n4-00 Message is frozen
    Dec  5 21:56:25 firewall exiscanv2[14905]: 18JDka-0004RR-00 R:resent or delayed
    Dec  5 21:56:25 firewall exiscanv2[14905]: 18Jmrk-0006IW-00 R:resent or delayed
    Dec  5 21:56:25 firewall exiscanv2[14905]: 18Jnw3-0005He-00 R:resent or delayed
    Dec  5 21:56:26 firewall exim[17293]: 2002-12-05 21:56:26 18Jnw3-0005He-00 Message is frozen
    Dec  5 21:56:26 firewall exim[17292]: 2002-12-05 21:56:26 18JDka-0004RR-00 Message is frozen
    Dec  5 21:56:27 firewall exim[17294]: 2002-12-05 21:56:27 18Jmrk-0006IW-00 Message is frozen
    Dec  5 21:56:27 firewall exiscanv2[14905]: 18JKan-0004l8-00 R:resent or delayed
    Dec  5 21:56:29 firewall exim[17313]: 2002-12-05 21:56:29 18JKan-0004l8-00 Message is frozen
    Dec  5 22:06:52 firewall exiscanv2[14905]: SIGHUP received, terminating.
    Dec  5 22:06:59 firewall exim[20417]: 2002-12-05 22:06:59 exim 6.66 daemon started: pid=20417, no queue runs, listening for SMTP on port 25
    Dec  5 22:07:00 firewall exiscanv2[20421]: started
     
    Exim displays a code saying what it is doing, as does exiscanv2 (I expect that is what it is). Are these codes listed anywhere? Knowing what Exim is doing may be a big help in getting to the bottom of this.
    eg. exim[17293]

    Seeing as how I cannot control what comes to my IP I am hoping that there is a way in Astaro that I can get notified of a "mail storm" (which now seems to be what has happened). Is this possible?

    Again, any help here is appreciated.
  • Well, I thought that I had a handle on this but I am even less sure now.
    Further examination of my SMTP logs again leads me to think that Astaro is an open relay.
    Below are further examples of my logs.
    Can someone shed some more light on this? I hope so. I have shut down port 25 for nearly a week now because I am too scared to let the world attack me again.
    I need help!!!!!!!!!!

    Dec  7 10:52:14 firewall exim[13249]: 2002-12-07 10:52:14 18KSGT-0003Rh-00 heidiwilcox@uolmail.com.ar H={127.0.0.1} [127.0.0.1] P=smtp S=2704 id=HNKBAUHMXGOROIVWOFDKHSJQUFDQGF@178.61.75.104
    Dec  7 10:52:15 firewall exiscanv2[20859]: 18KSGR-0003RY-00 F: T:jarcher@ambidji.aust.com jardar@ambidji.aust.com jardin@ambidji.aust.com jardine@ambidji.aust.com R:clean, marked for dequeue
    Dec  7 10:52:18 firewall exiscanv2[20859]: 18KSGT-0003Rh-00 F: T[:D]collyer@ambidji.aust.com dcon@ambidji.aust.com R:clean, marked for dequeue
    Dec  7 10:52:18 firewall exim[13279]: 2002-12-07 10:52:18 18KSGC-0003Py-00 ** madelainepitts@therugby.co.za R=lookuphost T=remote_smtp: SMTP error from remote mailer after RCPT TO:: host mx3.mailbox.co.za [196.31.150.7]: 550 5.1.1 ... User unknown.
    Dec  7 10:52:18 firewall exim[13279]: 2002-12-07 10:52:18 18KSGC-0003Py-00 Frozen {delivery error message}
    Dec  7 10:52:20 firewall exim[13305]: 2002-12-07 10:52:20 18KSGZ-0003Sb-00 jesicamarquez@websurfer.co.za H={127.0.0.1} [127.0.0.1] P=smtp S=2647 id=BHWZCQDYNLBLOTXPIQFHWIVIAESRNN@108.32.196.149
    Dec  7 10:52:22 firewall exim[13307]: 2002-12-07 10:52:22 18KSGb-0003Sd-00 karleenwilcox@eu.zip.net H={127.0.0.1} [127.0.0.1] P=smtp S=2753 id=GCABFOGLRHRZTIDQHBVWHWHQOTHERH@126.207.4.138
    Dec  7 10:52:24 firewall exim[13318]: 2002-12-07 10:52:24 18KSGE-0003QE-00 ** deonpitts@workmail.co.za R=lookuphost T=remote_smtp: SMTP error from remote mailer after RCPT TO:: host mx1.mailbox.co.za [196.31.150.75]: 550 5.1.1 ... User unknown.
    Dec  7 10:52:24 firewall exim[13318]: 2002-12-07 10:52:24 18KSGE-0003QE-00 Frozen {delivery error message}
    Dec  7 10:52:24 firewall exiscanv2[20859]: 18KSGZ-0003Sb-00 F: T:jgun@ambidji.aust.com jgunn@ambidji.aust.com R:clean, marked for dequeue
    Dec  7 10:52:26 firewall exim[13330]: 2002-12-07 10:52:26 rejected MAIL FROM: H={127.0.0.1} [127.0.0.1] cannot route to sender
    Dec  7 10:52:26 firewall exim[13330]: 2002-12-07 10:52:26 rejected MAIL FROM: H={127.0.0.1} [127.0.0.1] cannot route to sender
    Dec  7 10:52:26 firewall exim[13350]: 2002-12-07 10:52:26 18KSGE-0003Pk-00 ** dejonge@ambidji.aust.com: all relevant MX records point to non-existent hosts
    Dec  7 10:52:26 firewall exim[13350]: 2002-12-07 10:52:26 18KSGE-0003Pk-00 ** dejong@ambidji.aust.com: all relevant MX records point to non-existent hosts
    Dec  7 10:52:26 firewall exim[13350]: 2002-12-07 10:52:26 18KSGE-0003Pk-00 ** dejohn@ambidji.aust.com: all relevant MX records point to non-existent hosts
    Dec  7 10:52:26 firewall exim[13350]: 2002-12-07 10:52:26 18KSGE-0003Pk-00 ** dejesus@ambidji.aust.com: all relevant MX records point to non-existent hosts
    Dec  7 10:52:26 firewall exim[13350]: 2002-12-07 10:52:26 18KSGE-0003Pk-00 ** dejay@ambidji.aust.com: all relevant MX records point to non-existent hosts
    Dec  7 10:52:26 firewall exiscanv2[20859]: 18KSGb-0003Sd-00 F: T:teh@ambidji.aust.com thebaron@ambidji.aust.com thebat@ambidji.aust.com thebear@ambidji.aust.com thebeast@ambidji.aust.com R:clean, marked for dequeue
    Dec  7 10:52:26 firewall exim[13351]: 2002-12-07 10:52:26 18KSGg-0003TL-00 <> R=18KSGE-0003Pk-00 U=exim P=local S=4121
    Dec  7 10:52:26 firewall exim[13350]: 2002-12-07 10:52:26 18KSGE-0003Pk-00 Error message sent to molliewilcox@mister.zip.net
    Dec  7 10:52:26 firewall exim[13350]: 2002-12-07 10:52:26 18KSGE-0003Pk-00 Completed
    Dec  7 10:52:26 firewall exim[13306]: 2002-12-07 10:52:26 18KSGg-0003Sc-00 augustinewilcox@latinmail.com H={127.0.0.1} [127.0.0.1] P=smtp S=2788 id=LMHLNTVJKBDWUBMBARUKTHKLMNBPHN@197.135.1.70
    Dec  7 10:52:28 firewall exim[13368]: 2002-12-07 10:52:28 18KSGE-0003Pt-00 ** dgleeson@ambidji.aust.com: all relevant MX records point to non-existent hosts
    Dec  7 10:52:28 firewall exim[13368]: 2002-12-07 10:52:28 18KSGE-0003Pt-00 ** ders@ambidji.aust.com: all relevant MX records point to non-existent hosts
    Dec  7 10:52:28 firewall exim[13372]: 2002-12-07 10:52:28 18KSGi-0003Tg-00 <> R=18KSGE-0003Pt-00 U=exim P=local S=3647
    Dec  7 10:52:28 firewall exim[13368]: 2002-12-07 10:52:28 18KSGE-0003Pt-00 Error message sent to monetpitts@uol.com.ar
    Dec  7 10:52:28 firewall exim[13368]: 2002-12-07 10:52:28 18KSGE-0003Pt-00 Completed
    Dec  7 10:52:30 firewall exim[13352]: 2002-12-07 10:52:30 18KSGj-0003TM-00 daramarquez@mighty.co.za H={127.0.0.1} [127.0.0.1] P=smtp S=2742 id=KCBWIACPCVAOHREMULMSGOLRFBOEKG@31.159.119.167
    Dec  7 10:52:30 firewall exiscanv2[20859]: 18KSGg-0003Sc-00 F: T:jguo@ambidji.aust.com jgibb@ambidji.aust.com jgibbons@ambidji.aust.com jgibbs@ambidji.aust.com R:clean, marked for dequeue

  • Dec 7 10:52:14 firewall exim[13249]: 2002-12-07 10:52:14 18KSGT-0003Rh-00 heidiwilcox@uolmail.com.ar H={127.0.0.1} [127.0.0.1] P=smtp S=2704 id=HNKBAUHMXGOROIVWOFDKHSJQUFDQGF@178.61.75.104
    You see that the connect comes from 127.0.0.1 ?

    You must have had a misconfigured proxy or NAT rule ...

    If you put up the service again, I can make a short security audit to see if everything is ok.

    /tom
  • Tom,

    Thanks for the offer of help.
    I have opened port 25 again. If you have the time to run some tests it would be greatly appreciated.
    I am at a loss at this point as to what further things I can do or exactly what is going on.

    I have sent you my domain details via Astaro support.
    I hope you can help me sort this mess out.
     
     [size="1"][ 13 December 2002, 05:11: Message edited by: The Big O ][/size]