Koozali.org: home of the SME Server

FROM domain when using 'mail' command on console

guest22

FROM domain when using 'mail' command on console
« on: July 18, 2008, 07:52:55 AM »
Hi,

quick question. How, where is the FROM domain set when using the 'mail' command from the command line please?

TIA

guest

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: FROM domain when using 'mail' command on console
« Reply #1 on: July 18, 2008, 08:10:25 AM »
Hi,

quick question. How, where is the FROM domain set when using the 'mail' command from the command line please?

TIA

guest
My guess is somewhere like the mbox file in the users home folder.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline dmay

  • *
  • 450
  • +0/-0
    • http://myezserver.com
Re: FROM domain when using 'mail' command on console
« Reply #2 on: July 18, 2008, 05:08:40 PM »
where is the FROM domain set when using the 'mail' command from the command line please?

You should script the mail command and set appropriate qmail env variables:

#!/bin/sh
# Set QMAIL variables for sender, user@domain
export QMAILUSER=user
export QMAILHOST=domain
/bin/mail blah...

Darrell

guest22

Re: FROM domain when using 'mail' command on console
« Reply #3 on: July 19, 2008, 09:34:12 AM »
Thanks both. I've scripted it like Darrell suggested. Works perfectly fine.

Thanks for the swift reply.

guest