SMTP Open Mail Relay vulnerability

0

I have to check if my server (SUSE 11) is used as an SMTP Open Mail Relay and, if so, block this unwanted feature.

I check /etc/postfix/main.cf and all relay's related variables are commented :

#relayhost = $mydomain
#relayhost = [gateway.my.domain]
#relayhost = [mailserver.isp.tld]
#relayhost = uucphost
#relayhost = [an.ip.add.ress]

Could someone help me?

Giorgio Tarozzi

Posted 2019-09-18T08:00:24.390

Reputation: 1

An open relay doesn't have anything to do with relay options. To test it simply establish a connection and try to send an e-mail to a foreign domain. If you need to do this due to receiving a report that your server is an open relay/you're on a blacklist check your mail queue length.

– Seth – 2019-09-18T09:01:20.680

You need to check, if unauthorized users can send mail via your system. Usually your server on should accept mail 1) to local users 2) from authorized users to anyone 3) possibly from trusted IPs to anyone. Otherwise it should reject the mail. When your server can be used to send mail to anyone, it is called an open relay and will sooner or later relay spam, when automated spam bots find it and use it. – allo – 2019-09-18T09:19:43.393

Answers

0

Thanks everyone for your kind answers! In my postfix queue I just see (trying to emailing to external domain) :

# postqueue -p -Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient------- BD2823D82E7 331 Wed Sep 18 11:14:19 root@emc.com (Host or domain name not found. Name service error for name=gmail.com type=MX: Host not found, try again) test@gmail.com -- 0 Kbytes in 1 Request.

So, seems that this server do not recognized domain "gmail.com" and this should exclude it as an open SMTP relay, am i right?

Giorgio Tarozzi

Posted 2019-09-18T08:00:24.390

Reputation: 1

It looks like it still queued the mail just fine, it's just not able to resolve gmail.com for some reason. You probably should make this part of your question as it is not really an answer. – Seth – 2019-09-20T12:01:50.967