FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 09-23-2008, 03:28 PM
Eric Maquiling
 
Default send email from command line

On Tue, Sep 23, 2008 at 08:14:51PM +1000, Erik Christiansen wrote:
>
>Does it not work when you just type "mail mierda", then <enter>?

For mostly English speakers, you have no idea how funny "mail meirda" sounds

I hate getting meirda in the mail.

--
em

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-23-2008, 08:43 PM
"mierda tuti"
 
Default send email from command line

Sorry I don't explain too well.

I would like to send e-mail outside of my lan, to send email to for example to someone gmail email

Many thanks!


2008/9/23 Eric Maquiling <emaquili@gmail.com>

On Tue, Sep 23, 2008 at 08:14:51PM +1000, Erik Christiansen wrote:

>

>Does it not work when you just type "mail mierda", then <enter>?



For mostly English speakers, you have no idea how funny "mail meirda" sounds



I hate getting meirda in the mail.



--

em



--

ubuntu-users mailing list

ubuntu-users@lists.ubuntu.com

Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-23-2008, 08:53 PM
"Mark Haney"
 
Default send email from command line

mierda tuti wrote:
> Sorry I don't explain too well.
>
> I would like to send e-mail outside of my lan, to send email to for example
> to someone gmail email
>
> Many thanks!
>

Please don't top post.

If you want to send a message from the command line, there are a lot of
different ways. Here are a few. You don't say /what/ you want to send,
so this might not all be useful.

1. Telnet to port 25 of the mail server you want. (Not practical, BUT
it works, I do it often when I need to test.)

2. Use a text mail client, pine, or mutt or something similar. I like
pine, but that's personal preference.

3. Use the 'mail' command as stated in the previous post. It usually
looks like this: mail -s "Subject: <whatever>" <recipient email> < text
of email in text file.

I use this quite often in scripts to mail output of various commands to
alert me to certain conditions or just mail output of a log to my email
account.

Does that help?




--
Libenter homines id quod volunt credunt -- Caius Julius Caesar


Mark Haney
Sr. Systems Administrator
ERC Broadband
(828) 350-2415

Call (866) ERC-7110 for after hours support

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-23-2008, 09:57 PM
Eric Maquiling
 
Default send email from command line

On Tue, Sep 23, 2008 at 10:43:52PM +0200, mierda tuti wrote:
>
>I would like to send e-mail outside of my lan, to send email to for example
>to someone gmail email

You mean something like this:
mail someone@gmail.com < myfile

You can try it and in another term window, do the following:
tail -f /var/log/mail.log

Then what are the errors saying? (change someone@gmail.com to a real email)
--
em

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-23-2008, 10:46 PM
Karl Larsen
 
Default send email from command line

Eric Maquiling wrote:
> On Tue, Sep 23, 2008 at 10:43:52PM +0200, mierda tuti wrote:
>
>> I would like to send e-mail outside of my lan, to send email to for example
>> to someone gmail email
>>
>
> You mean something like this:
> mail someone@gmail.com < myfile
>
> You can try it and in another term window, do the following:
> tail -f /var/log/mail.log
>
> Then what are the errors saying? (change someone@gmail.com to a real email)
>
I have loaded the mailx software. Here is what it says I have:

karl@karl-hardy:~$ mail -V
mail (GNU Mailutils 1.1)

This you can get with apt-get install mail and it works right out of the
box between users on your own computer. I use it to read the root mail
from cron and today had one about a problem I need to check. It is 100%
command line.

Now there must be a way to set up mail so if you use a good email
address like

mail k5di@zianet.com

it should send that, but I think it is trying to get sendmail to send it
and mine is not set up. There should be a way to set the SMTP to be the
one we pay for. Does anyone do this or know how? I have these files:

karl@karl-hardy:~$ ls /etc/mail*
/etc/mailcap /etc/mailcap.order /etc/mailname /etc/mail.rc /etc/mail.rc~
karl@karl-hardy:~$

In mail.rc you can put your whole email list into. The mailcap file is
large and I do not know if you want to mess with it.

Karl


--

Karl F. Larsen, AKA K5DI
Linux User
#450462 http://counter.li.org.
PGP 4208 4D6E 595F 22B9 FF1C ECB6 4A3C 2C54 FE23 53A7


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-23-2008, 10:55 PM
Eric Maquiling
 
Default send email from command line

On Tue, Sep 23, 2008 at 04:46:14PM -0600, Karl Larsen wrote:

[...]
>it should send that, but I think it is trying to get sendmail to send it
>and mine is not set up. There should be a way to set the SMTP to be the
>one we pay for. Does anyone do this or know how? I have these files:
[...]
:/ Confused

You want to send mail outside of your company to an outside email? In PINE,
you can define your SMTP relay.

If you want to send mail via the CL, (mail prez@whitehouse.gov < mytaxes), then
you need to set up relay in /etc/sendmail.cf

Lots of documentation on how to edit sendmil.mc but if you want quick and dirty
test it go to the /etc/mail/sendmail.cf:

Line # 116 (in my Ubuntu distro)
or it'll say: # "Smart" relay host (may be null)
Add
DSthesmptrelay_of_your_ISP_PROVIDER

restart sendmail

This is what mine looks like:

# "Smart" relay host (may be null)
DSsmtp.west.cox.net

The do 'mail -s "test" someonereal@gmail.com < /etc/profile'
and then
tail -f /var/log/mail.log

Should look like this:
Sep 23 15:38:05 ubuntu-1 sm-mta[18506]: m8NMc59p018504:
to=<someonereal@gmail.com>,
delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120702,
relay=smtp.west.cox.net. [68.6.19.4], dsn=2.0.0, stat=Sent
(JNfm1a00H0qDha004NfnpV mail accepted for delivery)

