[CentOS] When no MTA is installed, How to send an email with a cronjob?
Hi, When no MTA is installed, How to send an email with a cronjob? I have below entrty in my cronjob? my /etc/cron.d/backup file looks like this. MAILTO=myem...@example.com 15 11 * * * root /root/scripts/backup.sh Can I send this email via SMTP server? Hope to hear from you. -- Thank you Indunil Jayasooriya http://www.theravadanet.net/ http://www.siyabas.lk/sinhala_how_to_install.html - Download Sinhala Fonts ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] When no MTA is installed, How to send an email with a cronjob?
On Sun, Jul 21, 2013 at 2:12 PM, Indunil Jayasooriya wrote: > Hi, > > When no MTA is installed, How to send an email with a cronjob? Install postfix and configure to accept messages from 'localhost' only. > > MAILTO=myem...@example.com I guess you have a 'real' email id in your setup. > 15 11 * * * root /root/scripts/backup.sh > > Can I send this email via SMTP server? Some global service providers may accept email from the postfix MTA in your server. Alternately, you can configure postfix to relay the message via a 'smart_host' (preferred method). It will require you to provide a valid email address + plus password for your postfix (client) to do authenticate itself and send the outgoing message. There is ample documentation on the 'Net to accomplish this. -- Arun Khan ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] When no MTA is installed, How to send an email with a cronjob?
> > > Can I send this email via SMTP server? > > > > > > You don't. > > You would have had to gone to some effort to not have an MTA > installed, as one is installed by default. Did you remove it (or > simply not configure it)? [they basically work for localhost > delivery without any changes.] > > CentOS 6 64 bit, zimbra is running with multi server setup. One mailbox and 2 mta servers. on mailbox server where no mta is installed, I want to backup mailboxes with a script. I have set it up to /etc/cron.d/backup file. After the backup, I want to an email to be sent to admin account. for the moment, I get an OUTPUT in this way. ( my /etc/cron.d/backup looks like this ) 35 13 * * * root /root/scripts/backup.sh > /tmp/backup.out 2>&1 I always login to the mailbox server and see the OUTPUT which is NOT so PERFECT. > You can't deliver to an "SMTP server" as, without an MTA, you have > no (real) way to talk to it. > > thanks for it. > > > -- Thank you Indunil Jayasooriya http://www.theravadanet.net/ http://www.siyabas.lk/sinhala_how_to_install.html - Download Sinhala Fonts ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] When no MTA is installed, How to send an email with a cronjob?
On Sun, Jul 21, 2013 at 02:12:55PM +0530, Indunil Jayasooriya wrote: > Hi, > > When no MTA is installed, How to send an email with a cronjob? > > I have below entrty in my cronjob? > > my /etc/cron.d/backup file looks like this. > > MAILTO=myem...@example.com > 15 11 * * * root /root/scripts/backup.sh > > Can I send this email via SMTP server? > > > Hope to hear from you. There is a tool named SendEmail, which is a perl script that performs the sending side (not receiving) of SMTP email handling. It's straightforward to use via commandline, which is exactly what you would want to use from a cron job: http://caspian.dotconf.net/menu/Software/SendEmail/ -- Fred Smith -- fre...@fcshome.stoneham.ma.us - The eyes of the Lord are everywhere, keeping watch on the wicked and the good. - Proverbs 15:3 (niv) - ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] SSD support in C5 and C6
Am 21.07.2013 04:59, schrieb Yves Bellefeuille: > On Friday 19 July 2013, Wade Hampton wrote: > >> - set noatime in /etc/fstab >> (or relatime w/ newer to keep atime data sane) > > Also set nodiratime. if you specify noatime it includes nodiratime already. > Yves Alexander ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] When no MTA is installed, How to send an email with a cronjob?
Am 21.07.2013 10:42, schrieb Indunil Jayasooriya: > Hi, > > When no MTA is installed, How to send an email with a cronjob? > > I have below entrty in my cronjob? > > my /etc/cron.d/backup file looks like this. > > MAILTO=myem...@example.com > 15 11 * * * root /root/scripts/backup.sh > > Can I send this email via SMTP server? If you decide a full blown MTA is too heavy weight in your environment on the different nodes (Postfix isn't the ideal choice for a so called null client), then have a look at ssmtp for example. It is provided by EPEL http://pkgs.org/centos-6-rhel-6/epel-x86_64/ssmtp-2.61-19.el6.x86_64.rpm.html It does exactly what you intend to do. There is another null client called msmtp http://msmtp.sourceforge.net/ but that one isn't available being packaged for CentOS. > Hope to hear from you. Alexander ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] When no MTA is installed, How to send an email with a cronjob?
On Sun, Jul 21, 2013 at 02:31:32PM +0200, Alexander Dalloz wrote: > > If you decide a full blown MTA is too heavy weight in your environment > on the different nodes (Postfix isn't the ideal choice for a so called > null client), then have a look at ssmtp for example. It is provided by EPEL > > http://pkgs.org/centos-6-rhel-6/epel-x86_64/ssmtp-2.61-19.el6.x86_64.rpm.html If I remember correctly, this does require an outside host--that is, you have to use your ISP's mailserver as relay. > > > There is another null client called msmtp > > http://msmtp.sourceforge.net/ > but that one isn't available being packaged for CentOS. That compiles very easily on CentOS, however. Again, not sure if it can be used without making use of your ISP's mail server. I have an ancient page (slow site, not always up) on ssmtp, at http://www.scottro.net/qnd/qnd-ssmtp.html. It hasn't been maintained for awhile, there's a better page at the arch wiki. https://wiki.archlinux.org/index.php/SSMTP -- Scott Robbins PGP keyID EB3467D6 ( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 ) gpg --keyserver pgp.mit.edu --recv-keys EB3467D6 ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] When no MTA is installed, How to send an email with a cronjob?
Am 21.07.2013 14:56, schrieb Scott Robbins: > On Sun, Jul 21, 2013 at 02:31:32PM +0200, Alexander Dalloz wrote: > > >> >> If you decide a full blown MTA is too heavy weight in your environment >> on the different nodes (Postfix isn't the ideal choice for a so called >> null client), then have a look at ssmtp for example. It is provided by EPEL >> >> http://pkgs.org/centos-6-rhel-6/epel-x86_64/ssmtp-2.61-19.el6.x86_64.rpm.html > > If I remember correctly, this does require an outside host--that is, you > have to use your ISP's mailserver as relay. You are correct, a null client sends towards a central mailhub. That will be a properly configured MTA which does everything necessary to be compliant with current mail exchange standards. >> There is another null client called msmtp >> >> http://msmtp.sourceforge.net/ > >> but that one isn't available being packaged for CentOS. > > > That compiles very easily on CentOS, however. Again, not sure if it can be > used without making use of your ISP's mail server. We are in a professional, enterprise environment I presume. Thus the self compilation approach is discouraged. Even if it is a small program which compiles easily. Unless you anyhow manage to maintain your own set of RPMs and your local yum repository. > I have an ancient page (slow site, not always up) on ssmtp, at > http://www.scottro.net/qnd/qnd-ssmtp.html. It hasn't been maintained for > awhile, there's a better page at the arch wiki. > > https://wiki.archlinux.org/index.php/SSMTP Alexander ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] When no MTA is installed, How to send an email with a cronjob?
On Sun, Jul 21, 2013 at 03:19:33PM +0200, Alexander Dalloz wrote: > Am 21.07.2013 14:56, schrieb Scott Robbins: > > On Sun, Jul 21, 2013 at 02:31:32PM +0200, Alexander Dalloz wrote: > > > > > >> > >> There is another null client called msmtp > >> > >> http://msmtp.sourceforge.net/ > > > >> but that one isn't available being packaged for CentOS. > > > > > > That compiles very easily on CentOS, however. Again, not sure if it can be > > used without making use of your ISP's mail server. > > We are in a professional, enterprise environment I presume. Thus the > self compilation approach is discouraged. Even if it is a small program > which compiles easily. Unless you anyhow manage to maintain your own set > of RPMs and your local yum repository. Good point. I see an rpm for Fedora 17, but nothing earlier. I use it on a personal machine--professionally, I've never had the need for it. -- Scott Robbins PGP keyID EB3467D6 ( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 ) gpg --keyserver pgp.mit.edu --recv-keys EB3467D6 ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] When no MTA is installed, How to send an email with a cronjob?
On Sun, 21 Jul 2013 14:12:55 +0530 Indunil Jayasooriya wrote: > When no MTA is installed, How to send an email with a cronjob? I personally use this: http://www.cleancode.org/projects/email You can get a Centos rpm for that from my webpage: Centos 5: http://www.melvilletheatre.com/articles/el5/index.html Centos 6: http://www.melvilletheatre.com/articles/el6/index.html Note that the program isn't actually a mailserver. -- MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] When no MTA is installed, How to send an email with a cronjob?
On Sun, 21 Jul 2013 14:12:55 +0530 > Indunil Jayasooriya wrote: > > > When no MTA is installed, How to send an email with a cronjob? > I usually do this: import smtplib server = smtplib.SMTP('smtp.gmail.com:587') server.ehlo() server.starttls() server.ehlo() server.login('u...@gmail.com', password) server.sendmail(from, to, message_ ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
[CentOS] What does this error mean?
Hello everyone, It took a few reboots after installing the latest kernel (.14) to come back up. After it did, I saw this: WARNING: Kernel Errors Present nForce2_smbus :00:0a.1: Error probing SMB1. Bad video card? my Nvidia has been working fine. No on-screen problems/issues noted. Gilbert *** Gilbert Sebenste (My opinions only!) ** Staff Meteorologist, Northern Illinois University E-mail: seben...@weather.admin.niu.edu *** web: http://weather.admin.niu.edu ** Twitter: http://www.twitter.com/NIU_Weather** Facebook: http://www.facebook.com/niu.weather * *** ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] When no MTA is installed, How to send an email with a cronjob?
> Hi, > > When no MTA is installed, How to send an email with a cronjob? > > I have below entrty in my cronjob? > > my /etc/cron.d/backup file looks like this. > > MAILTO=myem...@example.com > 15 11 * * * root /root/scripts/backup.sh > > Can I send this email via SMTP server? > The following script works for us to send notifications to a mobile "server" that can not process very long text messages. Unless you have perfect control over who is allowed to use this script and what is being sent, it is VERY bad security practice. Replace the bracketed setup stuff (inside <> ) with the appropriate sources and destinations. "$argv" passess the raw data to be transmitted. Depending on what's in the message, you may have to modify the 3rd through 6th lines.YMMV. > #!/usr/bin/expect > > set idx [string first \{ $argv] > set argv [string replace $argv $idx $idx] > set idx [string last } $argv] > set argv [string replace $argv $idx $idx] > > spawn telnet25 > set send_slow {1 .01} > set timeout 180 > > expect { > -re "Escape character is" { > exp_send -s "helo \n" > exp_continue > } > -re "220" { > exp_send -s "mail from: \n" > exp_continue > } > -re "250.*ender" { > exp_send "rcpt to:\n" > exp_continue > } > -re "250.*ecipient" { > exp_send -s "data\n" > exp_continue > } > -re "354" { > exp_send -s "Subject: \n\n" > exp_send -s "$argv\n" > exp_send -s ".\n" > puts "sending\n" > exp_continue > } > -re "Message" { > exp_send -s "quit\n" > } > -re "221" { > puts "done\n" > } > } ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] When no MTA is installed, How to send an email with a cronjob?
On Jul 21, 2013, at 1:42 AM, Indunil Jayasooriya wrote: > Hi, > > When no MTA is installed, How to send an email with a cronjob? > > I have below entrty in my cronjob? > > my /etc/cron.d/backup file looks like this. > > MAILTO=myem...@example.com > 15 11 * * * root /root/scripts/backup.sh > > Can I send this email via SMTP server? > > > Hope to hear from you. There is a nifty perl script which does this, and can even do attachments: http://caspian.dotconf.net/menu/Software/SendEmail/ __ If life gives you lemons, keep them-- because hey.. free lemons. "♥ Sticker" fixer: http://microflush.org/stuff/stickers/heartFix.html ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
[CentOS] Question about Red Hat beta
Does CentOS get an early version of a beta release from Red Hat or not? I assume select hardware vendors get early access but I didn't know who else. Thanks, Joe ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] When no MTA is installed, How to send an email with a cronjob?
On Sun, Jul 21, 2013 at 02:16:50PM +0200, Reindl Harald wrote: > > > Am 21.07.2013 14:07, schrieb Fred Smith: > > There is a tool named SendEmail, which is a perl script that performs the > > sending side (not receiving) of SMTP email handling. It's straightforward > > to use via commandline, which is exactly what you would want to use from > > a cron job: > > > > http://caspian.dotconf.net/menu/Software/SendEmail/ > > and it has a queue or is it so simple-minded only to work if > all is perfect and if the smtp server it uses is not reachable > messages are silently lost? > > hence for such things virtually everybody installs postfix with > a minimal configuration and edits /etc/aliases with whatever > full qualified target for root I doubt it queues up mail, it's very simple and lightweight. It CAN be a useful tool for those who don't want a large and complicated program lurking there all the time. i've no clue how other mail handlers are configured, never having done it, but it for sure beats sendmail all hollow if all you want to do is send an occasional mail and can't wrap your mind around its configuration. Of course, no one is requiring you to use it. -- Fred Smith -- fre...@fcshome.stoneham.ma.us Do you not know? Have you not heard? The LORD is the everlasting God, the Creator of the ends of the earth. He will not grow tired or weary, and his understanding no one can fathom. - Isaiah 40:28 (niv) - ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] When no MTA is installed, How to send an email with a cronjob?
On Sun, 21 Jul 2013 17:28:04 -0400 Fred Smith wrote: > > and it has a queue or is it so simple-minded only to work if > > all is perfect and if the smtp server it uses is not reachable > > messages are silently lost? This is how I have implemented a "retry" using the cleancode-email program that I mentioned earlier today. for(;;) { FILE *capturestderr; system(temp); capturestderr=openfile(STDERRCAPTURE,"r"); fseek(capturestderr,0L,SEEK_END); if (ftell(capturestderr)) { logtime(log); fprintf(log,"%s -- %s ** SEND FAILED ** on EMAIL MAILOUT, retrying\n",subscription.name,subscription.email); closefile (capturestderr); sleep(2); } else { closefile(capturestderr); break; } } remove(STDERRCAPTURE); -- MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos