Ubuntu Servers :: Use The Mail Command Line Program To Occasionally Send Log Output To Email Aliases?

Jan 27, 2011

Can anyone tell me what the pros and cons are between heirloom-mailx vs mailutils? This is for ubuntu 10.04 LTS. AT this point my only purpose is to use the mail command line program to occasionally send log output to email aliases.

View 2 Replies


ADVERTISEMENT

Debian Configuration :: Can't Send Email From Command Line Using Mail

Mar 17, 2010

I'm running a desktop-less version of Debian via Sun VirtualBox. The reason I'm doing this is because I don't have enough graphics or RAM power to have a desktop environment running on top of my current desktop; also, I want to learn Linux through the command prompt. I'm running the AMD64 version of Debian; I'm not sure if that's relevant.

My main goal is to be able to email useful files from the virtual Debian to my main computer, so that I can save them for later if I ever decide to do a "real" installation of Debian on this computer. I realize now that there's probably some "easy" way to do this by reading the virtual machine's hard drive, but at this point, my curiosity wants to see this issue resolved. I started off wanting to find a command-line program to send my email with, and one was built-in. The syntax ~$ sudo mail -s "Subject" email@yahoo.com "This is a test email."

C^D
Cc:C^D ~$

is what I found. I tried it, and (unsurprisingly), it failed. I then learned that the mail command calls exim4, or something along those lines, so I needed to configure exim4. Soon thereafter, I learned that Yahoo's SMTP wasn't public, but Google's was. So, I found this web page which described how to configure exim4 to allow for email to be sent to a Gmail account. I made one, and followed the page word-for-word.

I sudo-mailled a test email to my Gmail account, and nothing happened. I waited a bit longer, and still, nothing happened. Finally, I started looking around, and found out about the exim4 logs in /var/log/exim4. In my mainlog, I think that it's telling me that Google denied my connection: <date><time><random numbers and letters> == **********.gmail.com R=send_via_gmail t=gmail_smtp defer (111): Connection refused

So, now, I'm just stuck. I don't know what I did wrong, I checked my exim4.conf.template twice for spelling errors, but I don't think I made any. At this point, I can only hope that someone else has had a similar problem, or knows what I'm doing wrong (or haven't done yet).

View 14 Replies View Related

Debian :: Any Program To Send Mail From Command Line?

Sep 9, 2010

Is there an easy to use program that I can use to send mail from the command line? I want to be able to create a batch script to send mail from different text files. What I'm looking for is something like:
mailapp mailserveraddress destinationmailaddress mymailaddress filetosend

View 11 Replies View Related

Fedora Servers :: Send Email From Command Line?

Mar 14, 2009

How to sending email from command line? Im just try send email look at below:

Code:
[root@fedora sniper]# echo "test" | mail -v -s test tazmanic76@hotmail.com
tazmanic76@hotmail.com... Connecting to [127.0.0.1] via relay...
220 localhost.localdomain ESMTP Sendmail 8.14.3/8.14.3; Sat, 14 Mar 2009 15:50:43 +0800
>>> EHLO localhost.localdomain
250-localhost.localdomain Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
[Code]....

View 4 Replies View Related

Ubuntu Servers :: Send Email From Command Line / Batch Script

Jul 1, 2011

Is there a way to send an email from a batch script. I want to send the output from a script to an email address, possibly a couple of email addresses depending on the output.

View 3 Replies View Related

Server :: Configure Mail With Postfix & Cyrus-imap - Cannot Send Mail Through Command Line

Nov 19, 2010

I'm running SUSE linux Server version 11. I want to configure mail server with postfix & cyrus-imap. For that, i have read many documents in Internet by i met issues. I'm running DNS in this server & it's ok Now I cannont send mail through command line.

[Code]....

View 9 Replies View Related

Debian :: Mail Command Can't Send Email?

Jun 4, 2015

I ran this command from terminal.

Code: Select allmail -s "Test Subject" example@yahoo.com < /dev/null

Got error on command line:
Code: Select allsend-mail: Authorization failed (534 5.7.14 https://support.google.com/mail/answer/78754 ng13sm2265977pdb.82 - gsmtp)

ssmtp configuration file:

Code: Select allroot=ssmtpmailtesting@gmail.com
mailhub=smtp.gmail.com:587
#rewriteDomain=
hostname=mybox
UseSTARTTLS=YES
AuthUser=ssmtpmailtesting@gmail.com
AuthPass=[mypassword]
FromLineOverride=YES

View 1 Replies View Related

General :: Send Internal Email Using The Mail Command?

Jun 3, 2009

Send an E-mail to your local account. Try two different ways to send and read it. How can you check that it really arrived? I decided to try using the 'mail' and 'pine' commands. So:

1) Using the root account, intending to send an e-mail to myself (root):

Code:

# mail -s "Hello root!" root
Simple form of sending e-mails internally.
^D (this keystroke is to finish the e-mail)
EOT

2) Using 'pine', another e-mail client: The mail is composed correctly, with 'To:' field set to:

Quote:

[URL]

which is my hostname, as my box runs in a VMWare Slack 12.2 image. In both cases, nothing was received in my mailbox (by typing #mail)... Additionally I don't see any new e-mails when I look at the file '/var/spool/mail/root'. Do I need extra information configuring my mail client/server/service?

View 6 Replies View Related

General :: Send Email From Command Line?

Mar 2, 2011

I'm looking for an easy way to send basic emails for the command line. I have tried configuring sendmail and mailx, but I have yet been able to receive a test email at my remote address. I have read through a fair amount of "how to" on this but I am a little confused and obviously not doing something right. My sendmail.mc file is as follows

Code:
divert(0)dnl
VERSIONID(`$Id: generic-linux.mc,v 8.1 1999/09/24 22:48:05 gshapiro Exp $')
OSTYPE(linux)dnl
DOMAIN(generic)dnl
MAILER(local)dnl
MAILER(smtp)dnl

When I try to send a test mail via

[Code]....

View 14 Replies View Related

Ubuntu :: Send An Email To A Gmail Account From The Command Line?

Mar 2, 2011

i am working on a neat little bash script, and i want the output to be mailed to my email account. So far i have tried installing sendmail then running: mail -s Test myemail@gmail.com But that hasn't worked; and i did check my spam folder. Am i missing something or is there a better technique all together?

View 8 Replies View Related

General :: Send Email With Attachment By Postfix From Command-line?

Dec 11, 2010

I've just setup a new Ubuntu 10.04 LTS server on linode for myself. Followed an excellent instruction at: here to finish the installation of some basic stuff including postfix.

I am trying to figure out a way to send an email to my gmail address with an attachment, but cannot find how. Already confirmed that email can reach my gmail account.

In the end I have to use mutt to send the email with attachments, probably SendEmails will also do well, but I am wondering how to do the same thing in postfix from command-line?

View 3 Replies View Related

General :: Make A Script To Send Output Of Top Command In Mail?

Mar 4, 2010

How can i make a script to send the output of top command in mail.
i have to mail the output to another person , tell me how can i do this

View 3 Replies View Related

Server :: Send An E-mail With The Command Line?

Sep 12, 2010

I want to send a simple mail from my terminal

I'm using opensuse and a Know that I have postfix installed...

I don't know what I need configure first...

I know that I need a SMTP server to send e-mails write?

When I try send e-mail with the command mail I received this message :

Code:
mail -s "meeting reminder" -c professorgenival@hotmail.com micromerces@gmail.com
mailq:
Code:
(host mx4.hotmail.com [65.55.92.168] refuse to talk to me: 421 cannot conect to SMTP server.

I was reading about fetchmail But I can't understand....

View 4 Replies View Related

General :: Failing To Send Mail From Command Line?

Mar 16, 2010

I am using Ubuntu 9.10 and when I tried to send mail from the command line I get: /usr/lib/sendmail: Permission denied. any takers on this.

View 6 Replies View Related

General :: Send Gpg Encrypted Mail Automatically From The Command Line?

Sep 14, 2010

How can I send gpg encrypted mail automatically from the linux command line?

I'm a little stumped on this one, I've tried using mutt but it doesn't encrypt mail unless it's used interactively.

Does anyone know if you can use the build in mail command to do this some how?

View 1 Replies View Related

Networking :: Send E-mail From Command Line By Using "mail" In Fedora?

Jul 13, 2010

I am trying to send e-mail from command line by using "mail" in fedora. It goes to e-mail server in the same network but it is refused by other outside this network with message: "..... Connection refused by name@yahoo.com ......

View 1 Replies View Related

Software :: Sendmail Email Aliases Not Accepting Mail

Feb 3, 2011

Have tried to setup email aliases in sendmail so I can have multiple address pointing to one linux login. However none of the aliases seem to be accepting mail.

I get the following error message when trying to send to them.

I have tried restarting sendmail, have mapped the /etc/mail/virtusertable across to virtusertable.db with the following command.

Code:

Output of sendmail -bv is as follows and looks correct.

Code:

Have also added new domain into local-host-names file. I am stuck on what is left to check and why the messages are getting bounced back.

View 15 Replies View Related

Ubuntu :: Command Line Mail Taking Too Long To Send; Unable To Qualify Own Domain Name?

Feb 5, 2010

I'm having a problem with my mail. When I send mail, it takes a long time for the send to complete.In the below, datestamp is just a simple script to put in a no-white-space date/time stamp.

Code:
$ datestamp ; mail woodnt; datestamp
02-05-10@193844

[code]....

View 9 Replies View Related

Programming :: Basic PHP Mail Function \ Say 'and If 'email' Is Not Equal To 0 Then Send The Mail?

Sep 9, 2010

this is my code at the moment

PHP Code: <?php
if (isset($_REQUEST['email'])) && $_REQUEST['email']!='0'{
$to = "chrisathisemail";

[code]....

View 5 Replies View Related

Ubuntu Servers :: How Can I Create E-mail Aliases

Feb 16, 2011

I installed postfix on my ubuntu server.I have created some users.How can I create e-mail aliases?For example, I have a user named "light" and I want to create for him an e-mail address.

View 3 Replies View Related

General :: Command Based Email Client To Send Email Through Secure Smtp?

Jul 26, 2010

In my Windows environment, I use email client such as Microsoft Outlook to connect to our email server to send email with the following configuration:

Incoming server (POP3): 995 - (requires with SSL)
Outgoing server (SMTP): 465 - (use encrypted connection SSL)

[code]....

And the mail server requires user ID login and password.how do I setup a text command based email client in my Linux (Centos 5.1) to send out email through the existing email server above, which is in another machine? The email client has to be text command based because I need to use command line to send notification email from anothar application installed in my Linux (Centos 5.1) Since the email client will only be used to send email notification, I don't require setting up of an email server in my linux.

View 2 Replies View Related

Software :: Aliases - Using /etc/aliases - Does Not Get Routed To My Email

Apr 1, 2009

I am able to send a mail message to myself from a server without any problem...

But after I have updated /etc/aliases and added the line for all of root's mail to be routed to me....

Added:
root: myemail@company.com

and ran newaliases to implement it....

If I send a mail message to root, it does not get routed to my email...

View 3 Replies View Related

General :: Email Output Of Cron Command, Sends Email But No Content?

May 28, 2010

Using CentOS. I have a cron setup to run this command: Code: /var/test.sh | mail -s "Test Cron" mr182@somewhere.com The email is sent but the output of the script is not in the email body, it's just blank. I know there is some output because there are some echo statements in the script.I don't want to get an email for all cronjobs, just this one.

View 1 Replies View Related

General :: How To Send Email From /usr/bin/mail

Jan 15, 2011

I use gmail for all of my emailing needs but stumbled upon linux counter at counter.li.org. Now I registered on the site and downloaded the machine-update script from the site. So I ran it and it collected the required data. But when I run ./machine-update -m as they have told, I guess no mail gets sent as I have to configure the mail program. How do I configure it so that it sends mail from my gmail address using stmp?

View 1 Replies View Related

Ubuntu :: Email To Be Send From Only One Line?

Aug 11, 2010

I have a server ubuntu 9.10.I have 2 adsl lines, one with a static ip for incoming mail and a dynamicI have to do this to have backup.Is it possible to set the server so it will only use the line with the static ip to send email?At the moment the server uses both. It authenticates with the one supplier when it uses the other line.The problem is that when a mall comes in and has a forwarder on my server the supplier blocks it as it thinks it is spam, because it is send from another email. My IT guy is really battling to sort this out.

View 2 Replies View Related

General :: Send The Output Of Send Command To A File?

Jan 20, 2011

in the middle of script, i need to send the output of (send command on line 8) to a file

#!/usr/bin/expect
spawn telnet 172.20.64.133
expect "ENTER USERNAM <"

[cod]....

i treid the below on line 8 :

1- send "show command;

" > logfile.txt : gives an error extra character after the "

2- logsave logfile.txt 'send "show command;

" ': error invalid command

3- i simply tried to send the output of the whole script to file logsave /home/logfile ./script : seems that logsave work under root only

4- ./script > logfile : the problem with this is that the output of echo or (read "enter your id") command will not be displayed on the screen (actually nothing will be displayed, i have to open the log file to see the output). is there any way to save the log of the "send" ? or to save the log of the complete script without hiding the output on the screen?

View 2 Replies View Related

Ubuntu :: Postfix - Can't Send Email To 1and1 Mail Server

Aug 9, 2010

what do I need to change in postfix/ dns to send email to one one of the email server hosted by 1and1.

I'm using zenoss to monitor system/ network and devices. I wanted to setup email notification , so I installed postfix. All works fine when I use my private account on yahoo or hotmail. but when I specify email account that is hosted by 1and1 I receive error 421. "

xxxxmyserver postfix/smtp[5399]: B0A5B22A06: to=<1and1emailaddress>, relay=mx00.1and1.co.uk[212.227.15.169]:25, delay=0.8, delays=0.04/0.02/0.62/0.12, dsn=4.0.0, status=deferred (host mx00.1and1.co.uk[212.227.15.169] said: 421 invalid sender domain 'xxxxmyserver' (misconfigured dns?) (in reply to RCPT TO command))

View 1 Replies View Related

Server :: Send Mail From Unix Mail Command To Yahoo-id With Attachment?

Feb 15, 2010

i want to send mail from unix mail command to my yahoo-id with attachment, but i want to receive it as attachment.

View 1 Replies View Related

CentOS 5 :: How To Config Sendmail So Can Use Mail To Send Email

Aug 11, 2011

I'm trying to setup notification function for the Nagios Core which use Mail to send notification.I got an account from Rogers. I have SMTP server, email account with authentication information.My Nagios server is in a workgroup, there is now domain assigned to it, I just use nagiosserver.localdomain in /etc/hosts.I added Rogers SMTP server in /etc/mail/sendmail.mc and Future (AuthInfo) I created an /etc/mail/AuthInfo and add AuthoInfo:smtpserver "U:user" " P: pwd" "M:Plain"I added smtp server in /etc/mail/access for RelayI added root@nagiosserver.localdomain on /etc/mail/virtusertableI regenerated sendmail.cf by user m4 commandrestart sendmail service.When I ran: Mial -s test nagios4ccs@rogers.comIt did not prompt any error message , in the maillog it says the message is queued but It can not be sent out

View 3 Replies View Related

Ubuntu :: Send Email When Program Is Installed?

Jan 15, 2010

Here is what I am wanting to do:Whenever a program is installed - send an email with the program name.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved