Sendmail , dovecot 설치 및 트러블슈팅(Sendmail,dovecot install and troubleshooting)

1)기본 설치
샌드메일설치(instatll sendmail) – SMTP
sudo apt-get update
sudo apt-get install

dovecot설치(install dovecot) – POP3 & IMAP
sudo apt-get -y install dovecot-pop3d

샌드메일 재설치(Reinstall Sandmail)
sudo apt-get install –reinstall sendmail

샌드메일 삭제(uninstall sendmail)
sudo apt-get purge sendmail

디팬던시 삭제(uninstall dependancy)
sudo apt-get autoremove

샌드메일명령어 설치경로Sendmail command installation path
(샌드메일설치확인/Check whether Sendmail is installed)
which sendmail

시스템 부팅시 자동실행 등록Register automatic execution when system boots
sudo systemctl enable sendmail

시스템 부팅시 자동실행 서비스 삭제Deleting services that automatically run when the system boots
sudo systemctl disable sendmail

시스템로그보기View system log
journalctl -xe

access파일 수정 후 DB업데이트Update DB after modifying access file
makemap hash /etc/mail/access < /etc/mail/access

2)트러블슈팅(troubleshooting)

1. #sudo sendmailconfig 실행시 다음 메세지와함께 오류발생시
(/etc/mail/m4 디렉토리에 m4파일이 자동으로 생성되지 않는 경우)
When running #sudo sendmailconfig, an error occurs with the following message
(If the m4 file is not automatically created in the /etc/mail/m4 directory)

Reload the running sendmail now with the new configuration? [Y] y
Reloading sendmail …
make: *** No rule to make target '/etc/mail/m4/dialup.m4', needed by '/etc/mail/databases'. Stop.

다음 명령어 실행
(Run the following command)

#cd /etc/mail
#cp sendmail.mc sendmail.mc.backup  # Backup existing sendmail.mc file
#m4 /usr/share/sendmail/cf/m4/cf.m4 sendmail.mc > sendmail.cf
#sudo sendmailconfig
2. 샌드메일 프로세스가 항상 실행되어 있어서 샌드메일을 재시작 할 수 없는 경우
If you cannot restart sendmail because the sendmail process is always running.


샌드메일 프로세스 확인(Check sendmail process)

# ps aux | grep sendmail

root     3743899  0.0  0.4  22912  4560 ?        Ss   20:20   0:00 sendmail: MTA: accepting connections
root     3743900  0.0  0.4  22812  4072 ?        S    20:20   0:00 sendmail: MTA: ./41NMi0qL3650831 alt2.gmail-smtp-in.l.google.com.: user open
root     3743984  0.0  0.0   5196   720 pts/0    S+   20:25   0:00 grep --color=auto sendmail



프로세스 죽이기(kill process)

#kill 3743899
#kill 3743900

Leave a Reply

Your email address will not be published. Required fields are marked *