1752795 Members
6136 Online
108789 Solutions
New Discussion юеВ

sendmail

 
andreyP
Occasional Contributor

sendmail

Hi, gurus! I have some problem with sendmail configuration. I have a script that relay messages under root user with sendmail to smtp server. I want to allow sendmail to relay mail to some fixed list of recepients and deny for others. I've tried to make /etc/mail/access file, access_db file and changes to sendmail configuration with gen_cf but I still can relay to any user in the domain. Any suggestions? Thanks in advance.
2 REPLIES 2
Mel Burslan
Honored Contributor

Re: sendmail

If I am understanding your question correctly, you want to send mail to the relay server as root but you only want some of the recipients in the list to be able to get your mails and some others don't. Is that right ?

are you making the access_db modifications on the relay server or on the local server sending the emails out ? If local server, why don't you just exclude those users from the distribution ?
________________________________
UNIX because I majored in cryptology...
andreyP
Occasional Contributor

Re: sendmail

Thank you for the answer. Yes, you understood question correctly and I modified access_db on local server. Addresses of recepients look like username@domain.ru. I want to do the following:
Commands are executed on local server:

echo "...some text..."|/usr/sbin/sendmail -v user1@domain.ru - OK
echo "...some text..."|/usr/sbin/sendmail -v
user2@domain.ru - refused

I am not familiar with sendmail configuration :-) How exclude user2@domain.ru from sendmail on the local server?