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
ADVERTISEMENT
Jan 25, 2011
I would like with bash to output the content of my very last email that has been received (I use gmail), especially using fetchmail or mutt.
View 1 Replies
View Related
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
Jul 20, 2010
a file or a process that is always running and pinging for example [URL]. returning 1 or 0, when returns 0 (that means have no response) do something else. i already made the something else, basicly sends an email etc.
View 1 Replies
View Related
Mar 11, 2011
I would like to see the last received IMAP email and its content with Fetchmail. Is it possible?
View 3 Replies
View Related
Apr 29, 2011
Can anyone tell me how i change the default domain name for cron?everything i cron runs it emails from and to user@com.com
this leaves me with a massive list of failed mails in postfix.i have mailto on my main crontab but i cant do it on all of them.
View 1 Replies
View Related
Jun 29, 2011
I have some scripts that do usual stuff like backing up MySql database, gz, tar some files and put them on FTP or sync with some other backup/mirror system. Some scripts are running quite frequently (like twice/thrice per hour). I am sending email with attached log output from commands after completion of job. It is quite a lot of email to keep track of.I want to send email only when script fails to do something, that is when some command in script fails. How can I accomplish this?
View 2 Replies
View Related
Sep 20, 2010
I am running a Cron job which mails the content of a log report every day. The problem is that the contents are sent as an attachment instead of as the body of the email. The strange thing is that if I run the instructions from the command line everything works fine, but if I do so from the Cron job the log report is attached instead of being sent inline.
The instruction I use is:
Code:
mail -s "logfile for cron" cron@example.com </var/log/cron-log
Following some advice I read on a blog I also tried this instruction in my Cron file, but the result is the same: it works fine from the command line, but attaches the report when run from Cron:
Code:
echo "Content-Type: text/plain;" | mail -s "logfile for cron" cron@example.com </var/log/cron-log
How to ensure the content of the log file is inline?
View 11 Replies
View Related
Jan 4, 2011
A user will be ftping some files to an upload directory. I need to move those files to another directory. I also need to mail a list of the just moved files to the user. This job will need to run every 10 minutes. I need to keep a log that holds all the files for the day that were moved, renaming it with the date/timestamp.I have this below but I just can't put it all together. a workable script out of this?
#!/bin/bash
# test.shl
source="/u03/upload/"
[code]...
View 5 Replies
View Related
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
View Related
Jul 5, 2011
I have installed CPAN module Spreadsheet::WriteExcel, to generate some reports. Now when i execute my perl module from command line. it works fine and generates the excel file. When i put this module to be executed via cron, it doenst work and an email is generated. My entry in cron tab is as follows:2 14 * * * perl /scripts/postpaidRecon/postpaid.plThe email i receive in /var/spool/mail/root for module failure is:
Subject: Cron <root@kblhpw101> perl /scripts/postpaidRecon/postpaid.pl
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
[code]....
View 3 Replies
View Related
Dec 31, 2009
I have an email setup where all of the emails from our email host is downloaded to our Linux server using Fetchmail. Then some of the incoming emails are sent to an MS exchange server (server1.domain.com) using Postfix. What i want to do is to send a copy of all emails to Another server (server2.domain.com) for redundancy.Can postfix be configured to send copies out to both?
View 1 Replies
View Related
Sep 1, 2010
I'm using a Cyrus Imap Email on our mail server. What can I use to search email contents for all emails that resides in the server? Any thoughts?
View 1 Replies
View Related
Aug 25, 2010
Is there a way you could update content on a web page from an incoming email on a linux server? e.g. you email your comments to an email address and the contents of your email (comments) appear on a web page. (preferably in real time but some delay acceptable)
View 9 Replies
View Related
Feb 24, 2011
Regarding this task, I am able to print colored output in my putty sessions using tput or ASCI codes but whenever I tried to send that output through mail command to my outlook maillox, It always goes without colored. I need to produce those coloured output of the scripts as it is in mail.
View 1 Replies
View Related
Aug 25, 2010
I am planning an issue tracking system that I will build in Django and Python and host on a Debian server. Being an issue tracking system it will have to send and receive emails. I can easily configure the send mail functionality using python inbuilt functions. But is there a way to create new content from an incoming email?
e.g. scenario > User sends email to support@university.edu and the issue management system picks up that email (somehow) and creates a new issue based on contents of the email (preferably in real time but some delay is acceptable).
I have looked at postfix and sendmail but neither allows you create new content (issue) from an incoming email. Any thoughts?
View 1 Replies
View Related
Apr 12, 2010
I have been assigned a task to implement a free open source content filter having feature of web, email, instant messaging etc. If any one has the information or worked on this type of product please share it.
View 8 Replies
View Related
Feb 3, 2010
I want a mail server that can work just like MDaemon. The reason is, I want to have an email content filter rule that does some thing like this.
1. If the To Header contains "support@thisdomain" then run a program.
What this means is that, there is a program here in the office, and if some one sends an email to the support address, with an attachment of .exe and that person is a customer, then the program should be run. The only thing I need here is if there is a rule or script that can filter email header and run a program.
2. If the Exit Code from a previous 'Run program' rule is in the range of 1 to 100 and if the To Header contains "support@thisdomain" then send note1 "to<email address>" from <$SENDER$" "SUBJECT <AM ...>
and delete this message.
3. If the EXIT CODE from a previous 'Run program' rule is =0 and if the TO HEADER contains "support@thisdomain" then send note1 "to<email address>" from <$SENDER$" "SUBJECT <AM ...>
and delete this message.
View 7 Replies
View Related
Jun 16, 2011
I have tried the MAILTO="" and adding >/dev/null 2>&1 to the end of the line, but my server is still sending an email about my cron.weekly script. After making changes to /etc/crontab I restart cron with /etc/init.d/cron restart without error. I have also tried crontab -e but that loads up an empty file (su'ed into root). What step am I missing / what am I doing wrong? Here's my crontab:
[Code]....
View 3 Replies
View Related
May 3, 2011
I'm using Linux 11.04 and just installed the most recent version of Postfix. I'm trying to send a simple email (through a relay) but when I run the command
sendmail davea@mydomain.com FROM: fromemail@gmail.com SUBJECT: hello world this is a test email .
It just hangs there. There is nothing in /var/log/mail.log or in any of its accompanying files.
View 4 Replies
View Related
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
Feb 23, 2010
I'm attempting to send email with a PHP application I got from a textbook. Do I need to start an email server in order to get the application to work?Using SuSE 11.2
View 5 Replies
View Related
Jul 1, 2010
is there a way to allow unsubscribed email address to send emails to mailman list without having to manually set a filter for that email address?
View 1 Replies
View Related
Jun 3, 2009
Debian 5, apache 2.2 I've got Apache up and hosting multiple sites. Each site will have a php contact me page that will simply dump an email to a fixed address. What program should i be using to accomplish this? I've used nullmailer before but that assumes you have a fixed smarthost somewhere which I don't.
View 6 Replies
View Related
Feb 23, 2010
I'm attempting to send email used a textbook PHP application. The application fails to send an email.Do I need to setup an email server to get the ap to work?Right now, I'm getting email through Kontact via my web host, Yahoo mail and Google mail.
View 2 Replies
View Related
Apr 24, 2010
I use 'quoted' style for reply emails. I want to be able to intersperse my replies within a quoted reply i.e. if the email had three paragraphs, I'd like to be able to have my replies between each of the paragraphs. At the moment, I don't seem to be able to do anything other than delete from the quoted section - I try to simulate my requirements by cutting and then 'paste quotation', but this doesn't always work as sometimes Evolution adds too many levels of '> ' .
View 5 Replies
View Related
Feb 24, 2011
we had a server with Hostway, and it was running ubuntu. The server also had Plesk installed, which did some funny things. We had several websites on that server, and many email addresses. Then we changed servers. Now we have a server through Rackspace and it is also running Ubuntu. It also has Virtualmin installed, which generally does not impose as many unconventional changes on Ubuntu as Plesk did.
Rather than using Thunderbird to download my email (which is what I used to do) I've decided I'll start reading my email on the server. So I will ssh to the server and then use some email client, such as Alpine, to read the email. So I installed Alpine. I have an email account for "lawrence". The email address is lawrence @ krubner. Currently, when mail arrives for that account, it is stored here:
/home/krubner/homes/lawrence/Maildir/new
and then it is transferred to hear:
/home/krubner/homes/lawrence/Maildir/cur
When I start Alpine, while logged in as lawrence, Alpine automatically sets up an inbox for me here:
/home/lawrence/mail/
How do I get Alpine (or any other client) to read from the correct folder? I'm fairly sure the email package (the MTA) at work on this new server is Postfix. As near as I can tell, my email is held for 24 hours in this folder:
/home/krubner/homes/lawrence/Maildir/new
and then it gets transferred here:
/home/krubner/homes/lawrence/Maildir/cur
Alpine only lets me set one path for my Inbox, so I'm not sure what path I should set. If I use "cur" I will see all email 1 day late, but if I use "new" then I will miss email if I go a day without checking.
View 2 Replies
View Related
Apr 29, 2010
Is there a way of allowing only certain domain to send e-mails to certain specific e-mail address. I am using Sendmail, and I have an alias which translate to certain members of staff within my organization. I don't expect e-mails from outside our domain to be sent to this alias e-mail address.
View 1 Replies
View Related
Dec 21, 2009
I have recently setup a new mail server and have simulated sending and receiving on the new email server. The new email server will replace the primary one.I would like to setup the new email server in parallel with the existing one.This way i can observe issues that might occur and be aware of what could go wrong. I want to received mail to be delivered to both mail servers at the same time.I would like to use postfix, exim i find a bit to difficult to understand.I have thought of using transport maps, the only problem is that you can only forward mail to one server at a time using transport maps.I think recipient_bcc_maps and sender_bcc_maps could work, i would just like ideas of how i can do this.
View 5 Replies
View Related
Sep 18, 2010
I am pretty new to C.L.I/text editing work. So maybe its a bit old-fashioned but I am interested in learning how to send email via the command line. I am running 10.04 32 bit
Situation: I have followed the explicit and step-by-step actions at http://klenwell.com/is/UbuntuCommandLineGmail
Question: Upon completion, when trying to send a test email to myself via gmail (from CLI) I get the following error: "msmtp: no recipients found". In CLI below it asks me to explicitly pick a mailx to download. I think I already have mailx as when I type mailx I get "no mail for primary".
Here is my work
Code:
:~$ sudo apt-get install msmtp mailx
[sudo] password for:
Reading package lists... Done
Building dependency tree
Reading state information... Done
msmtp is already the newest version.
Package mailx is a virtual package provided by:
mailutils 1:2.1+dfsg1-4ubuntu1
heirloom-mailx 12.4-1.1
bsd-mailx 8.1.2-0.20090911cvs-2ubuntu1
You should explicitly select one to install.
E: Package mailx has no installation candidate
:~$ gedit ~/.msmtprc
:~$ chmod 600 ~/.msmtprc
:~$ gedit ~/.mailrc
:~$ echo -e "testing email from the command line" > /tmp/test_email
:~$ mailx -s "mailx gmail test" xxxxxxx@gmail.com < /tmp/test_email
msmtp: no recipients found
Here is ~/.msmtprc
Code:
# config options: [URL]#A-user-configuration-file
defaults
logfile /tmp/msmtp.log
# gmail account
#account gmail
auth on
host smtp.gmail.com
port 587
user xxxxxx@gmail.com
password xxxxxx
from xxxxxx@gmail.com
tls on
tls_trust_file /usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crt
# set default account to use (not necessary with single account)
#account default : gmail
and here is ~/.mailrc
Code:
# set smtp for mailx
# gmail account (default)
# $ mailx -s "subject line" -a /path/attachment recipient@email.com < /path/body.txt
set from="xxxxxx@gmail.com (xxxxx)"
set sendmail="/usr/bin/msmtp"
set message-sendmail-extra-arguments="-a gmail"
View 4 Replies
View Related