msmtp
㨠msmtp-mta
ãã¤ã³ã¹ãã¼ã«ãã㨠sendmail
äºæã®ã³ãã³ããçãããã CLI ããã¡ã¼ã«ããµã¯ã£ã¨éãã。
ãã㯠Git 㧠ML ã« patch ã«éãéã«ä¾¿å©ã§ãã。
defaults
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-bundle.crt
logfile ~/.msmtp.log
account gmail
host smtp.gmail.com
port 587
from [email protected]
user example
passwordeval "gpg --quiet --for-your-eyes-only --decrypt ~/.msmtp-gmail.gpg"
account outlook
host smtp.office365.com
port 587
from [email protected]
user [email protected]
passwordeval "gpg --quiet --for-your-eyes-only --decrypt ~/.msmtp-outlook.gpg"
account default : gmail
ãããã風ã«è¨å®ãæ¸ãã¦ããã°ãã。
ã¾ã,ãã®éã« password ã«å¹³æã§ãã¹ã¯ã¼ããæ¸ããã¨ãã§ããã,passwordeval ã¨ãã¦æå·åããããã¡ã¤ã«ã復å·ããã³ãã³ããè¨è¿°ããã¨,
ãã¹ã¯ã¼ããæå·åãå¥ã«æ±ããã®ã§ä¾¿å©ã§ãã。
ãã¦,ãã㧠GPG ã®æå·åãªã®ã ã,æå·åã®ã³ãã³ãã¯ä»¥ä¸ã®éã
➤ gpg --encrypt -o ~/.msmtp-gmail.gpg -r [email protected] -
password
^D
-r
ã«æå®ããã¡ã¼ã«ã¢ãã¬ã¹ã¯èªåã® GPG ç§å¯éµã«ç»é²ãã¦ããã¡ã¼ã«ã¢ãã¬ã¹ã§ãã。
ã³ãã³ãã®æ«å°¾ã« -
ãæå®ãã¦ããã®ã§æ¨æºå
¥åããæå·åããããã¹ããå
¥åãããã¨ã«ãªã, Ctrl-D
ã§å
¥åãæã¡åã。
ãã®ä¾ã§ã¯「password」ã¨ããæååãæå·åã㦠~/.msmtp-gmail.gpg
ã«ä¿åãããã¨ã«ãªã。
ãããããã§ããããã¤ã³ãããã。
gpg: XXXXXXXX: There is no assurance this key belongs to the named user
ãªã©ã¨è¨ãããå ´åã 。ä»æã®ãã·ã³ããç§å¯éµãæã£ã¦ã㦠import ããã¨ããªã©ã«èµ·ãã。
ããã¯èªåã®éµãä¿¡ç¨ããè¨å®ã«ãå¿ãã¦ãããã,
➤ gpg --edit-key XXXXXX
ã¨éµã®ã·ã°ããã£ãæå®ã edit-key ãããã°è¯ãã®ã ã,
gpg: can't do this in batch mode
ã¨è¨ãããã®ã 。ããã¯æã«ã¯èµ·ããªãã£ãæ°ããã(ã©ãã㦅…)
➤ gpg --command-fd 0 --status-fd 1 --expert --edit-key XXXXXXXXX
[GNUPG:] KEY_CONSIDERED XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 0
Secret key is available.
...(ç¥)...
[GNUPG:] GET_LINE keyedit.prompt
trust
[GNUPG:] GOT_IT
...(ç¥)...
Please decide how far you trust this user to correctly verify other users' keys
(by looking at passports, checking fingerprints from different sources, etc.)
1 = I don't know or won't say
2 = I do NOT trust
3 = I trust marginally
4 = I trust fully
5 = I trust ultimately
m = back to the main menu
[GNUPG:] GET_LINE edit_ownertrust.value
5
[GNUPG:] GOT_IT
[GNUPG:] GET_BOOL edit_ownertrust.set_ultimate.okay
y
[GNUPG:] GOT_IT
...(ç¥)...
[GNUPG:] GET_LINE keyedit.prompt
quit
[GNUPG:] GOT_IT
ãã®ããã«, --command-fd
㨠--status-fd
ãªã©ãããããæ¨æºå
¥å,æ¨æºåºåã«ã,ãã¨ã¯,「trust 5 y quit」ã¨é çªã«ã³ãã³ããå
¥ãã¦ããã°ãã。