LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

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

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.

Batbayar.B
 
Old 05-05-2007, 07:45 AM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,765
Blog Entries: 4

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

Have a look at /etc/sendmail.cf for lines similar to:
# file containing names of hosts for which we receive email
Fw/etc/mail/local-host-names

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
batbayar
LQ Newbie
 
Registered: May 2007
Posts: 7

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 sendmail.mc file and generated sendmail.cf file.
And touched anything else in the sendmail.mc file.
 
Old 05-08-2007, 01:22 AM   #4
batbayar
LQ Newbie
 
Registered: May 2007
Posts: 7

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
sendmail.cf, just below the "SLocal_check_rcpt" line


D{miatdom}miat.com.mn
F{internal}/etc/mail/intern.only

# 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
file.
m4 sendmail.mc sendmail.cf erases this code!
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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 05:20 PM.

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