--
em

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-24-2008, 01:22 AM
Derek Broughton
 
Default send email from command line

Karl Larsen wrote:

> Now there must be a way to set up mail so if you use a good email
> address like
>
> mail k5di@zianet.com
>
> it should send that, but I think it is trying to get sendmail to send it
> and mine is not set up. There should be a way to set the SMTP to be the
> one we pay for.

No, there shouldn't. Mail was written by people who believe that mail
clients _shouldn't_ speak SMTP, and it _must_ have a sendmail-compatible
program to actually deliver the mail.
>

--
derek


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-24-2008, 03:43 AM
Ken McLennan
 
Default send email from command line

G'day there Derek,




No, there shouldn't. Mail was written by people who believe that mail
clients _shouldn't_ speak SMTP, and it _must_ have a sendmail-compatible
program to actually deliver the mail

*** I've no idea about the pros & cons of mtas. Is there a
thumbnail version of the argument somewhere? or can you please explain
why someone would think SMTP should be avoided?



See ya

Ken McLennan

Qld, Australia.



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-24-2008, 04:57 AM
Smoot Carl-Mitchell
 
Default send email from command line

On Tue, 2008-09-23 at 22:22 -0300, Derek Broughton wrote:
> Karl Larsen wrote:
>
> > Now there must be a way to set up mail so if you use a good email
> > address like
> >
> > mail k5di@zianet.com
> >
> > it should send that, but I think it is trying to get sendmail to send it
> > and mine is not set up. There should be a way to set the SMTP to be the
> > one we pay for.
>
> No, there shouldn't. Mail was written by people who believe that mail
> clients _shouldn't_ speak SMTP, and it _must_ have a sendmail-compatible
> program to actually deliver the mail.

The above is one model, but there are mail user agents (MUAs) which can
speak SMTP. (e.g. Evolution and Thunderbird among others). There is
nothing in the standards (RFC2821) which prevent an MUA from speaking
SMTP with a Mail Transport Agent (MTA). The usual practice on
Unix/Linux systems is to pass the mail message to a local "sendmail" MTA
process for further processing. Typically, this is handled by passing
the message to the local MTA via a Unix pipe with arguments supplied to
the MTA which give the recipient addresses. The sender address is
typically derived from the uid of the MUA process. This initial message
passing can also be handled via SMTP, if desired.

One of the reasons the email system on Unix/Linux systems has this
architecture is to relieve the MUA from the task of handling transient
errors (network down, DNS failure, remote SMTP server unavailable, etc)
and allow messages to be queued for later delivery. The "sendmail"
process can handle this as a background daemon which makes the delivery
system more robust. In most cases the local MTA which receives the
message is configured to speak SMTP with a more capable SMTP server
which understands how to forward mail to the final email destination.
Typically, this more capable SMTP server is managed by your Internet
provider. In some cases authentication is required to connect to this
server to prevent unauthorized email forwarding.

To reiterate this model was an architectural choice and is not mandated
by the underlying protocol specifications.
--
Smoot Carl-Mitchell
System/Network Architect
smoot@tic.com
+1 480 922 7313
cell: +1 602 421 9005

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-24-2008, 05:22 AM
"mierda tuti"
 
Default send email from command line

Hi,

Well I don't explain to well.

I have kubuntu 8,04 and I would like to send email for example to mierdatuti@gmail.com., because I don't know too much about how configure it, I 've saw that I have to configure a MTA (like postfix or sendmail) with relay host. My relay host is gmail. Could you say me how to configure it?


Many* thanks and sorry for my english!



2008/9/24 Smoot Carl-Mitchell <smoot@tic.com>

On Tue, 2008-09-23 at 22:22 -0300, Derek Broughton wrote:

> Karl Larsen wrote:

>

> > Now there must be a way to set up mail so if you use a good email

> > address like

> >

> > mail k5di@zianet.com

> >

> > it should send that, but I think it is trying to get sendmail to send it

> > and mine is not set up. There should be a way to set the SMTP to be the

> > one we pay for.

>

> No, there shouldn't. *Mail was written by people who believe that mail

> clients _shouldn't_ speak SMTP, and it _must_ have a sendmail-compatible

> program to actually deliver the mail.



The above is one model, but there are mail user agents (MUAs) which can

speak SMTP. (e.g. Evolution and Thunderbird among others). There is

nothing in the standards (RFC2821) which prevent an MUA from speaking

SMTP with a Mail Transport Agent (MTA). *The usual practice on

Unix/Linux systems is to pass the mail message to a local "sendmail" MTA

process for further processing. *Typically, this is handled by passing

the message to the local MTA via a Unix pipe with arguments supplied to

the MTA which give the recipient addresses. *The sender address is

typically derived from the uid of the MUA process. This initial message

passing can also be handled via SMTP, if desired.



One of the reasons the email system on Unix/Linux systems has this

architecture is to relieve the MUA from the task of handling transient

errors (network down, DNS failure, remote SMTP server unavailable, etc)

and allow messages to be queued for later delivery. *The "sendmail"

process can handle this as a background daemon which makes the delivery

system more robust. *In most cases the local MTA which receives the

message is configured to speak SMTP with a more capable SMTP server

which understands how to forward mail to the final email destination.

Typically, this more capable SMTP server is managed by your Internet

provider. *In some cases authentication is required to connect to this

server to prevent unauthorized email forwarding.



To reiterate this model was an architectural choice and is not mandated

by the underlying protocol specifications.

--

Smoot Carl-Mitchell

System/Network Architect

smoot@tic.com

+1 480 922 7313

cell: +1 602 421 9005



--

ubuntu-users mailing list

ubuntu-users@lists.ubuntu.com

Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 12:33 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org