![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Gentoo Gentoo Linux is a versatile and fast, completely free Linux distribution geared towards developers and network professionals. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| send email from address list and subject list | paulds | UNIX for Dummies Questions & Answers | 2 | 06-27-2008 10:11 AM |
| Email with subject contains value of Variable | deepsingh | Shell Programming and Scripting | 2 | 06-19-2008 04:20 PM |
| How to set Subject in 'mail' ? | hkapil | UNIX for Dummies Questions & Answers | 2 | 10-14-2005 04:36 PM |
| use email subject line as shell command | mskarica | UNIX for Advanced & Expert Users | 4 | 02-01-2005 12:23 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
I am profoundly new to *nix, but had a project dropped in my lap that has sparked an interest, leading me here.
I was tasked with daily sending one of our customers a listing of all the spam our filter blocked that was heading for them. Between Google and I; I discovered the Server is running Linux version 2.6.11-gentoo-r4. I learned the basics of grep enough to pare down the amavis.log file to only the pertinent data and figured out how to get it mailed out. I added a crontab to do this daily, and the job was done to the customer's satisfaction. Unfortunately, I cannot leave well enough alone, and decided I wanted to have the email subject include the total blocked messages. grep -c Blocked gives me the total, but I have not been able to track down how to modify the mail subject to reflect this. I attempted to assign n = grep -c Blocked /var/amavis/amavis.log, but $n just echos as grep. Pointing out where I'm screwing up or directing me to a link where I can find the info would be greatly appreciated. |
|
||||
|
That makes a huge difference, thank you!
So far, I have used email -s "customer spam report" customer@address.sam to deliver the resulting log, which works. My goal is to insert my newly created $n value into the subject, ala' "Customer Spam Report ($n messages)". |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|