Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
SSMTPのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
SSMTP
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:メールサーバー]] [[en:SSMTP]] SSMTP はローカルコンピュータから設定したメールホスト (メールハブ) にメールを配達するプログラムです。([[sendmail]] などのような機能豊富なメールサーバーと違って) メールサーバーではないのでメールを受信したり、エイリアスを展開したりキューを管理することはできません。SSMTP は主としてマシンから (システムアラートのような) 自動メールを外部のメールアドレスに飛ばすのに使われます。 ==インストール== {{Pkg|ssmtp}} パッケージを[[インストール]]してください。 ==Gmail メールサーバーに転送== SSMTP を使うには、設定ファイル ({{ic|/etc/ssmtp/ssmtp.conf}}) を編集してアカウント設定を入力する必要があります: {{bc|<nowiki> # The user that gets all the mails (UID < 1000, usually the admin) root=username@gmail.com # The mail server (where the mail is sent to), both port 465 or 587 should be acceptable # See also http://mail.google.com/support/bin/answer.py?answer=78799 mailhub=smtp.gmail.com:587 # The address where the mail appears to come from for user authentication. rewriteDomain=gmail.com # The full hostname hostname=localhost # Use SSL/TLS before starting negotiation UseTLS=Yes UseSTARTTLS=Yes # Username/Password AuthUser=username AuthPass=password # Email 'From header's can override the default domain? FromLineOverride=yes </nowiki>}} {{note|Take note, that the shown configuration is an example for Gmail, You may have to use other settings. If it is not working as expected read the man page {{ic|man 8 ssmtp}}, please.}} ローカルのユーザー名のエイリアスを作成 (任意): {{hc|/etc/ssmtp/revaliases|root:username@gmail.com:smtp.gmail.com:587 mainuser:username@gmail.com:smtp.gmail.com:587}} Gmail サーバーに正しくメールを転送できているかテストするには: {{bc|<nowiki>$ echo test | mail -v -s "testing ssmtp setup" tousername@somedomain.com</nowiki>}} 'root' の代わりに 'root at myhost' からメールを受信するには {{ic|/etc/passwd}} を編集して 'From' テキストを変更します: {{bc|# chfn -f 'root at myhost' root # chfn -f 'mainuser at myhost' mainuser}} これで {{ic|/etc/passwd}} が以下のように変更されます: {{hc|$ grep myhostname /etc/passwd|root:x:0:0:root@myhostname,,,:/root:/bin/bash mainuser:x:1000:1000:mainuser@myhostname,,,:/home/mainuser:/bin/bash}} ==セキュリティ== Because your email password is stored as cleartext in {{ic|/etc/ssmtp/ssmtp.conf}}, it is important to secure the file. Securing ssmtp.conf will ensure that: *if any users have unprivileged access to your system, they cannot read the file and see your email password, while still letting them send out email *if your user account is ever compromised, the hacker cannot read the {{ic|ssmtp.conf}} file, and therefore your email password, unless he gains access to the root account as well To secure {{ic|ssmtp.conf}}, do this: {{ic|ssmtp}} グループを作成: # groupadd ssmtp {{ic|ssmtp.conf}} のグループ所有者を新しく作った {{ic|ssmtp}} グループに設定: # chown :ssmtp /etc/ssmtp/ssmtp.conf Set the group owner of the ''ssmtp'' binary to the new {{ic|ssmtp}} group: # chown :ssmtp /usr/bin/ssmtp Make sure only root, and the {{ic|ssmtp}} group can access {{ic|ssmtp.conf}}: # chmod 640 /etc/ssmtp/ssmtp.conf Set the SGID bit on the ''ssmtp'' binary. # chmod g+s /usr/bin/ssmtp Now, all the regular users can still send email using the terminal, but none can read the {{ic|ssmtp.conf}} file. ==メールの送信== ターミナルからメールを送信するには、以下を実行: $ echo "this is the body" | mail -s "Subject" username@somedomain.com もしくは次を実行することでインタラクティブに送信できます: $ mail username@somedomain.com {{Note|When using mail interactively, after typing the Subject and hitting enter, you type the body. Hit {{ic|Ctrl}}+{{ic|d}} on a blank line to end your message and automatically send it out.}} An alternate method for sending emails is to create a text file and send it with ''ssmtp'' or ''mail'' {{hc|test-mail.txt|To:username@somedomain.com From:youraccount@gmail.com Subject: Test This is a test mail.}} {{ic|test-mail.txt}} ファイルを送信: $ mail username@somedomain.com < test-mail.txt ===添付ファイル=== 添付ファイルを追加する場合、[[Mutt]] と [[Msmtp]] をインストール・設定して [http://www.cyberciti.biz/tips/sending-mail-with-attachment.html nixcraft] を見て下さい。 または、''uuencode'' を使って添付することも可能です: $ uuencode file.txt file.txt | mail user@domain.com ==参照== *[https://bbs.archlinux.org/viewtopic.php?pid=446831 SSMTP and Gmail on the Arch forums] *[http://tombuntu.com/index.php/2008/10/21/sending-email-from-your-system-with-ssmtp/ Sending Email From Your System with sSMTP] *[http://www.scottro.net/qnd/qnd-ssmtp.html The Qnd Guide to ssmtp] *[http://mail.google.com/support/bin/answer.py?answer=78799 GMail Support - Configuring other mail clients]
このページで使用されているテンプレート:
テンプレート:AUR
(
ソースを閲覧
)
テンプレート:Bc
(
ソースを閲覧
)
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:Note
(
ソースを閲覧
)
SSMTP
に戻る。
検索
検索
SSMTPのソースを表示
話題を追加