OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Root relay issue

From: /dev/rob0 (rob0gmx.co.uk)
Date: Thu Jul 20 2006 - 14:06:40 CDT


On Thursday 20 July 2006 13:50, Johnson, S wrote:
> Well, I was fine for a couple of years but someone finally figured
> out that root at mydomain is a valid email. Now I'm getting all
> kinds of spam to my root account. Problem is I use this account to

More than likely, they're hitting an alias like postmaster.

> report on the server itself. The server sends many emails throughout
> the day with health checks and the like. I'd like to lock this
> account so that only localhost has the rights to send to this

Unfortunately postmaster and abuse are required by RFC. You should
accept mail to those from the outside.

> I dug around a bit and found this piece of documentation:
>
> http://www.postfix.org/RESTRICTION_CLASS_README.html

Good, but you have a local copy of that, which is sometimes better to
use: less confusion from new features introduced after your version.

> I added check_recipient_access hash:/etc/postfix/access to the
> smtpd_recipient_restrictions line in main.cf
>
> Then I went in to the access and added
>
> rootmydomain.com permit_mynetworks,reject

This is not what the RESTRICTION_CLASS_README told you to do! The
access(5) lookup has to be a single result, that is, a restriction
class.

> then ran postmap on access and restarted postfix. I tried to send an
> email to my root account from the outside and it still forwarded it
> on to my monitoring account.
>
> Any ideas on what I'm doing wrong?

Failing to read your logs, which would have told you this already.
--
    Offlist mail to this address is discarded unless
    "/dev/rob0" or "not-spam" is in Subject: header