CLI 명령 참조
SirrMesh는 메일 서버를 관리하고 유지하기 위한 완전한 기능의 명령줄 도구를 제공합니다.
기본 명령
sirrmeshd
메인 프로그램 명령.
bash
sirrmeshd [command] [flags]전역 옵션
bash
--config string 설정 파일 경로 (기본값 "~/.sirrmeshd/config.toml")
--debug 디버그 모드 활성화
--help, -h 도움말 정보 표시
--version, -v 버전 정보 표시서비스 관리
run
메일 서버 시작.
bash
sirrmeshd run [flags]옵션:
bash
--daemon 백그라운드에서 실행
--pid-file string PID 파일 경로예제:
bash
sirrmeshd run --config /etc/sirrmeshd/config.tomlstop
실행 중인 서버 중지.
bash
sirrmeshd stoprestart
서버 재시작.
bash
sirrmeshd restartstatus
서버 상태 보기.
bash
sirrmeshd status출력:
상태: 실행 중
PID: 12345
업타임: 2d 5h 32m
연결: 42
처리된 메시지: 15,234사용자 관리
user create
새 사용자 생성.
bash
sirrmeshd user create [flags]옵션:
bash
--username string 사용자명 (이메일 주소)
--password string 비밀번호
--quota string 저장 공간 쿼터 (예: "5GB")
--blockchain string 블록체인 지갑 주소예제:
bash
sirrmeshd user create \
--username [email protected] \
--password secretpass \
--quota 5GBuser delete
사용자 삭제.
bash
sirrmeshd user delete --username [email protected]user list
모든 사용자 목록 보기.
bash
sirrmeshd user list [flags]옵션:
bash
--domain string 도메인으로 필터링
--format string 출력 형식 (table|json|csv)user modify
사용자 정보 수정.
bash
sirrmeshd user modify \
--username [email protected] \
--quota 10GBuser password
사용자 비밀번호 변경.
bash
sirrmeshd user password \
--username [email protected] \
--new-password newpass도메인 관리
domain add
새 도메인 추가.
bash
sirrmeshd domain add --name example.comdomain delete
도메인 삭제.
bash
sirrmeshd domain delete --name example.comdomain list
모든 도메인 목록 보기.
bash
sirrmeshd domain list설정 관리
config init
기본 설정 파일 생성.
bash
sirrmeshd config init > config.tomlconfig verify
설정 파일 검증.
bash
sirrmeshd config verifyconfig get
설정 항목 가져오기.
bash
sirrmeshd config get server.hostnameconfig set
설정 항목 설정.
bash
sirrmeshd config set server.hostname mail.example.comDKIM 관리
dkim generate
DKIM 키 쌍 생성.
bash
sirrmeshd dkim generate \
--domain example.com \
--selector default \
--bits 2048dkim show
DKIM 공개 키 레코드 표시.
bash
sirrmeshd dkim show --domain example.com출력:
DNS에 다음 TXT 레코드를 추가하세요:
default._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBg..."쿼터 관리
quota get
사용자 쿼터 보기.
bash
sirrmeshd quota get --user [email protected]출력:
사용자: [email protected]
쿼터: 5 GB
사용: 1.23 GB (24.6%)
사용 가능: 3.77 GBquota set
사용자 쿼터 설정.
bash
sirrmeshd quota set \
--user [email protected] \
--quota 10GBquota list
모든 사용자 쿼터 사용량 목록 보기.
bash
sirrmeshd quota list --sort-by used백업 및 복구
backup create
백업 생성.
bash
sirrmeshd backup create \
--output /backups/sirrchat-$(date +%Y%m%d).tar.gz \
--compress옵션:
bash
--user string 특정 사용자만 백업
--domain string 특정 도메인만 백업
--exclude-attachments 첨부 파일 제외backup restore
백업 복원.
bash
sirrmeshd backup restore \
--input /backups/sirrchat-20250115.tar.gzbackup list
사용 가능한 백업 목록 보기.
bash
sirrmeshd backup list --path /backups데이터베이스 관리
db migrate
데이터베이스 마이그레이션 실행.
bash
sirrmeshd db migratedb ping
데이터베이스 연결 테스트.
bash
sirrmeshd db pingdb vacuum
데이터베이스 최적화.
bash
sirrmeshd db vacuum스토리지 관리
storage stats
스토리지 통계 보기.
bash
sirrmeshd storage statsstorage test
스토리지 연결 테스트.
bash
sirrmeshd storage test --type s3storage migrate
스토리지 백엔드 마이그레이션.
bash
sirrmeshd storage migrate \
--from local \
--to s3storage cleanup
만료된 데이터 정리.
bash
sirrmeshd storage cleanup \
--older-than 2y \
--dry-run모듈 관리
module list
모든 모듈 목록 보기.
bash
sirrmeshd module listmodule enable
모듈 활성화.
bash
sirrmeshd module enable spam-filtermodule disable
모듈 비활성화.
bash
sirrmeshd module disable spam-filtermodule reload
모듈 다시 로드.
bash
sirrmeshd module reload --name spam-filter로그 관리
logs view
로그 보기.
bash
sirrmeshd logs view [flags]옵션:
bash
--lines int 줄 수 (기본값 100)
--follow, -f 실시간 추적
--level string 로그 레벨 필터링
--grep string 키워드 필터링예제:
bash
sirrmeshd logs view --lines 50 --level error
sirrmeshd logs view --follow --grep "[email protected]"모니터링 명령
stats
서버 통계 표시.
bash
sirrmeshd stats출력:
서버 통계
-----------------
업타임: 2d 5h 32m
전체 사용자: 1,234
활성 세션: 42
오늘의 메시지: 5,678
사용된 스토리지: 125.5 GB
SMTP 통계
---------------
발송: 2,345
수신: 3,333
거부: 12
IMAP 통계
---------------
활성 연결: 42
명령: 12,345health
헬스 체크.
bash
sirrmeshd health출력:
✓ 데이터베이스: OK
✓ SMTP: OK
✓ IMAP: OK
✓ 스토리지: OK
✓ 메모리: OK (45% 사용)
✓ 디스크: OK (32% 사용)진단 도구
diagnose
진단 검사 실행.
bash
sirrmeshd diagnosetest-smtp
SMTP 기능 테스트.
bash
sirrmeshd test-smtp \
--from [email protected] \
--to [email protected] \
--subject "Test Email"test-imap
IMAP 기능 테스트.
bash
sirrmeshd test-imap \
--user [email protected] \
--password pass셸 자동 완성
셸 자동 완성 스크립트 생성.
Bash
bash
sirrmeshd completion bash > /etc/bash_completion.d/sirrmeshdZsh
bash
sirrmeshd completion zsh > "${fpath[1]}/_sirrmeshd"Fish
bash
sirrmeshd completion fish > ~/.config/fish/completions/sirrmeshd.fish환경 변수
bash
SIRRCHAT_CONFIG 설정 파일 경로
SIRRCHAT_DEBUG 디버그 모드 활성화
SIRRCHAT_LOG_LEVEL 로그 레벨
SIRRCHAT_DATA_DIR 데이터 디렉터리자세한 정보: