My Profile

Keep Up to Date:
Blog RSS
Blog
Forum RSS
Forum
Post New Topic Post Reply
Posted 1 Month, 1 Week ago
bluelou
Senior Boarder
Posts: 67
graphgraph
User Offline
 
How do I mail a file from the command line? I'd appreciate an example of the syntax.
The administrator has disabled public write access.
Posted 1 Month, 1 Week ago
SweaTz
Senior Boarder
Posts: 50
graphgraph
User Offline
 
The body is the output of the commands before the mail command.

HTH
The administrator has disabled public write access.
Posted 1 Month, 1 Week ago
ppreddy
Senior Boarder
Posts: 79
graphgraph
User Offline
 
What kind of file?

If it's a plain text file,

mail -s 'neat text file' This e-mail address is being protected from spam bots, you need JavaScript enabled to view it < somefile

will *usually* do it (if you have your mail system set up right to alias your system to something reasonable and forward mail through your ISP's 'smarthost).

If it's a binary file, you'd need to uuencode it to turn it into a text file before you send it, and uudecode it back into a binary file on the other end. I'd prefer not to go into that unless I need to .
The administrator has disabled public write access.
Posted 1 Month, 1 Week ago
RAZA
Expert Boarder
Posts: 109
graph
User Offline
 
'BJR'
The administrator has disabled public write access.
Posted 1 Month, 1 Week ago
audibert
Senior Boarder
Posts: 68
graphgraph
User Offline
 
dunno about mailx, however.

HTH
The administrator has disabled public write access.
Posted 1 Month, 1 Week ago
chandu
Senior Boarder
Posts: 75
graphgraph
User Offline
 
This worked fine when I tried it on a Solaris system but it's not working on my Redhat 7.3 boxes. All of my regular outgoing mail goes through Sendmail so Sendmail is mostly configured properly. What do I have to do to configure it so that the mail command works? Here is the error report:

Reporting-MTA: dns; localhost.localdomain Arrival-Date: Sat, 21 Jun 2003 23:20:11 -0400

Final-Recipient: RFC822; This e-mail address is being protected from spam bots, you need JavaScript enabled to view it Action: failed Status: 5.1.3 Diagnostic-Code: SMTP; 553 localhost.localdomain does not exist Last-Attempt-Date: Sat, 21 Jun 2003 23:20:11 -0400
The administrator has disabled public write access.
Posted 1 Month, 1 Week ago
audibert
Senior Boarder
Posts: 68
graphgraph
User Offline
 
NO it isn't.

The mail command works fine.

There you are. Fix your hostname. You are not in dns. No reputable machine will accept mail from someone like that.
The administrator has disabled public write access.
Posted 1 Month, 1 Week ago
gromit
Senior Boarder
Posts: 61
graphgraph
User Offline
 
Evolution is configured to use Sendmail not a SMTP server and it's working fine, mail doesn't work. Mail is getting a data format error.

Here are the mail logs for both messages,

MAIL:

Jun 22 09:32:04 localhost sendmail[12566]: h5MDW4812566: from=root, size=102, class=0, nrcpts=1, msgid=< This e-mail address is being protected from spam bots, you need JavaScript enabled to view it > , relay=root@localhost Jun 22 09:32:04 localhost sendmail[12569]: h5MDW4812566: to= This e-mail address is being protected from spam bots, you need JavaScript enabled to view it , ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=30102, relay=mail.polybus.com. [209.235.0.132], dsn=5.6.0, stat=Data format error Jun 22 09:32:04 localhost sendmail[12569]: h5MDW4812566: h5MDW4712569: DSN: Data format error Jun 22 09:32:04 localhost sendmail[12569]: h5MDW4712569: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30202, dsn=2.0.0, stat=Sent

EVOLUTION: Jun 22 09:32:59 localhost sendmail[12574]: h5MDWxk12574: Authentication-Warning: localhost.localdomain: bjrosen set sender to This e-mail address is being protected from spam bots, you need JavaScript enabled to view it using -f Jun 22 09:32:59 localhost sendmail[12574]: h5MDWxk12574: from= This e-mail address is being protected from spam bots, you need JavaScript enabled to view it , size=390, class=0, nrcpts=1, msgid=< This e-mail address is being protected from spam bots, you need JavaScript enabled to view it >, relay=bjrosen@localhost Jun 22 09:33:01 localhost sendmail[12577]: h5MDWxk12574: to= This e-mail address is being protected from spam bots, you need JavaScript enabled to view it , ctladdr= This e-mail address is being protected from spam bots, you need JavaScript enabled to view it (500/500), delay=00:00:02, xdelay=00:00:02, mailer=esmtp, pri=30390, relay=mail.polybus.com. [209.235.0.132], dsn=2.0.0, stat=Sent (Message received: 20030622133428.WEWY28645.mxsmta03.dellhost....@localhos t.localdomain)
The administrator has disabled public write access.
Posted 1 Month, 1 Week ago
0Kelvin
Senior Boarder
Posts: 73
graphgraph
User Offline
 
NO it isn't. Your machine is not in dns. Nobody will accept mail from it.

No it isn't!

This is not of interest. The reject message from the target told you what was wrong! Fix your hostname!

Ditto.

Why does it take so much effort to make a simple thing sink into some peoples skulls? FIX YOUR HOSTNAME! Read the reject message you got. It is explicit. You are sending from 'localhost.localdomain'. That is a nonsense. Fix it.
The administrator has disabled public write access.
Posted 1 Month, 1 Week ago
sweetfresa14
Senior Boarder
Posts: 60
graphgraph
User Offline
 
It's not the hostname, it's the FROM address that's the problem. HOSTNAME enters into the problem because the system is using the hostname as the default domain. Evolution works because it use my correct email address in the FROM field. Using the Webmin Sendmail module's mail client I was able to successfully send a message as long as I changed the FROM field to my real e-mail address. Is there a command line switch or a configuration option to force mail to use a specific FROM address?
The administrator has disabled public write access.
Posted 1 Month ago
0Kelvin
Senior Boarder
Posts: 73
graphgraph
User Offline
 
Thanks Jim, that fixed it. Both the genericstable and masquerade_envelope were required.
The administrator has disabled public write access.
 
Copyright © 2006 - Nov 2008 My Linux Gang