Let us say the ip address of my sendmail server is 192.168.30.32, the domain name is cdac.org (the name server is configured for this domain and is working successfully) and the entries in /etc/mail/access are as follows
127.0.0.1 RELAY
192.168.30.217 550 “ Do not use my mailserver”
Now the above file is saved.
# makemap hash /etc/mail/access < /etc/mail/access
The entries in /etc/mail/local-host-names is as follows:
cdac.org
The files /etc/httpd/conf/httpd.conf , /etc/mail/sendmail.mc , /etc/squirrelmail/config.php and /etc/dovecot.conf are configured properly then I use following commands
# service named start
#service httpd start
#service sendmail start
# service dovecot start
After this I go to client machine 192.168.30.217 and using the entry nameserver 192.168.30.32 in /etc/resolv.conf file of this client machine, I start the web browser, give the url
www.cdac.org/webmail and I get the squirrelmail window where I give username and password of one of the users of mail server I am very much able to send and receive mails without any hindrance, on the other hand when I use Mozilla mail or out look express on the same machine after creating the user account and try to send or receive I get the error message 550 Don’t use my mail server. That means the sending
and receiving mail is being blocked successfully due to entry in /etc/mail/access file, then why the mail is not being blocked by using web mail, while other conditions are same.