Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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.