2

It seems everywhere I look there are tons of questions about sending mail with sendmail. However I want just the opposite and can not figure out how to configure sendmail properly.

I want to set up a system on my ubuntu server to only RECEIVE mail (specifically from a whitelist). I do not want it to have the ability to send mail, I want that feature disabled. I just want to drop the mail into a folder, and another program I have would be doing the sending of it.

Any advice on how to set it up to do this. Currently have sendmail installed with basic config settings, but having never set up a mail server before I am at a loss how to achieve this. Thanks

Toby Speight
  • 8,678
Lain
  • 121

2 Answers2

1

You may want to use Exim or Postfix. The default Exim configurations I have seen allow you setup blacklists and whitelists very easily. You can also easily disable the network routers.

With Exim I would:

  • configure the server to listen on all addresses (0.0.0.0)
  • configure the white list with those servers you want to be able to send you mail.
  • configure the blacklist with 0.0.0.0/0
  • configure the delivery type as local (define config_local).

I am not sure why you don't want the server sending email. A common configuration is to forward all external mail to a "smarthost" (relay) for delivery. This allows you to send email via the smarthost and avoid the setup required to make your server trusted.

BillThor
  • 8,965
0

Contrary to my own misconception partially based on its name, sendmail is a full blown MTA which can be set up to send and receive mail.

To receive emails, you need to set up an MTA (mail transfer agent) which implies proper DNS configurations, the actual MTA and a POP or IMAP server for your clients to be able to get the messages.

You should look for tutorials on setting up an MTA using PostFix or sendmail, and DoveCot, or other similar tools. Note that configuring a system to only receive emails seems like a big job for a system that will be missing a leg but it is possible.