[CentOS] Selective Sendmail Relaying.

Wed Dec 20 14:51:17 UTC 2006
Aleksandar Milivojevic <alex at milivojevic.org>

Quoting Will McDonald <wmcdonald at gmail.com>:

> Hi all,
>
> I've been trying to hit on the right configuration combo to allow
> relaying from specific users and/or domains to an internal box running
> Sendmail.
>
> Reading the docs at http://www.sendmail.org/m4/anti_spam.html#relay
> and http://www.sendmail.org/m4/anti_spam.html#access_db_fine
>
> I would appear that I should be able to all per-address relaying in
> /etc/mail/access by enabling
>
> FEATURE(`relay_mail_from')dnl
>
> in sendmail.mc and restarting Sendmail. Then adding
> test at testdomain.com to /etc/access as:
>
> From:test at testdomain.com        RELAY
>
> Should allow relaying FROM this address, yet it doesn't seem to work
> for me on a CentOS 4.4 system and I can't quite hit on why.

Have you rebuilt access.db? (makemap hash access.db < access)

BTW, if the system in question is accessible from the Internet, what  
you are doing is a bad idea.  You are allowing anybody to send spam  
through your system by simply using specific return address.

Better way to do it would be to enable authentication in Sendmail.