1

The environment is FreeBSD 10.2 with default services including sendmail.

Sending a message from one user to another on the system works fine:

mail -s "A message" userb
Hi b, this is a.
CTRL-D

Which results in:

su - userb
you have mail

but, how do you send a message to another server in the network (not hosted on the internet)? e.g.

mail -s "A message" userb@anotherhost
mail -s "A message" userb@[192.168.14.13]

The remote hosts are configured and working individually as described for the local host above, but the commands don't seem to work for sending to another host. It doesn't error out, but no mail shows up on the other server.

running mail -v -s "A message" userb@[192.168.14.13]

results in:

250 2.0.0 t9VKPqha007199 Message accepted for delivery userb@remote...
Sent (t9VKPqha007199 Message accepted for delivery) 
Closing connection to [127.0.0.1] >>> QUIT 221 2.0.0 
myhost closing connection

mailq shows:

t9VKOKhl007191 (Permission denied)
  • 1
    If you type mailq, does it show anything in the queue? – Mark Plotnick Oct 31 '15 at 19:36
  • What do the log files say? What happens when you include the -v flag on your mail command? – roaima Oct 31 '15 at 19:56
  • @MarkPlotnick - I see: t9VKOKhl007191 (Permission denied) – decuser Oct 31 '15 at 20:25
  • @roaima - I see: 250 2.0.0 t9VKPqha007199 Message accepted for delivery userb@remote... Sent (t9VKPqha007199 Message accepted for delivery) Closing connection to [127.0.0.1] >>> QUIT 221 2.0.0 myhost closing connection – decuser Oct 31 '15 at 20:26
  • 1
    Do you know whether any of the steps in the FreeBSD handbook for setting up mail have been done? If you don't do any setup, sendmail only listens for mail on localhost and won't listen for connections from other systems. – Mark Plotnick Oct 31 '15 at 22:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.