Adding headers to all mails with spamassassin

hi!
i've followed this instructions: http://docs.sun.com/source/819-0105/anti-spam.html#wp45386
to configure spasassassin and is working fine.
i want to know the score for all my mails not only the ones detected as spam so i want to enable headers for all mails.
is there a way to do it?
regards

Hi,
Unfortunately due to a limit in the size of the argument to the spamfilter1_string_action parameter the sieve filter that does the heavy lifting has been moved to a channel level sieve.
So to discard the email over 10, tag emails below 10 (ham & spam) and file emails from 5-10 into a spam folder you need to do the following:
Replace the previous spamfilter1_string_action with:
spamfilter1_string_action=data:, require ["addheader","spamtest"]; \
spamadjust "$U"; addheader "Spam-test: $U"
Create a file called spamassassin.filter in your msg_base/config/ directory and add the following:
require ["spamtest","relational","comparator-i;ascii-numeric","fileinto"];
if spamtest :value "ge" :comparator "i;ascii-numeric" "10" {discard;}
elsif spamtest :value "ge" :comparator "i;ascii-numeric" "5" {fileinto "spam";}
else {keep;}
Add the following in your imta.cnf file to the ims-ms channel definition:
destinationfilter file:IMTA_TABLE:spamassassin.filter
do you add the spam header on ham too?Yes. ALL scanned emails gets a header added - no harm really.
how do you deal with spam in general?At my previous employee we did what was listed above. Discard spam > 10, tag all emails with the score and filter emails into a spam folder for those emails between 5 and 10 (actually this was customisable/user but that means having a different sieve filter/user and you need to write a custom admin interface for that - most users used the default level to filter into a spam folder).
Also make sure you write an expiry rule for the spam folder so that the spam emails don't build up and consume a users quota e.g. expire emails in the spam folder greater then 30 days.
Regards,
Shane.

