Forward alice's local mail to helpdesk@example.net using ~/.forward.
Which file content is appropriate?
A .forward file can contain the destination address directly, without an alias name or colon.
Detailed explanation
alice: helpdesk@example.netIncorrect. This is /etc/aliases syntax, not a simple .forward entry.
Incorrect. This is /etc/aliases syntax, not a simple .forward entry.
forward=helpdesk@example.netIncorrect. It is not a shell variable assignment.
Incorrect. It is not a shell variable assignment.
helpdesk@example.netCorrect. The destination address can be written on its own line.
Correct. The destination address can be written on its own line.
mailq helpdesk@example.netIncorrect. mailq is a queue command, not file content.
Incorrect. mailq is a queue command, not file content.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s\n' 'helpdesk@example.net'Expected result
helpdesk@example.netKey points
- Write destination directly
- No alias left side
- Read by local MTA
Notes
- Environment: 合成.forward内容の表示のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.