1
有什么办法.netrc
或.fetchmailrc
可以的.netrc,.fetchmailrc中,和非硬编码密码
- 从环境变量中获取的密码,或
- 从催生/分叉壳取呢?
set my_pw_gmail=`some shell command that emits to stdout`
是否有这两种RC文件的任何类似的能力:
mutt
可以像这样做呢?
谢谢!
有什么办法.netrc
或.fetchmailrc
可以的.netrc,.fetchmailrc中,和非硬编码密码
set my_pw_gmail=`some shell command that emits to stdout`
是否有这两种RC文件的任何类似的能力:
mutt
可以像这样做呢?
谢谢!
这取决于如何读取和解释配置文件。这意味着c/C++/java或其他任何必须在后面的字符串中调用system()
的等价物。
BSD的ftp和gnu ftp使用环境变量来查找.netrc。对于gnu(你可能有)导出NETRC=/path/to/different
其中/ path/to/different是.netrc的一个版本所在的目录。它也将使用HOME默认的.netrc
这里阅读: http://www.manpagez.com/man/1/ftp/
BSD FTP使用HOME变量寻找.netrc文件。
fetchmail的是不同的
HOME_ETC
If the HOME_ETC variable is set, fetchmail will read $HOME_ETC/.fetchmailrc instead of ~/.fetchmailrc.
If HOME_ETC and FETCHMAILHOME are both set, HOME_ETC will be ignored.
参见:http://linux.die.net/man/1/fetchmail
因此,环境变量是回答你的问题,因为你是由你的查询暗示其使用。但答案意味着你需要几个不同的文件,而不仅仅是一个。