Similar Messages

  • How to delete all mails with one klick?

    It's annoying to delete every single mail.
    How to delete all mails with one klick, like in the paperbasket?
    Thanks

    If the emails have been previously deleted (I.e. in the trash folder), tap Edit at the top of the list. You should see a delete all button at the bottom. If the messages are in a standard folder, they need to be handled one at a time.

  • Rule to delete all mail with ZIP attachments?

    Unfortunately, I have to do business with Windows users whose machines seem to be infested with viruses that harvest email addresses. As a result, I am engulfed daily with mail that contains Windows virus attachments (ZIP files) and spam with GIF attachments. And I'm tired of it. Reporting the senders to their ISPs is an exercise in futility.
    Since the only legitimate attachments I receive from clients are always, and without exception, Stuffit SIT or SITX files, is there any way to set up a rule in Mail that will delete emails with ZIP or GIF attachments but allow those with SIT/SITX files through?
    There doesn't seem to be a way to add "Attachment" to the list of headers in Rules. In view of the fact that the most common vector for viruses is via email attachments, this seems to be a major oversight on Apple's part.
    Any hints on dealing with this ****?
    Kind regards.
    Message was edited by: Dave Bourke. I'm sorry, when did the common word for Hades become forbidden? John Milton is on the banned list now? What is happening to the world?

    Many thanks for your very helpful response, Mikkel.
    However, when I expand the headers on any mail that contains an attachment, there is no header named "Attachment," just a paperclip symbol with an expand arrow.
    So if I go to create a Rule, first of all there is no "Attachment" header in the Conditions list, and second it is unclear how to enter such a symbol-based header in the "Edit Header List..." dialog. Do I simply type the word "Attachment" into the dialog as a header even though it never actually appears in any emails with attachments?
    Still mystified...
    Kind regards.

  • How to NOT synchronize ALL mails with IMAP ?

    When sychronizing with my business mailserver using IMAP, ALL existing messages are being synchronized.
    How to synchronize, say, only messages starting from year 2011?
    Can't find the asnwer on any forum.
    Your help is very much appreciated.
    Christiaan

    I am not aware of any way to limit synchronization by date.
    Assuming older messages are in folders that you do not frequently access (a 'Saved' or 'Archived' folder, for example), you have a few options - none of which are ideal.
    Ideally Mail.app should support the IMAP ability to subscribe or unsubscribe from a folder but this feature does not appear to exist. It is hinted-at if you control click on your IMAP server and choose Account Info > Subscription List, but chances are your list is blank like everyone else's.
    Your first real option is to control the way Mail.app synchronizes messages. Go to your Preferences > (Your IMAP Account) > Advanced > Keep Copies ... > Only Messages I've Read. Don't read the older messages that you don't want synchronized and they shouldn't be saved to your computer.
    A second option requires deleting or locking the folder you don't want synchronized in the Finder, although it's not clear to me if these methods still work. A Google search will turn up instructions.

  • BIS account - adding a corporate e-mail with BES Express

    Both devices are BB9700's.
    I have a personal BIS account with two e-mail accounts - one through Google Apps and one personal gmail. This is an Indonesian account (where I live) and I have an unlimited data plan.
    My company is in the US and I have a separate BB with my corporate mail running through their BES server. This BB has a corporate Singapore SIM and, as I am almost outside Singapore, it builds up huge charges. It is also a pain to carry two BB devices!
    Is it possible to add the corporate e-mail account to my existing BIS account using BES Express? If so, what happens to my existing BIS contacts that currently sync with Google Sync - I have lots of personal contacts that I do not want to lose.
    Is it possible to have the corporate mail as an additional e-mail account on my BIS account and, if so, will it appear as a separate mail inbox with service book like my existing two accounts. Also, is it possible to use two address books on one BB device - one for my existing contacts, and one for my corporate address that would sync to the server in the US?
    I apologise if the above questions are simplistic, but i have managed to finally set up my own BB perfectly with my Google Apps and Gmail accounts - mail, contacts and calander sync exactly how I want them to and I do not want to muck this up and lose what I have.
    Appreciate any assistance and advice to offer. Cheers, Sean

    Hi there!
    If I am understanding you correctly, you want to be able to send from an email account on your BB, but not receive from that account on the BB. If so, then don't use a dummy password. Rather, configure the account properly but then set the default filter to "Do Not Forward" and then nothing will come down to the BB from the Server.
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Fetching all mails in Inbox from Exchange Web Services Managed API and storing them as a .eml files

    I want to fetch all mails in the Inbox folder using EWS Managed API and store them as .eml.
    I can store file once I get the file content as a byte[] will
    not be difficult, as I can do:
    File.WriteAllBytes("c:\\mails\\"+mail.Subject+".eml",content);
    The problem will be to fetch (1) all mails with (2)
    all headers (like from, to, subject) (I am keeping information of those values of from, to and
    other properties somewhere else, so I need them too) and (3)byte[]
    EmailMessage.MimeContent.Content. Actually I am lacking understanding of
    Microsoft.Exchange.WebServices.Data.ItemView,
    Microsoft.Exchange.WebServices.Data.BasePropertySet and
    Microsoft.Exchange.WebServices.Data.ItemSchema
    thats why I am finding it difficult.
    My primary code is:
    When I create PropertySet as
    follows:
    PropertySet properties = new PropertySet(BasePropertySet.FirstClassProperties, ItemSchema.MimeContent);
    I get following exception:
    The property MimeContent can't be used in FindItem requests.
    I dont understand
    (Q1) What these ItemSchema and BasePropertySet are
    (Q2) And how we are supposed to use them
    So I removed ItemSchema.MimeContent:
    PropertySet properties = new PropertySet(BasePropertySet.FirstClassProperties);
    I wrote simple following code to get all mails in inbox:
    ItemView view = new ItemView(50);
    view.PropertySet = properties;
    FindItemsResults<Item> findResults;
    List<EmailMessage> emails = new List<EmailMessage>();
    do
    findResults = service.FindItems(WellKnownFolderName.Inbox, view);
    foreach (var item in findResults.Items)
    emails.Add((EmailMessage)item);
    Console.WriteLine("Loop");
    view.Offset = 50;
    while (findResults.MoreAvailable);
    Above I kept page size of ItemView to
    50, to retrieve no more than 50 mails at a time, and then offsetting it by 50 to get next 50 mails if there are any. However it goes in infinite loop and continuously prints Loop on
    console. So I must be understanding pagesize and offset wrong.
    I want to understand
    (Q3) what pagesize, offset and offsetbasepoint in ItemView constructor
    means
    (Q4) how they behave and
    (Q5) how to use them to retrieve all mails in the inbox
    I didnt found any article online nicely explaining these but just giving code samples. Will appreciate question-wise explanation despite it may turn long.

    1) With FindItems it will only return a subset of Item properties see
    http://msdn.microsoft.com/en-us/library/bb508824(v=exchg.80).aspx for a list and explanation. To get the mime content you need to use a GetItem (or Load) I would suggest you read
    http://blogs.msdn.com/b/exchangedev/archive/2010/03/16/loading-properties-for-multiple-items-with-one-call-to-exchange-web-services.aspx which also covers of paging as well.
    3) offset is from the base your setting the offset to 50 each time which means your only going to get the 50 items from the offset of 50 which just creates an infinite loop. You should use
    view.Offset
    = +50;
    to increment the Offset although it safer to use
    view.Offset  += findResults.Items.Count;
    which increments the offset based on the result of the last FindItems operation.
    5) try something like
    ItemView iv = new ItemView(100, 0);
    FindItemsResults<Item> firesults = null;
    PropertySet psPropSet = new PropertySet(BasePropertySet.IdOnly);
    iv.PropertySet = psPropSet;
    PropertySet itItemPropSet = new PropertySet(BasePropertySet.IdOnly) { ItemSchema.MimeContent, ItemSchema.Subject, EmailMessageSchema.From };
    do
    firesults = service.FindItems(WellKnownFolderName.Inbox, iv);
    service.LoadPropertiesForItems(firesults.Items, itItemPropSet);
    foreach(Item itItem in firesults){
    Object MimeContent = null;
    if(itItem.TryGetProperty(ItemSchema.MimeContent,out MimeContent)){
    Console.WriteLine("Processing : " + itItem.Subject);
    iv.Offset += firesults.Items.Count;
    } while (firesults.MoreAvailable);
    Cheers
    Glen
    .Offset += fiFitems.Items.Count;

  • Using mac mail with gmail

    what i would like to do is this:
    when i delete an incoming mail i would like for it to go to all mail with a tag on it for trash later. i don't want it to go right to trash i want to throw the trash away at my discretion. and if the deleted mail are tagged, it's easier to clean up the all mail folder. also, need this to work with mac mail too.
    what are the applicable key settings on both side to do this. i am having trouble getting this to happen. thank you.

    Try deleting the non working accounts and re-creating them.

  • Adding disclaimer to all outgoing mail

    I would like to start adding a "disclaimer" or signature to the bottom of all outgoing mails
    eg
    Please note that the contents of this e-mail, including any
    attachments etc etc etc
    Is there a way of configuring postfix to do this for me without corrupting the outgoing mail.

    There is no easy and, most importantly, reliable way of doing this at the postfix level. Full stop!
    If you need this to be done, you have to do it at the client level (mail.app, squirrelmail, outlook, etc.).
    For the technically inclined: An e-mail written by a user on the mail client can be plain text, images only, html, contain attachments etc. Thus it is encoded (mime) and passed on to the MTA (postfix). To be able to add a footer at this stage, the MTA would have to decode the mail message, add a footer and re-encode the message. Besides the technical implications it will also be a performance hit on your mail server. Furthermore, chances are your mail will get messed up in the process.
    Look at the source of an e-mail with let's say attachments in Mail.app (View-Message-Raw Source) and you will notice that except for the headers, what follows is mainly gibberish (that's the mime encoded bit).
    For the not so technically minded and a good laugh, see here:
    http://www.goldmark.org/jeff/stupid-disclaimers/

  • Google added as Exchange Account (mail, contacts, cal), issues with contact #'s resolving to Names.

    Google added as exchange account (mail, contacts, calendar), all works except contact correlation. Meaning somebody calls me, it's in the contact list but does not show name just the #. Same for outbound calls..search contacts, tap #, phone shows I'm dialing # versus contact name. This is completely goofy. I had a previous emplorers Exchange account working perfectly before I had to delete it. I removed all email accounts from iPhone and started fresh with adding Google as Exchange 'type' account.

    Ok I fixed this problem. Within Google under contacts I had imported 1,200+ contacts and they all showed up there, on my iPad and iPhone. But on the phone name and # would not correlate. I discovered that by editing a contact (within Google contacts page) it would mark it as 'My Contacts' in addition to being Imported on xx/xx/xx. Once I did this, magically my iphone call log would display the name of the contact I edited/reclassified as 'My Contacts'. So I reclassified all the contacts as 'My Contacts' and now have full functionality. End of **** story and hope this helps somebody else.

  • Is there a way to delete all events with the same title (not added as reoccurring) without deleting one at a time?

    i currently have a calendar synced that has events scheduled in perpetuity, scheduled as individual events.  I would like to delete all events with the same title.  I do not want to delete the entire calendar nor do I want to go into every event and delete individually.  These were not scheduled by me so I do not know how they were added one by one and go on forever but they are NOT scheduled as reoccurring and thus must be modified individually.
    I can do a search and find all events, is there a way to just delete all events with the same title all at once?
    this is a Microsoft outlook synced calendar and I am seemingly unable to delete the events all at one time from Microsoft as well. 
    Please help!

    If you still have access to the Outlook calendar in Outlook, I would delete them from there. There are a number of ways to do that, but if you open the individual event in Outlook, does it show a repeating pattern? If not, then you may have to delete them individually, but that is not that difficult either. Go into the calendar and then change the view to a list view. From there you can sort the view according to subject. This should bring all of these same appointments together in the list and you can select the group in Outlook and delete them. Once you do that, you can change your view back and then sync the phone. That will remove the events from the phone.

  • I am using Mail with OS 10.9.1...I used to be able to drag and drop contact addresses from my address book to an e-mail header.  Now I have to type all the names and can't drag and drop.  Is there a setting for this?  Thanks!

    I am using Mail with OS 10.9.1.  I used to be able drag and drop names from my address book into the address header, but can no longer do that.  I now have to type each name in.  Does anyone know if there is a setting for this or is it a feature of the updated software?  Thanks for any info!

    Yes, that appears how Mavericks works right now. However, you can open the Address Panel, select all your contacts, then click the To (or CC, or Bcc) buttons to move the selection to the address field.
    If it is not already in the Toolbar, right-click on the Toolbar and select Customize Toolbar…
    Then, drag the address panel up to wherever you want it.
    You may also want to add it to the New Message window in the same way.

  • I have two Apple IDs - one associated with iPad and iPhone and the other associated with iMac and MacAir. I am going to lose the former e-mail address imminently and would like to associate all devices with just one ID. How do I do this? Thanks

    I have two Apple IDs - one associated with iPad and iPhone and the other associated with iMac and MacAir. I am going to lose the former e-mail address imminently and would like to associate all devices with just one ID. How do I do this? Thanks

    Thanks - I guess it is like there were two of me!
    I bought the iPhone first and it seemed natural to link it to the (work) e-mail address which was in constant use. The iMac for home use came next and it seemed natural to use my home e-mail address, particularly as I knew by then that I would lose the work address after my imminent retirement. The same logic went for the recent puchase of the MacAir. I am not sure what happened with the iPad (also a recent purchase) - iTunes seemed to puch me towards the same ID as the iPhone.
    It is not a huge problem - just makes my persona look schizoid! Otherwise very happy with everything Apple.

  • I can't receive mail from my verizon/yahoo account on my imac running snow leopard.  I checked all settings with verizon but still have the problem

    My mail application on my imac will not download mail from my verizon/yahoo account.  I contacted verizon and confirmed my settings to be correct.  I don't get any error messages, I can send mail but I can't retrieve it from V/Y.  Connection doctor shows all connections with a green light.

    Mail/Preferences/Accounts
    Incoming Mail Server:  imap.verzon.net
    Outgoing Mail Server(SMTP):  smtp.verizon.net:your email [email protected]
    If that does not work, call Verizon for instructions.

  • Why am I having so much trouble signing in to g-mail, I realize I can skip and go into googlr but I haven't all day to play figure out the word.  I am getting my apple e-mail with the e-mail g-mail gave me.  You cannot reach google g-mail for support othe

    INSTALLED LION ABOUT A MONTH AGO.  AFTER THAT G-MAIL WOULD NOT TAKE MY E-MAIL ADDRESS OR CURRENT PASSWORD.  I HAD TO RESET E-MAIL, CHANGE PASSWORD.  SINCE THEN, FORGET ABOUT IT.  I CANNOT SIGN IN WITH NEW E-MAIL, WHICH BY THE WAY THEY GAVE ME.  NO WAY TO TALK TO PERSON AT GMAIL/GOOGLE, THEY JUST WANT YOU TO GAME WORDS ALL DAY.  WHAT IS THE SOLUTION?  CHANGE CARRIERS.  I AM GETTING E-MAIL WITH NAME THEY GAVE ME, BUT I SUSPECT IT IS COMING THRU APPLE.  AT THIS POINT I AM CRAZY.  HELP

    The is the forum for the Mac App Store. Apps for Mac computers.

  • IPad- on Yahoo pages the mail icon with the red number indication shows email.  When I tap, it asks me to sign in again. I do. It takes me to yahoo mail but there is nothing.  All the folders are emptied. All mail is either read, trash, or deleted.

    iPad- on all Yahoo pages the mail icon with the red number indication shows email.  When I tap, it asks me to sign in again. I do. It takes me to yahoo mail but there is nothing.  All the folders are emptied. All my mail is either read, trash, or deleted. Also, when I tap on the mail app on iPad home page, gmail is no problem but for yahoo I get error: no password for yahoo. Go to Mail Account Settings and enter password.  I'm stuck. Suggestions?  Thank you.

    Ask and you shell receive.....lol
    Go to your Gmail account in the browser.
    Hit the folder icon that brings up the folder selection.
    Scroll down to the bottom and select desktop version.
    The broswer will refresh and bring up your gmail account as though you were looking on it on the computer.
    The go to the upper right corner and select settings.
    Then go to forwarding and pop/imap
    Go look at pop download
    There you'll find 3 numbered lines
    Go to 1. Status
    And select enable pop for all mail
    Then save the settings
    Once you have done that you can go back to BlackBerry device settings and sync your mail or wait for it to sync it's self.
    Let me know how it works out.
    I just did it and it sync within minutes.

