Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 05-03-2007, 10:35 PM   #1
LQ Newbie
Registered: May 2007
Posts: 8

Rep: Reputation: 0
Unhappy Sendmail: How to make only users in hosts can send to mailing lists?

Hi all,

I'm from Mongolian Airlines, and I'm new in Linux.
Our mail server configured that only from computers defined in hosts file can send to mailing lists.
But now everybody can send mailing lists and do not know how to configure it like before.

Can anybody help me, please.

Old 05-05-2007, 07:45 AM   #2
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,870
Blog Entries: 14

Rep: Reputation: 1112Reputation: 1112Reputation: 1112Reputation: 1112Reputation: 1112Reputation: 1112Reputation: 1112Reputation: 1112Reputation: 1112
Mongolia - I think you're the first person I've seen from there in my surfing.

Have a look at /etc/ for lines similar to:
# file containing names of hosts for which we receive email

The Fw is the macro - the /etc/mail/local-host-names is the file. Whatever file you see there should be the one that has the list of hosts.
Old 05-06-2007, 01:05 AM   #3
LQ Newbie
Registered: May 2007
Posts: 8

Original Poster
Rep: Reputation: 0
Here is my previous configuration:

There is a mailing list "all_users" which contains all e-mail addresses of users.
And only from computers defined in "hosts" file can send e-mail to this mailing list.

But now everyone can send e-mail to this mailing list.
I have no idea what I have done with the configuration.
Only thing I did is, I added some DNSBLs in file and generated file.
And touched anything else in the file.
Old 05-08-2007, 01:22 AM   #4
LQ Newbie
Registered: May 2007
Posts: 8

Original Poster
Rep: Reputation: 0
I finally resolved the problem and post here for someone who needed to know.

Add following lines to the "SLocal_check_rcpt" section of the, just below the "SLocal_check_rcpt" line


# if the recipient isn't internal, they get the mail
R$+ $: <@> $>3 $1
R<@> $={internal}<@$=w.> $: <$1@$2>
R<@> $={internal} $: <$1@$j>
# no internal alias
R<@>$+ $@ OK
# check to see if the sender is local
R$* $: $&{client_name}
R$+.$* $: $2
R${miatdom} $@ OKSOFAR
R$* $#error $: 551 $&f not allowed to send to recipient

Mailinglists (defined in 'aliases' file) must be listed in /etc/mail/intern.only
Users with permission to post to the mailinglist must be listed in /etc/hosts
m4 erases this code!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail - Remote users cant send Skip-DMP Linux - Software 5 02-21-2006 01:53 PM
Mailing Lists? slinky2004 General 2 10-25-2005 02:34 PM
Mailing Lists Orwick Alefgard Linux - General 3 08-22-2003 01:25 AM
Maddening sendmail problem -- cant send mail to remote hosts! HELP! Bungo2000 Linux - Networking 11 06-09-2003 03:33 PM
Mailing Lists... Nezar Linux - Networking 0 03-25-2002 01:11 AM

All times are GMT -5. The time now is 06:39 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration