Find the answer to your Linux question:
Results 1 to 5 of 5
Good afternoon, I need an hand to make a custom configuration on my Sendmail 8.13.8. I already configure it to allow relay only for authenticated users. But I want to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2009
    Posts
    14

    allow send email only from local domain


    Good afternoon, I need an hand to make a custom configuration on my Sendmail 8.13.8. I already configure it to allow relay only for authenticated users. But I want to increase sevurity and make also another limitation if it is possible: allow sending email only for local domain. For example, domain A.COM is locate in my server and can send email to everyone, domain B.COM is NOT locate on my server and I want to block access to my smtp server also if it uses authentication.
    I need this to block possible spam send from an infected pc through my mail server using different email address.
    This is my actual access file:

    Connect: localhost.localdomain RELAY
    Connect: localhost RELAY
    Connect: 127.0.0.1 RELAY

    Can anyone help me?
    Thanks a lot.

  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,914
    You should also have a file called relay-domains in your /etc/mail (or in the same place as your access file). This file just needs a list of domains you allow to be relayed.
    Linux user #126863 - see http://linuxcounter.net/

  3. #3
    Just Joined!
    Join Date
    Oct 2009
    Posts
    14
    Hello, thanks for your help. I see that file and I add there my domains. But if I send an email with authentication (user_A.com that is trusted) using mail "user@B.COM" it is correctly sent, and I don't want it. I hope it is clear. Thanks a lot.

  4. $spacer_open
    $spacer_close
  5. #4
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,914
    There are many resources on the Internet that might be able to help with this, but I've never configured anything as complex as this before. It seems that Sendmail will only accept email for it's own domains unless you're authenticated.

    But maybe you're trying to solve your real problem the wrong way. If you're trying to block a spamming computer that you know about, why don't you just deny that computer any access to your mailserver with the firewall rules.

    If that computer is logging onto your mailserver to grant itself permissions to dump spam everywhere, then why don't you just change the password on the account the computer is logging in with?

    If you have an infected computer on your network, don't you think you should deal with that first? I wouldn't allow it on my networks.
    Linux user #126863 - see http://linuxcounter.net/

  6. #5
    Just Joined!
    Join Date
    Oct 2009
    Posts
    14
    Yes, you're right. But my server is a public mail server. I had a spam problem one week ago and i don't see in my log files who is the infected customer's pc. I'm searching a solution for the future. I know this is a strange configuration, so no problem, probably there is no way to do it. I see also the possibility of a dual-sendmail-setup but I can't do it because I'm using Virtulmin and it doesn't support it.
    Thanks a lot for you attention.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •