Hello:
On a CentOS5 machine I set up for a client, in /etc/aliases, I set root's mail to forward to my email address so I can get notices from cron, etc.
Unfortunately, I am now getting a lot of spam which is sent to root@theservername.com
How can I tell sendmail to not accept external email to root?
I searched the Internet and found some horribly convoluted solutions. There has to be a simple way to do this, like putting a line in sendmail.mc or something.
Anyone know a good solution?
Thanks Neil
-- Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com Eliminate junk email and reclaim your inbox. Visit http://www.spammilter.com for details.
Three ideas come to mind:
1) announce a different public name than the local machine name.
A) EG: machine name:donttellanyone.theservername.com public (DNS) name: www.theservername.com
B) Then set up virtusertable entry routing root@donttellanyone.theservername.come to your email address.
C) edit /etc/aliases so that "root: | /dev/null "
2) start using greylisting! Milter-greylist works well w/sendmail for light- medium load machines. =)
3) Turn off inbound email on port 25, if you can.
On Wednesday 15 April 2009 18:57:57 Neil Aggarwal wrote:
Hello:
On a CentOS5 machine I set up for a client, in /etc/aliases, I set root's mail to forward to my email address so I can get notices from cron, etc.
Unfortunately, I am now getting a lot of spam which is sent to root@theservername.com
How can I tell sendmail to not accept external email to root?
I searched the Internet and found some horribly convoluted solutions. There has to be a simple way to do this, like putting a line in sendmail.mc or something.
Anyone know a good solution?
Thanks Neil
-- Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com Eliminate junk email and reclaim your inbox. Visit http://www.spammilter.com for details.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
Benjamin:
Thanks for responding. I guess that facility just does not exist in sendmail.
I broke down and wrote a custom jilter (Java based milter) to do it. It is actually working very well and gives me a lot of flexibility.
Thanks, Neil
-- Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com Eliminate junk email and reclaim your inbox. Visit http://www.spammilter.com for details.
Neil Aggarwal wrote on Wed, 15 Apr 2009 23:54:13 -0500:
I guess that facility just does not exist in sendmail.
what facility? Everything Benjamin explained is there.
I'm not getting any email to root@.... on my servers. I suggest you try to find out where you might have exposed it. Spammers try to avoid sending to root. Or, are you sure the mail is *really* sent to root and not to an address aliased to root? Lots of users (basically all users that were created for use by a daemon) on the machine are aliased to root.
If it's really spam straight to "root@domain" a simple "root@domain nouser" in virtusertable or access.db should usually solve the problem as cron rather sends to "root" or "root@localhost".
Kai
Kai:
If it's really spam straight to "root@domain" a simple "root@domain nouser" in virtusertable or access.db should usually solve the problem as cron rather sends to "root" or "root@localhost".
That is the best solution.
Thanks, Neil
-- Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com Eliminate junk email and reclaim your inbox. Visit http://www.spammilter.com for details.