[CentOS] Selective Sendmail Relaying.
Aleksandar Milivojevic
alex at milivojevic.org
Wed Dec 20 16:30:39 UTC 2006
Quoting Will McDonald <wmcdonald at gmail.com>:
> On 20/12/06, Aleksandar Milivojevic <alex at milivojevic.org> wrote:
>>> 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.
>>>
>>> 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.
>
> Hi Alex.
>
>> Have you rebuilt access.db? (makemap hash access.db < access)
>
> I have, yes. There's the default Makefile in /etc/mail and I just run
> make after changing the plain-text file.
That's strange. I've just tested it on one of my boxes, and
relay_mail_from feature worked as advertised. Have you rebuilt
sendmail.cf after editing sendmail.mc and before restarting Sendmail?
(m4 sendmail.mc > sendmail.cf)
> I know, unfortunately I have a couple of thousand non-technical users
> already setup and I can't disrupt those.
Hm, if same system is their IMAP/POP3 server too, you could configure
Sendmail to use same password source. It should not prompt them for
passwords when sending mails (since it's the same server, same account
name, same password, and they already entered it when accessing IMAP
or POP3). Then you just tell those that need to send email with
outside domains in "from" to make sure "use username and password" is
checked in their mail client (if not already checked, some clients
default to authenticating to SMTP server). Hopefully it wouldn't be
too much of disruption.
More information about the CentOS
mailing list