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 > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 12-21-2009, 10:35 AM
Stroller
 
Default Changing subject and from lines of cron emails

'Sup Gentoo?

I'm working on a daily cron job to email me daily. It happens to be
details of new shows available for download on the BBC's iPlayer
website. OMG! get_iplayer rocks!


If I have the following in my crontab:

0 8 * * * /usr/local/bin/get_iplayer -z "Daily Summary" 2>&1 | grep -v
^Added


Then the email's subject is ugly.

A bit of Googling [1] shows me that:

0 8 * * * /usr/local/bin/get_iplayer -z "Daily Summary" 2>&1 | grep -v
^Added | mailx -s "iPlayer Daily Summary" stroller


which gives a neater subject line.

However the "from: " address is stroller@host.long.domain, which I
feel is a little untidy.


It's probably OCD of me to care, but I would prefer the mails to
appear in my mail client as from "iPlayer".


Can anyone suggest a better solution than writing a wrapper script as
described at:

http://www.mail-archive.com/freebsd-questions@freebsd.org/msg223401.html
please?

This is a great answer, but it means I have extra wrapper scripts
cluttering up my system, and since I will probably want multiple
summaries (say weekly reports of "drama" and "comedy" categories,
delivered on different days) it would mean I need either multiple
wrapper scripts, or a single much more complicated one.


I am probably making my life complicated just for the pernicketyness
of it, but any suggestions gratefully received.


Stroller.



[1] http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1261393668323+28 353475&threadId=886847
 
Old 12-21-2009, 03:19 PM
 
Default Changing subject and from lines of cron emails

Stroller <stroller@stellar.eclipse.co.uk> writes:

> However the "from: " address is stroller@host.long.domain, which I
> feel is a little untidy.

Hopefully you use sendmail as mta. If so either, Masquerading or
generics table can rewrite in or out going mail far as from field.

I'm familiar only with sendmail and masquerading. Sendmail can be
made to masquerade as a certain doemain fairly painlessly... If
interersted I can provide details.
 
Old 12-21-2009, 09:23 PM
walt
 
Default Changing subject and from lines of cron emails

On 12/21/2009 03:35 AM, Stroller wrote:


OMG! get_iplayer rocks!


Very cool, thanks. I can't answer your question, but I'm listening to
A Celtic Heartbeat from Radio Wales just 15 minutes after I saw this,
so thanks for the tip and happy holidays )
 
Old 12-21-2009, 09:41 PM
Etaoin Shrdlu
 
Default Changing subject and from lines of cron emails

On Monday 21 December 2009, Stroller wrote:

> A bit of Googling [1] shows me that:
>
> 0 8 * * * /usr/local/bin/get_iplayer -z "Daily Summary" 2>&1 | grep -v
> ^Added | mailx -s "iPlayer Daily Summary" stroller
>
> which gives a neater subject line.
>
> However the "from: " address is stroller@host.long.domain, which I
> feel is a little untidy.
>
> It's probably OCD of me to care, but I would prefer the mails to
> appear in my mail client as from "iPlayer".

Some (don't know about gentoo's) versions of the "mail" command have a "-r"
switch that lets you specify the "from" address.

In any case, if, instead of mail/mailx, you use a sendmail-compatible agent
like ssmtp, there you'll definitely have a -r option.
 

Thread Tools




All times are GMT. The time now is 10:16 PM.

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