Logcheck sending emails everywhere


 
Thread Tools Search this Thread
Operating Systems Linux Debian Logcheck sending emails everywhere
# 1  
Old 08-16-2015
[solved] Logcheck sending emails everywhere

Hi,
I just recently installed logcheck running it at defaults. I don't have a /home/logcheck, even though the logcheck.conf MAILTO variable says "logcheck". Now I have a .forward in my regular home /home/awayand which gets an hourly report from logcheck but I have no clue how to turn that off. I don't want logcheck to use my /home/awayand/.forward file! Anyone know how I can troubleshoot where this configuration comes from?
Thanks!

Edit: turns out /etc/aliases had logcheck: root entry and root: awayand

Last edited by awayand; 08-16-2015 at 08:35 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Debian

Problem sending out emails

Hi, Our email relay server is a debian server. The application team in our company regularly receives email alerts from one hpux server (which is routed through the email relay server). Today we had problems whereby our company's email recipients are not receiving email alerts from the hpux... (2 Replies)
Discussion started by: anaigini45
2 Replies

2. Shell Programming and Scripting

Issues sending emails using PostFix Mail Server

I'm unable to send email from my Linux server despite SMTP port 25 Active and Listening. # hostname TechX I checked the mail log ( /var/log/maillog ) and found the below error. I'm sharing all the ".cf" files seen in the error log. 1. # more /etc/postfix/main.cf # postfix... (0 Replies)
Discussion started by: mohtashims
0 Replies

3. Shell Programming and Scripting

Sending files to multiple emails

Hi All, I want to send each file to each email id as below. Instead of writing saparate 10 mail commands can we do it in a simple step. file1.csv to raghu.s@hps.com file2.csv to kiran.m@hps.com file3.csv to kenni.d@hps.com file4.csv to rani.d@hps.com file5.csv to sandya.s@hps.com... (2 Replies)
Discussion started by: ROCK_PLSQL
2 Replies

4. Shell Programming and Scripting

Hide from adress while sending emails

I have a shell script that sends email alerts to all the teams if there's any issue identified . This is the command that I use to send email alerts to others cat out.out | mail -s "Alerts on $date" $EMAILID Above code sends emails to all the users by default it sends emails to... (2 Replies)
Discussion started by: lazydev
2 Replies

5. Shell Programming and Scripting

Counting lines and sending emails

What I am doing is running ps and search for any connection that is over a specified number, I set it to "1" for testing I want to send an email when any of them are over 50 I want them all in one email Below is the code what I want is to display the output of ps and grepping for "httpd" to a... (3 Replies)
Discussion started by: slufoot80
3 Replies

6. Solaris

How to use text Fonts while sending emails from mailx?

Hi Team, I want to use "Courier New" fonts while sending emails using mailx command from solaris command prompt. Because my SQL output is not printing in correct format in the email. Please assist. Let me know for any details. Thanks, (1 Reply)
Discussion started by: Mukharam Khan
1 Replies

7. AIX

Need help on sending emails to Lotus Notes from Unix

Hi, I am new to UNIX and any help is greatly appreciated. Requirement: Need to check the directory and if the directory has some files then an email needs to be sent to the email ID on Lotus Notes. I need help on sending an email to email ID on Lotus Notes notifying that the files... (3 Replies)
Discussion started by: neetutg
3 Replies

8. UNIX for Dummies Questions & Answers

Sending Outgoing Emails from Unix Server

the server i have here is a Ubuntu server. it has nagios on it. after setting up nagios and having it work as it should, i realized at the very end of all my work that obviously nagios will also need to send out email alerts to a set of email addresses that it has in its database. my problem... (1 Reply)
Discussion started by: SkySmart
1 Replies

9. UNIX for Dummies Questions & Answers

Sending Emails to a unix process

Hi , I need to have a unix process which is setup to read all incoming mail for some user and process the same. How tough it is to code the same.Is there any way that we can download some shell scripts for the same from some internet site Kindly help. (2 Replies)
Discussion started by: xsriniva
2 Replies
Login or Register to Ask a Question
archmbox(1)															       archmbox(1)

NAME
archmbox - a simple email archiver SYNOPSIS
archmbox [ -h | --version ] archmbox MODE [ OPTIONS ] -d date mailbox [ mailbox ... ] archmbox MODE [ OPTIONS ] -o days mailbox [ mailbox ... ] DESCRIPTION
Archmbox is a simple email archiver written in perl; it parses one or more mailboxes, select some or all messages and then perform specific actions on the selected messages. Four different MODES are available: o list mode, which is useful to list all selected messages before archmbox performs the real operations (archiving or deleting) o kill mode, if messages should be deleted from the mailbox(es) rather than archived o archive mode, to archive the selected messages in a different mailbox o copy mode, to copy selected messages from a source mailbox(es) without modifying it Messages selection is based upon a date criteria; an absolute date or a days offset can be specified. It is also possible to refine the selection using perl regular expressions on the header fields of the message. Keep in mind to quote the so called metacharacters, which are reserved for use in perl's regex notation. The metacharacters are {}[]()^$.|*+? All archived messages are stored in a new mailbox with the same name of the original one + .archived as extension (this is the default, but can be changed); the archive mailbox can be saved in gz or bz2 compressed format as well. Please note that the archive mailbox format is always mbox, regardless of original mailbox format. Moreover, mailboxes must be specified using the full path. Messages are appended to the archive mailbox to allow multiple executions of the script against the same mailbox. MODES
-a, --archive Selected messages are archived in a different mailbox. -k, --kill Selected messages are deleted rather than archived. -l, --list List all selected messages. Warnings about skipped mailboxes (in use, empty ...) are printed to stderr. So redirecting them to /dev/null won't clutter your list. -y, --copy Selected messages are copied from the source mailbox. OPTIONS
-b, --backup Creates a backup of the original mailbox before archmbox execution. The mailbox is called mailbox.backup --bzip2 Use bzip2 to compress the archive mailbox (use with -c). -c, --compress Compress the archive mailbox after script execution. -d, --date <date> Specifies the threshold date for messages. The date must be supplied in the following format: yyyy-mm-dd -D, --date-header Force the use of the "Date:" header to age a message. If the header is somehow corrupt, the date/time informations are gathered for the beginning line of the message. -e, --extension <extension> Specifies the suffix for the archive mailbox; the default is archived. If none is specified, no suffix will be used (use care- fully). -f, --full-name Prepends the path of the mailbox to the name of the archive mailbox. This option overrides -n. --format Specifies the format of the mailboxes to parse. Legal values are mbox and mbx. Defaults to "mbox". -h, --help Prints help. -i, --ignore <regexp> Any mailbox/directory matching <regexp> will be skipped while archiving. --keep-flagged Flagged messages will not be archived. --keep-unread Unread messages will not be archived. -m, --minsize Specifies the minimum size of the mailbox to be archived. Mailboxes smaller than <minsize> will not be parsed for archiving. -n, --archive-name Specifies the name of the archive file (default: mailbox name) --nosymlink Do not follow symbolic links when processing mailboxes. --nowarnings Suppress mailbox related warnings. Use only if you know what you're doing! --omit-prefix <prefix> Omit <prefix> from the name of the mailbox when full name (option -f) is required. -o, --offset <days> Specifies the offset (in days) from today for threshold date of a message. This option replaces -d. If you specify -1, archmbox will operate on all messages. -p, --archive-path, --path <directory> Specifies where to store the archive mailbox (default: "."). <directory> must be specified using full path. The --path option is now deprecated and will be dropped in future releases. -r, --reverse Reverse the sense of offset or date value. It usually means older than but with this switch, it means newer than. -R, --recursive Act recursively on directories. If one or more directories are specified on the command line, all mailboxes stored in those directo- ries will be parsed for archiving. Implies option -f. -t, --tmpdir <directory> Specify a temporary working directory. This value overrides the default one, which will be set in descending order to the first defined one of: the environment variables $TMPDIR and $TMP, the compiled in one and, as a fallback, '/tmp'. To see the default value used by archmbox, do: archmbox --help. <directory> must be specified using full path. --time <time> Use <time> in conjunction with <date> (option -d) to refine the threshold age for archiving. <time> must be specified in the follow- ing format: hh:mm:ss. --totals Prints an overall summary of the archiving operations. The summary contains the number of parsed and skipped mailboxes, the total number of messages parsed and saved, the total space used and saved. -v, --verbose Verbosity level. Default is 1 (line per message) in --list output. So, if set to 1 it only lists msgid, sender and subject. With -v=2, it also prints date. --version Prints version number. -x, --regexp <header=regexp> It is specified in form -x field='regexp', where field can be any header. The header part is case sensitive. The regexp part is case sensitive if the regexp contains at least one upper case letter, and case insensitive otherwise. If message satisfies date range, but does not satisfy regexp match on specified field, it won't be archived. The option can be specified more than once; in this case, the message is regexp matched against all the given rules, and if it sat- isfies any, it will be archived. -X, --Regexp <header=regexp> Same as -x, --regexp except that for matching the regular expressions a logical 'and' mode is used for all regexp including the reg- exp given by -x, --regexp. CONFIGURATION
Archmbox is completely written in perl, but it uses some shell helpers to perform its job (fuser, rm, gzip/gunzip etc.). The correct path for the helpers (both required and optional ones) is probed at installation time. If one required helper is missing the installation will not take place. If one optional helper is missing, the feature provided using that helper will be unavailable, but the script will be installed anyway. All other relevant configuration options can be specified at installation time or at run time using the command line switches. USAGE EXAMPLES
A complete example: archmbox -a -b -c -e 01 -f -d 2002-01-01 -p ~/mail-archive ~/Mail/personal-stuff This will archive all messages older than (received before...) Jan 1st 2002 from the personal-stuff mailbox in the Mail directory. Archive messages are saved in a mailbox called Mail-personal-stuff.01.gz in the ~/mail-archive directory. After execution, you'll find a mailbox called personal-stuff.backup in ~/Mail. Complex examples, using perl regular expressions: archmbox -a -o 1 --keep-flagged --keep-unread -x From='(nagios|arpwatch|logcheck)@host.net' -x Subject='^(Security Events|Syslog Summary|[SNORT])' ~/Mail/inbox This will archive all unflagged, read messages older than 1 day where the sender address matches nagios@host.net, arpwatch@host.net or logcheck@host.net or whose subject field starts with either 'Security Events' or 'Syslog Summary' or '[SNORT]' from the mailbox ~/Mail/inbox. Messages will be saved in inbox.archive in the current directory where archmbox was started from. archmbox --archive --offset 1 --keep-flagged --keep-unread --Regexp From='@(host1|host2).example.com' --regexp Subject='^(Security Events|Syslog Summary|[SNORT])' --archive-path ~/Mail/local-network.archive --archive-name system-msgs --extension 'none' ~/Mail/inbox This will archive all unflagged, read messages older than 1 day where the sender address matches @host1.example.com or @host2.example.com and whose subject field starts with either 'Security Events' or 'Syslog Summary' or '[SNORT]' from the mailbox ~/Mail/inbox. Messages will be archived to the mbox system-msgs in the directory ~/Mail/local-network.archive. Some simpler examples: archmbox -a -o 15 ~/Mail/personal-stuff This will archive all messages older than 15 days in personal-stuff.archived (uncompressed mailbox). archmbox -a -r -o 15 ~/Mail/personal-stuff The same as above, but only messages newer than 15 days will be archived. archmbox -k -o 15 ~/Mail/personal-stuff This will delete all messages older than 15 days from Mail/personal-stuff archmbox -a -o 15 ~/Mail/* -c This will archive all messages older than 15 days in every mailbox found in ~/Mail. All the archive mailboxes will be compressed. archmbox -l -r -c /tmp/mbox -o 20 List all messages in /tmp/mbox which are newer than 20 days. Option -c is meaningless (and so ignored...). archmbox -l -r -c /tmp/mbox -o 20 -a --bzip2 Same as above, but archiving is forced (-a) and bzip2 is used for compression. archmbox -a -x Subject='archmbox' -o 7 ~/mbox Select for archiving all messages older than 7 days whose subject field satisfies regexp match Subject =~ /archmbox/ (Subject is case sen- sitive, archmbox is is case insensitive). archmbox -l -x Subject='archmbox' -x From='fritz' -o 7 ~/mbox Select for archiving all messages older than 7 days whose subject field contains archmbox or the sender is fritz (matches are case insensi- tive). archmbox -l -x Subject='archmbox' -X From='fritz' -o 7 ~/mbox Select for archiving all messages older than 7 days whose subject field contains archmbox and the sender is fritz (matches are case insen- sitive). archmbox -a -o 5 -R /tmp/mbox ~/Mail archmbox will archive all messages older than five days in /tmp/mbox. It then start parsing all mailboxes stored in ~/Mail (recursion is active, and ~/Mail is a directory). If one or more directories will be found in ~/Mail, those directories will be explored as well. archmbox -a -o -1 ~/Mail/my_mbx_mailbox --format mbx archmbox archives all messages stored in my_mbx_mailbox and puts them into my_mbx_mailbox.archived. The source mailbox is a mbx mailbox (--format mbx is used). The archive mailbox will be a mbox mailbox. NOTES
When the script has to decide if a message needs to be selected from the mailbox, it looks for the header From generated by the mail server (this is the first line of the message) and doesn't care about the date specified by the sender's mail client. This is useful to avoid removing messages sent from misconfigured mail clients. This behavior can be changed by forcing the use of the "Date:" header (option -D). Not all options are meaningfull in all modes, ie compression is meaningless in list or kill mode. If you specify a useless option for a particular mode, archmbox simply ignores it. Archmbox uses a working directory to store temporary mailboxes. A default value for that directory is hard coded in the script, but can be changed during the configuration/installation process (see INSTALL for details). It might happen that your mailboxes are too big for the partition holding this temporary directory, or you might want to perform archiving on too much mailboxes at the same time. In other words, you may run out of space. Use the -t option to specify a suitable working directory at runtime. If you see some differences in the mailbox's dimension (size/free space), keep in mind that your mailbox may contain a special message (512 bytes in size) with internal information related to the mailbox. This message is meaningless for you, though archmbox recognizes it and lets you be aware of it. That message is left untouched in your source mailbox. A few words about locking. There has been a discussion about archmbox handles file locking. The answer is simple: no mailbox is ever locked. The reason behind this behavior is that I want archmbox to be as least invasive as possible, so other kind of checks are performed to ensure that no data is lost (mailbox has changed/mailbox is in use by another program). I will surely add some locking mechanism in the future. You don't need to execute archmbox as root... just take care to have write permissions for the directories you use. LINKS
Archmbox can be downloaded from: http://adc-archmbox.sourceforge.net Archmbox is distributed under the terms of the GPL AUTHOR(S) Copyright (C) 2001-2005 Alessandro Dotti Contra <adotti@users.sourceforge.net> Parts of the code were contributed by: Alex Aminoff, Brian Medley, Buck Holsinger, Davor Ocelic, Fabrice Noilhan, Jayanth Varma, Juergen Edner, Laurent Cheylus, Nicolas Ecarnot, Paco Regodon, Scott Thompson, Juergen Desher. The FreeBSD port is maintained by Talal Al-Dik. The OpenDarwin port is maintained by Markus Weissman. The Debian package is maintained by Alberto Furia <straluna@email.it> BUGS
Please report bugs to <adotti@users.sourceforge.net> SEE ALSO
PERLREQUICK(1), PERLRETUT(1), PERLRE(1) archmbox(1)