Maybe you are looking for

  • How to get mailboxes to appear in Mail after migration?

    I have used setup assistant to transfer all of my "stuff" from my old MacBook running 10.7 to my brand new MacBook Air.  The only glitch I have found so far is in Apple Mail.  My account works, but shows only the inbox, sent box, and trash.  It does

  • Wi-Fi Upgrade to 5GHZ

    Hi, I would like to upgrade my Wi-Fi interface from 802.11b|g|n with channel 1 and 2.4GHZ frequency to 802.11a|g|n and frequency 5GHZ because of a new router i had installed. Is it possible? This question was solved. View Solution.

  • Strange cropping activity from photoshop cs6 to lightroom 4.3

    i have never noticed the following activity: I edited, including cropping, an image in photoshop CS6. I saved the image as a tif and also as a psd. Both sent to a folder which exists in LR catalog. Both images were revealed in LR with the SYNCHRONIZE

  • Best Macbook for Photoshop

    I want to buy a new Macbook that will support and run Photoshop well, without freezing up or slowing down while using the program. I have been looking at the MacBook Pro, but do not know if it's necessary to buy the 15 inch or if the 13 will do. The

  • Analysis of the performance of the workbook

    Hi, I need to do an analysis of the performance of the workbook that are rolled out to around 30 users. This analysis should give the CPU usage time, impact on BW system, time to run the reports etc etc.... Please tell me the tables/ FM/ programs whi