.bashrc 프롬프트 색, 형식 변경 – CentOS

# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias ll='ls -al --block-size=M'

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

export PS1="\[\e[31;1m\][\u@\[\e[34;1m\]\H \W]# \[\e[0m\]"

저장한 후에 로그아웃하고 로그인을 다시 하면 이뿌게 보임 ^^

재로그인이 귀찮다면 아래 Command 를 이용하면 재로그인 없이 바로 사용가능.

source ~/.bashrc

Exim 로그 항목 설정 방법


웹사이트를 개발하고 서버를 관리하다 보면 서버를 통해 정말 많은 스팸이 발송 되는 경우가 많다.

서버에 ssh 등으로 접속해서 /etc/exim.conf 설정 파일을 열어보면 log_selector 라는 항목이 있는데 이 부분을 좀더 상세하게 아래와 같이 설정하면 스팸이 발송될때 추적이 좀더 용이해 진다.

log_selector = +address_rewrite +all_parents +arguments +connection_reject +delay_delivery +delivery_size +dnslist_defer +incoming_interface +incoming_port +lost_incoming_connection+queue_run +received_sender +received_recipients +retry_defer +sender_on_delivery +size_reject +skip_delivery +smtp_confirmation +smtp_connection +smtp_protocol_error +smtp_syntax_error +subject +tls_cipher +tls_peerdn

 

설정 변경후 exim 을 재시작 해주면 이후 부터 발송 되는 이메일의 로그가 좀더 상세하게 나오게 된다.

이로 인해 어떤 이메일이 해킹되서 권한을 얻어 스팸 이메일을 발송하는지 쉽게 찾아 낼 수 있다.

연관글: 해킹 – 변경된 파일 검색 방법

연관글: cPanel 이메일 에러 – has exceeded the max defers and failures per hour