Unix/Solaris10

SmartList가 *.xxx.ac.kr, xxx.ac.kr에서 오는 메일은 무조건 배달하게 하기

ForceCore 2008. 1. 30. 00:52
SmarList는 accept와 dist가 분리되어있다.
그런데 문제는 같은 대학 내의 구성원이라면
해당 메일링리스트에 메일을 "보내기"는 누구나 가능하도록 하고 싶을 수도 있다.

http://www.animalgenome.org/SmartList/FAQ.html#Section_4.7

우선...
해당 메일링리스트로 간다.
testlist@xxx.ac.kr이라고 치자.

testlist디렉토리의 rc.submit을 delink한다.
$ ../.bin/delink rc.submit
그 뒤, 패치를 한다.

$ patch rc.submit
엔터를 누르면 도스의 copy con이나 유닉스의 sort, cat마냥 사용자의 입력을 받을 뿐 아무것도 안 할 것이다.
붙여넣기 신공으로
102a103,107
> * 2^0 ? if test -f postscreen; then \
> screenadress=`formail -xFrom: | sed -e 's/.*<\(.*\)>/\1/' \
> -e 's/\(.*\) (.*)/\1/'`; \
> postscreen $screenadress;\
> fi
라고 입력하고 컨트롤D 키를 누른다.
그러면 rc.submit이 패치된다.

위 내용을 적은 파일을 만들고서
patch rc.submit < 파일명
이렇게 했어도 됐지만 -_-;; 파일 만들기가 귀찮으면.

이번에는 postscreen이라는 파일을 만들어야 한다.
$ cp ../.examples/subscreen postscreen

그 파일을 열어보면
case "$1" in
*@hostile.our.local.domain) exit 1 ;; # Not this one
*@*our.local.domain) exit 0 ;; # This one is ok
*@some.other.domain) exit 0 ;; # Ditto
esac
이렇게 적힌 부분이 있다.
Not this one이란 부분을 삭제한다. -_-...
그리고 적당한 편집을 한다.
필자는 이런 모양이다.

case "$1" in
*@*.xxx.ac.kr) exit 0 ;; # This one is ok
*@xxx.ac.kr) exit 0 ;; # Ditto
esac