1753788 Members
7393 Online
108799 Solutions
New Discussion юеВ

Unix expression question

 
Kathleen
Regular Advisor

Unix expression question

I want to block certain email addresses in the sendmail access file.

The address I want to block is
offer12345@excite.com

The 12345 changes so I would like to enter the email address in that file in the format of block everything that starts with offer, has any number in the middle, and ends with @excite.com
I am not sure the format to enter that in. Can anyone help?
Thanks in advance.
3 REPLIES 3
steven Burgess_2
Honored Contributor

Re: Unix expression question

Hi Kathleen

I'm not sure it's as simple as using an expression to allow the shell to match all patterns

ie

'[0-9a-b]?@excite.com'

Have a look through this document.

http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000064128788

HTH

Steve
take your time and think things through
Geoff Wild
Honored Contributor

Re: Unix expression question

Here's a better way, add the following to sendmail.cf:

SIsexcite$
R$* excite.com $*^I$@ OK$
R$* ^I$#error $: "550 Access Denied. Forgeries are disallowed."$
$
SLocal_check_mail$
R$* excite.com $*^I$: $>Isexcite $&{client_name}$


NOTE: the ^I is a tab, $ is return


What this does is prevent someone from using a excite.com address and sending email from their server - it only allows email from excite's server....you can do this for hotmail,,,etc.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Geoff Wild
Honored Contributor

Re: Unix expression question

except that some of the $ are $!

Only the $ at the end of the line is a return - sorry about that.



Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.