ご家庭サーバでの通知メール送信用
debian sargeの物を(再)修正。
課題点
CRAM-MD5部分のライセンスが不明確
The copyright on this software appears not to be free enough to distribut
within Debian. I have left it here as a aid for users to compile support into
their own binary but give other support to this code.パスワードを設定ファイル(/etc/ssmtp/ssmtp.conf)に平文で記述する必要がある
追記
ライセンスはクリアのようだ
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340803
http://utyuuzin.net/d/20051126.html
参考資料
ssmtp.c:read_config()
http://www.ietf.org/rfc/rfc2476.txt
diff -ur ssmtp1/ssmtp-2.61/debian/rules ssmtp2/ssmtp-2.61/debian/rules --- ssmtp1/ssmtp-2.61/debian/rules 2006-01-15 23:56:09.000000000 +0900 +++ ssmtp2/ssmtp-2.61/debian/rules 2006-01-15 21:35:01.000000000 +0900 @@ -8,7 +8,7 @@ CFLAGS = -O2 -g -Wall do_cfg: - test -f Makefile || ./configure --exec-prefix="/usr" --prefix="" --enable-ssl --with-cflags="$(CFLAGS)" + test -f Makefile || ./configure --exec-prefix="/usr" --prefix="" --enable-ssl --enable-md5auth --with-cflags="$(CFLAGS)" build: do_cfg make diff -ur ssmtp1/ssmtp-2.61/ssmtp.c ssmtp2/ssmtp-2.61/ssmtp.c --- ssmtp1/ssmtp-2.61/ssmtp.c 2006-01-15 23:56:09.000000000 +0900 +++ ssmtp2/ssmtp-2.61/ssmtp.c 2006-01-15 22:50:01.000000000 +0900 @@ -76,7 +76,7 @@ #else int log_level = 0; #endif -int port = 25; +int port = 587; #ifdef INET6 int p_family = PF_UNSPEC; /* Protocol family used in SMTP connection */ #endif diff -ur ssmtp1/ssmtp-2.61/debian/postinst ssmtp2/ssmtp-2.61/debian/postinst --- ssmtp1/ssmtp-2.61/debian/postinst 2006-01-15 23:56:09.000000000 +0900 +++ ssmtp2/ssmtp-2.61/debian/postinst 2006-01-15 23:44:40.000000000 +0900 @@ -71,6 +71,7 @@ echo "# MX records are consulted. Commonly mailhosts are named mail.domain.com" if test "$port" = "25" -o -z "$port" then + echo "#default port 587" echo "mailhub=$mailhub" else echo "mailhub=${mailhub}:$port" @@ -88,6 +89,11 @@ echo "# NO - Use the system generated From: address" test -z "$FromOverride" && echo -n "#" echo "FromLineOverride=YES" + echo + echo "# When you use SMTP-AUTH AuthMethod=CRAM-MD5 effective and you fill in the user-name and password." + echo "#AuthUser=" + echo "#AuthPass=" + echo "#AuthMethod=CRAM-MD5" fi # Program End