Operating System - HP-UX
1748185 Members
4234 Online
108759 Solutions
New Discussion

Re: Sendmail:Restricting the TO address to only specific mail addresses

 
SOLVED
Go to solution
Anshumali
Esteemed Contributor

Sendmail:Restricting the TO address to only specific mail addresses

Hi All,
I have checked most of the threads but can not conclude the final answer on this.

To keep it short:
ENV: HP-UX 11.23 on Bl860c
swlist -l product|grep -i sendmail
PHNE_35951 1.0 sendmail(1M) 8.11.1 patch
This is a sendmail client but sendmail daemons run on it. There is a relay server in use but *I do not have control to it* apart from requesting chanegs via documented records. :)

Requirement:
=============
I simply need to block the emails based on outgoing email address. Something like cron.allow/deny files. I need to be able to deny all but allow those in the whitelist and vice versa.

Query:
======
With the current setup, is it possible to do even when not having full control of Mail Server but only the client. I can check on everything which can be done on client side of sendmail like spam filter or firewall but needed an answer which has worked for some.

Thanks,
Anshu
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
1 REPLY 1
VK2COT
Honored Contributor
Solution

Re: Sendmail:Restricting the TO address to only specific mail addresses

Hello,

Some quick suggestions that will work,
although your full requirements are not known. I am not exactly sure what
you need.

These are the "cheapest" options, since you
use vanilla HP-UX, without Mimedefang,
Procmail, Spamassassin and so on...

Option 1:
FEATURE(compat_check)
Screen sender/recipient pairs
For Sendmail V8.12 and above

Beginning with V8.12 sendmail, it is
possible to screen email based on sender and
recipient address pairs stored in the access
database. One use for such a method might be
to prevent one employee from receiving mail
from another employee. Another use might be
to prevent a pseudo-user, such as admin,
from receiving spurious reports from another
user, such as bin. Yet another use might be
to reject spam mail to a mailing list.

Here is an example from access file:

Compat:user1@mydom.dom<@>user2@extdom.dom2 DISCARD

That means user1@mydom.dom will not be able
to send messages to user2@extdom.dom2.

See manuals for more examples.

Option 2:
Set load average at which you just queue
messages in /etc/mail/sendmail.cf (or its
sendmail.mc file), to an artifically low
value so that no email goes out ever.

Hint, look at like in /etc/mail/sendmail.cf

O QueueLA=8

Then, set up a cron job or someting similar to remove all messages which are supposed to
never to be delivered to external addresses.

Option 3:
Set up a default SMTP gateway to be a
non-existent server (IP address that
is not reachabe in your company).

Then use mailertable to set up
individual external domains to
relay messages from them via your valid
relay host.

The "undeliverable" messages can be removed via simple cron job...

I can probably come with more ideas, but these three are the simplest.

Eventually, I sincerely believe
Mail Transfer Agent on HP-UX will move to
something like Postfix (I am a long-time
HP employee and we use Postfix for our
internet-bound deliveries).

Cheers,

VK2COT
Cheers,

VK2COT
VK2COT - Dusan Baljevic