Setting From Address using mail command

Richard Hobbs richard.hobbs at crl.toshiba.co.uk
Fri Oct 8 10:55:38 UTC 2004


Hello,

I desperately need a way of specifying the From: address when using the mail
command. It doesn't seem to have a command line argument for this.

Basically, the mail server we use seems to do a lookup on the domain of the
From: address of each email to be delivered. If that domain isn't able to be
looked up (i.e. it's something like "hostname.sub.domain.com" instead of
"sub.domain.com") then it fails to deliver the mail.

I don't know if we are able to alter the settings of the mail server in this
way, because we effectively rent the services from messagelabs (who do our
virus checking etc...). Asking them to change a setting like this probably
would get us nowhere.

The backup software we are using, and lots of scripts, use "mail -s subject
user at domain.com" to email people, but none of these emails are getting
through because our internal hostnames are not available to the outside
world, for obvious reasons.

At the moment, the from addresses are being set to:

  user at host.sub.domain.com

and we need them to be set to this instead:

  user at sub.domain.com

I guess there are two options... One is to reconfigure sendmail on each
host, and the other is to somehow specify a from address using the mail
command.

The much preferred solution is to do something that does not involve
changing the mail command, or the data or arguments sent to the mail
command. Upgrading the mailx package is possible though. The reason I don't
want to change the command used to send the email is because I don't know if
we will be able to do this within the backup software.

I'm sure lots of people have experienced this before, but how did you all
get around the problem of emailing from internal host machines to the
outside world?

Thanks in advance,
Hobbs.

-- 
Richard Hobbs (Systems Administrator)
Toshiba Research Europe Ltd. - Speech Technology Group
Web: http://www.toshiba-europe.com/research/
Email: richard.hobbs at crl.toshiba.co.uk
Tel: +44 1223 376964        Mobile: +44 7811 803377



_____________________________________________________________________
This e-mail has been scanned for viruses by MCI's Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.com




More information about the redhat-list mailing list