FreeBSD의 명령줄에서 mailx를 사용하여 FROM 주소를 어떻게 변경합니까?

FreeBSD의 명령줄에서 mailx를 사용하여 FROM 주소를 어떻게 변경합니까?

저는 다음 시스템을 사용하고 있습니다.

$ uname -a
FreeBSD X 9.2-RELEASE-p17 FreeBSD 9.2-RELEASE-p17 #0 r282430: Mon May  4 13:59:58 PDT 2015     root@X:/usr/obj/usr/src/sys/R610  amd64
$ pkg info mailx
mailx-0.5_1
Name           : mailx
Version        : 0.5_1
Installed on   : Fri May 15 11:16:36 2015 EDT
Origin         : mail/mailx
Architecture   : freebsd:9:x86:64
Prefix         : /usr/local
Categories     : mail
Licenses       : 
Maintainer     : [email protected]
WWW            : UNKNOWN
Comment        : Mail command with mailx extensions
Annotations    :
    repo_type      : binary
    repository     : FreeBSD
Flat size      : 104KiB
Description    :
Mail command with mailx extensions.

    Mailx command is based on BSD mail command, but it also provides some
enhanced features such as:

o Edit header information.
o Use pager program to display long message.
o Add pipe (|) command.  You can pass the mail message to the shell command by
  using this feature.
o Add Save, Copy command.
o Add askcc, askbcc command.  The mailx program ask you Cc: and Bcc: at the
  beggining.
o Add hsubject command.  This is similar to subject command, but it only
  displays Subject: headers.
o Add tilda escape command.

See also the files in ${PREFIX}/share/doc/mailx directory.
$ 

mailx명령줄에서 on을 사용하여 FROM 주소를 변경하는 방법은 무엇입니까 ?FreeBSD

답변1

FreeBSD(운영 체제)에는 mailx 프로그램이 없습니다. 그러나 Berkeley Mail에서 파생된 mailx라는 여러 프로그램이 있습니다. 일부는 FreeBSD로 포팅되어 패키지로 제공되었습니다.

OP는 다음 패키지를 사용하고 있습니다.
mailx-0.5_1

이 패키지는 상당히 오래된 Perl 스크립트입니다.

오히려 Heirloom 버전의 mailx를 사용하는 것이 좋습니다.
가보-mailx-12.4_7

아직 오래되었지만 기능이 훨씬 더 풍부합니다. @Peschke가 올바르게 지적했듯이 FROM 주소를 설정할 수 있는 "-r" 옵션이 있습니다.

mailx -r [email protected] ...

가보 보기프로젝트 페이지그리고매뉴얼 페이지.

답변2

FreeBSD 프로그램에 이 옵션이 있는지 확실하지 않습니다 mailx(해당 프로그램에는 표시되지 않습니다).매뉴얼 페이지), 그러나 GNU/Linux 버전 mailx에서는 -r.

mailx -r [email protected] ...

내 제안은 매개변수를 사용하여 from 주소를 변경할 수 있는 sendmailFreeBSD 프로그램을 사용하는 것입니다 . 여기있어sendmail-f매뉴얼 페이지.

sendmail -f "[email protected]" ...

관련 정보